Compare commits
	
		
			969 Commits
		
	
	
		
			OpenSSL-fi
			...
			OpenSSL_0_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					0d01d8a735 | ||
| 
						 | 
					2c0fa03dc6 | ||
| 
						 | 
					d3b3a6d389 | ||
| 
						 | 
					fc260b09a1 | ||
| 
						 | 
					b3c79a8a27 | ||
| 
						 | 
					f0ecefc0c0 | ||
| 
						 | 
					b0118409a9 | ||
| 
						 | 
					5f23288692 | ||
| 
						 | 
					45c58c7d10 | ||
| 
						 | 
					112591be76 | ||
| 
						 | 
					1b8daa3693 | ||
| 
						 | 
					1cdbc755ee | ||
| 
						 | 
					aa9c7e4b8c | ||
| 
						 | 
					6be69a168f | ||
| 
						 | 
					eaf76feeb6 | ||
| 
						 | 
					03e79ed05e | ||
| 
						 | 
					56bef2df4f | ||
| 
						 | 
					10d3886c51 | ||
| 
						 | 
					f1c0cf5b70 | ||
| 
						 | 
					2a7ac69ee4 | ||
| 
						 | 
					d13ea8e184 | ||
| 
						 | 
					1820b04bb2 | ||
| 
						 | 
					439b7ef463 | ||
| 
						 | 
					a25fb95bd6 | ||
| 
						 | 
					6168067160 | ||
| 
						 | 
					c3031a4610 | ||
| 
						 | 
					1099a94063 | ||
| 
						 | 
					812d8a176c | ||
| 
						 | 
					db533c96e3 | ||
| 
						 | 
					8831eb7624 | ||
| 
						 | 
					3c8f315021 | ||
| 
						 | 
					0f2e636602 | ||
| 
						 | 
					98bd148b1a | ||
| 
						 | 
					292248b8c2 | ||
| 
						 | 
					d3eef3e5af | ||
| 
						 | 
					c5fbf8c1ba | ||
| 
						 | 
					1ed2d8f512 | ||
| 
						 | 
					d140890259 | ||
| 
						 | 
					eb492df2bb | ||
| 
						 | 
					2c16e78400 | ||
| 
						 | 
					bf2b87aea3 | ||
| 
						 | 
					1dff425999 | ||
| 
						 | 
					501af5ba89 | ||
| 
						 | 
					31d6e7b7ba | ||
| 
						 | 
					b983322bfb | ||
| 
						 | 
					339654e163 | ||
| 
						 | 
					5ca48cc853 | ||
| 
						 | 
					79996e3335 | ||
| 
						 | 
					173acc185c | ||
| 
						 | 
					a985ecdd17 | ||
| 
						 | 
					fb4c24b6e7 | ||
| 
						 | 
					1366f6b9bd | ||
| 
						 | 
					e13546f739 | ||
| 
						 | 
					d6c813daff | ||
| 
						 | 
					e3818a4c4b | ||
| 
						 | 
					415fe2abe9 | ||
| 
						 | 
					5bbdaaf4b7 | ||
| 
						 | 
					bf1f1a5759 | ||
| 
						 | 
					8e42429c9d | ||
| 
						 | 
					c43c2285f6 | ||
| 
						 | 
					94b2c29f9d | ||
| 
						 | 
					090f931a35 | ||
| 
						 | 
					6b8be6da76 | ||
| 
						 | 
					7ec2d392e7 | ||
| 
						 | 
					e88f66bb49 | ||
| 
						 | 
					28a2759ab8 | ||
| 
						 | 
					3edad44d6e | ||
| 
						 | 
					9e7459fc5d | ||
| 
						 | 
					b98f5ef42b | ||
| 
						 | 
					a6d4f79f24 | ||
| 
						 | 
					efcb7a75fc | ||
| 
						 | 
					30aa23fea2 | ||
| 
						 | 
					c9e045041e | ||
| 
						 | 
					fd6fa9c0b2 | ||
| 
						 | 
					9f70d09275 | ||
| 
						 | 
					3fb0f01001 | ||
| 
						 | 
					216ac24bd3 | ||
| 
						 | 
					2035af2091 | ||
| 
						 | 
					19398a175a | ||
| 
						 | 
					fa369ddbe7 | ||
| 
						 | 
					294ba3c282 | ||
| 
						 | 
					2923e91a98 | ||
| 
						 | 
					7c52b7706f | ||
| 
						 | 
					ddec587581 | ||
| 
						 | 
					4f466f8e81 | ||
| 
						 | 
					1502cda142 | ||
| 
						 | 
					ce2b5d7574 | ||
| 
						 | 
					f1c65db80b | ||
| 
						 | 
					496970b233 | ||
| 
						 | 
					3b0e61a812 | ||
| 
						 | 
					e84b0d709b | ||
| 
						 | 
					16241f0ea4 | ||
| 
						 | 
					518af4e3ae | ||
| 
						 | 
					fe01f90a1c | ||
| 
						 | 
					99a376df16 | ||
| 
						 | 
					831ffcb705 | ||
| 
						 | 
					5f297c4504 | ||
| 
						 | 
					d7623ff9f3 | ||
| 
						 | 
					df9b5405e8 | ||
| 
						 | 
					180eb5b3c2 | ||
| 
						 | 
					af7d49aaff | ||
| 
						 | 
					187b655bc2 | ||
| 
						 | 
					8612cb9239 | ||
| 
						 | 
					b2f3fafa6a | ||
| 
						 | 
					483dab147d | ||
| 
						 | 
					f39b8e697c | ||
| 
						 | 
					7d610299c9 | ||
| 
						 | 
					25550b2dd4 | ||
| 
						 | 
					5c676c47cd | ||
| 
						 | 
					e77f9d5e78 | ||
| 
						 | 
					9c04747623 | ||
| 
						 | 
					e66deb6817 | ||
| 
						 | 
					cc9a645a02 | ||
| 
						 | 
					18fb9d807e | ||
| 
						 | 
					a1cc568288 | ||
| 
						 | 
					2ea3cd8abc | ||
| 
						 | 
					095db72024 | ||
| 
						 | 
					11eb172b6e | ||
| 
						 | 
					4b60f4b175 | ||
| 
						 | 
					0794f3a798 | ||
| 
						 | 
					2b8e7b5061 | ||
| 
						 | 
					6f57311da0 | ||
| 
						 | 
					98b09d3949 | ||
| 
						 | 
					231a737a82 | ||
| 
						 | 
					236860735e | ||
| 
						 | 
					ac1ef7ec72 | ||
| 
						 | 
					5f761514e1 | ||
| 
						 | 
					32f1f622f6 | ||
| 
						 | 
					5f95651316 | ||
| 
						 | 
					ccac657556 | ||
| 
						 | 
					a9c23ea079 | ||
| 
						 | 
					33ffe2a7f7 | ||
| 
						 | 
					7c717aafc6 | ||
| 
						 | 
					225aeb171e | ||
| 
						 | 
					ffe181c366 | ||
| 
						 | 
					fd4e79a9ed | ||
| 
						 | 
					299e174d2d | ||
| 
						 | 
					ce62fc6eae | ||
| 
						 | 
					43490dfb89 | ||
| 
						 | 
					a523276786 | ||
| 
						 | 
					074471ab0c | ||
| 
						 | 
					d761421e1d | ||
| 
						 | 
					2339c5d722 | ||
| 
						 | 
					dd00266757 | ||
| 
						 | 
					bb99ce5f80 | ||
| 
						 | 
					49f42ec0f6 | ||
| 
						 | 
					91d509f0d9 | ||
| 
						 | 
					d5e858c55f | ||
| 
						 | 
					fb8fcce2ac | ||
| 
						 | 
					d4736ae701 | ||
| 
						 | 
					3e1158522a | ||
| 
						 | 
					57191f86d9 | ||
| 
						 | 
					0a89c575de | ||
| 
						 | 
					4c860910df | ||
| 
						 | 
					0fc3d51b7d | ||
| 
						 | 
					c4b0d7879e | ||
| 
						 | 
					aab1ec3f36 | ||
| 
						 | 
					fbfa11fb29 | ||
| 
						 | 
					284498fcef | ||
| 
						 | 
					07d9808496 | ||
| 
						 | 
					4ab0088bfe | ||
| 
						 | 
					3bd1690bfb | ||
| 
						 | 
					29f4b05954 | ||
| 
						 | 
					48ca0c99b2 | ||
| 
						 | 
					015052cf7b | ||
| 
						 | 
					9ce3ee47ba | ||
| 
						 | 
					2e3fd54337 | ||
| 
						 | 
					625782f7ee | ||
| 
						 | 
					1c90899eef | ||
| 
						 | 
					4f2b7d48b1 | ||
| 
						 | 
					458c3900e1 | ||
| 
						 | 
					ba75b4e750 | ||
| 
						 | 
					ab011d51be | ||
| 
						 | 
					898d9b1a87 | ||
| 
						 | 
					4f9a9d2b79 | ||
| 
						 | 
					346f2f93e1 | ||
| 
						 | 
					25b0e072dd | ||
| 
						 | 
					dc13c882fb | ||
| 
						 | 
					12a52467c8 | ||
| 
						 | 
					22e6c73dcc | ||
| 
						 | 
					53b9696f3f | ||
| 
						 | 
					7e4fe4662b | ||
| 
						 | 
					18fd413f37 | ||
| 
						 | 
					80ed5f84de | ||
| 
						 | 
					b48111df7c | ||
| 
						 | 
					73e3edd70d | ||
| 
						 | 
					d4cfbdf2c0 | ||
| 
						 | 
					294f03a812 | ||
| 
						 | 
					272f9f3d27 | ||
| 
						 | 
					927a28ba3b | ||
| 
						 | 
					a938c4284e | ||
| 
						 | 
					7a44a0cee7 | ||
| 
						 | 
					82430309ac | ||
| 
						 | 
					c2079de880 | ||
| 
						 | 
					967ead7269 | ||
| 
						 | 
					c9255df519 | ||
| 
						 | 
					27c824a1c9 | ||
| 
						 | 
					5b96d1ccf9 | ||
| 
						 | 
					29c0866b38 | ||
| 
						 | 
					0214ea0dfe | ||
| 
						 | 
					80355002a1 | ||
| 
						 | 
					0e36825228 | ||
| 
						 | 
					95a8f1469f | ||
| 
						 | 
					afdbadc704 | ||
| 
						 | 
					004cc26abf | ||
| 
						 | 
					35a924c576 | ||
| 
						 | 
					99279ac97a | ||
| 
						 | 
					87605ca1e2 | ||
| 
						 | 
					7cc586f117 | ||
| 
						 | 
					c263a6092c | ||
| 
						 | 
					f92fd85400 | ||
| 
						 | 
					e71520ddd6 | ||
| 
						 | 
					275f34b5d2 | ||
| 
						 | 
					50fbb6ed36 | ||
| 
						 | 
					34fdacbd35 | ||
| 
						 | 
					77f2d20dbc | ||
| 
						 | 
					0dbfbf26cb | ||
| 
						 | 
					2863a6878f | ||
| 
						 | 
					ae46e91e4d | ||
| 
						 | 
					865a90eb4f | ||
| 
						 | 
					0269c4507c | ||
| 
						 | 
					a5d3574984 | ||
| 
						 | 
					1040deb0c5 | ||
| 
						 | 
					05ea800faf | ||
| 
						 | 
					341f87862c | ||
| 
						 | 
					f805d30769 | ||
| 
						 | 
					4fb9472cc2 | ||
| 
						 | 
					a8098740c6 | ||
| 
						 | 
					e3af0d041e | ||
| 
						 | 
					28cfda9f30 | ||
| 
						 | 
					a313e23fff | ||
| 
						 | 
					4d2a292e8a | ||
| 
						 | 
					5a84b7fc2d | ||
| 
						 | 
					d8e660a6dc | ||
| 
						 | 
					761f3b403b | ||
| 
						 | 
					4570d29404 | ||
| 
						 | 
					14346b3456 | ||
| 
						 | 
					769f58aaaa | ||
| 
						 | 
					a166e96d16 | ||
| 
						 | 
					8dd8ce1dc3 | ||
| 
						 | 
					4c5979a107 | ||
| 
						 | 
					649ab2dcfa | ||
| 
						 | 
					71fc9b37ae | ||
| 
						 | 
					283aedf498 | ||
| 
						 | 
					1a56614af2 | ||
| 
						 | 
					693c33e407 | ||
| 
						 | 
					d9a9aa027d | ||
| 
						 | 
					b22250bb67 | ||
| 
						 | 
					d446120527 | ||
| 
						 | 
					bb9d68489c | ||
| 
						 | 
					affaea59fe | ||
| 
						 | 
					81fc4c93ef | ||
| 
						 | 
					8957121c14 | ||
| 
						 | 
					50241bc84e | ||
| 
						 | 
					e7f077f1ba | ||
| 
						 | 
					c3b82c7610 | ||
| 
						 | 
					2c12e7f6f5 | ||
| 
						 | 
					8db10d9ac4 | ||
| 
						 | 
					c3cc4662af | ||
| 
						 | 
					22892f9803 | ||
| 
						 | 
					27eb115fb6 | ||
| 
						 | 
					51a596ef4f | ||
| 
						 | 
					97de8bd1e0 | ||
| 
						 | 
					1cb7e5be5b | ||
| 
						 | 
					84dd04e761 | ||
| 
						 | 
					2ac061e487 | ||
| 
						 | 
					7cdb81582c | ||
| 
						 | 
					8f33b40302 | ||
| 
						 | 
					e600614ef5 | ||
| 
						 | 
					02581dea1f | ||
| 
						 | 
					40ad08bcc2 | ||
| 
						 | 
					9c4456a13f | ||
| 
						 | 
					f4d0392faa | ||
| 
						 | 
					45ba6cfe03 | ||
| 
						 | 
					4f23a0c797 | ||
| 
						 | 
					f6c32bbf2b | ||
| 
						 | 
					d040c951f0 | ||
| 
						 | 
					69abfb0e33 | ||
| 
						 | 
					9a1daf8482 | ||
| 
						 | 
					9de6dc3af3 | ||
| 
						 | 
					248834dcaa | ||
| 
						 | 
					11a7da7c9f | ||
| 
						 | 
					9fea0b9937 | ||
| 
						 | 
					6fd3f3260d | ||
| 
						 | 
					d9e262443c | ||
| 
						 | 
					51c3bb3b98 | ||
| 
						 | 
					7d608f9e32 | ||
| 
						 | 
					295de18c8a | ||
| 
						 | 
					3370b694b9 | ||
| 
						 | 
					3380c52f15 | ||
| 
						 | 
					1364e6f1ac | ||
| 
						 | 
					c5ac2aa62c | ||
| 
						 | 
					392a0345de | ||
| 
						 | 
					5c2fc73e7b | ||
| 
						 | 
					402b951804 | ||
| 
						 | 
					5848d13fed | ||
| 
						 | 
					5dd24ead57 | ||
| 
						 | 
					d2cb94952a | ||
| 
						 | 
					0615396d2d | ||
| 
						 | 
					82877ea449 | ||
| 
						 | 
					81fae49db9 | ||
| 
						 | 
					74ff8dc975 | ||
| 
						 | 
					ac319217d0 | ||
| 
						 | 
					cdb13ae8d0 | ||
| 
						 | 
					ab700807d9 | ||
| 
						 | 
					744b91bb9f | ||
| 
						 | 
					d69f85bf15 | ||
| 
						 | 
					52ee969e29 | ||
| 
						 | 
					55f0501201 | ||
| 
						 | 
					b2710ee19a | ||
| 
						 | 
					bbfcc4724d | ||
| 
						 | 
					c31cc72d79 | ||
| 
						 | 
					d1049ad93e | ||
| 
						 | 
					5f4cc234fb | ||
| 
						 | 
					d31a13953c | ||
| 
						 | 
					28f5873179 | ||
| 
						 | 
					8f813338f1 | ||
| 
						 | 
					6555dfa486 | ||
| 
						 | 
					5eee0253e5 | ||
| 
						 | 
					594c723f98 | ||
| 
						 | 
					f418265865 | ||
| 
						 | 
					53707e2eec | ||
| 
						 | 
					fde794e898 | ||
| 
						 | 
					082f19b42d | ||
| 
						 | 
					e31c620686 | ||
| 
						 | 
					570253315f | ||
| 
						 | 
					5dcdac6e4e | ||
| 
						 | 
					eea3fce854 | ||
| 
						 | 
					215c49d032 | ||
| 
						 | 
					923df53e25 | ||
| 
						 | 
					1a684d0020 | ||
| 
						 | 
					dc3b721fa0 | ||
| 
						 | 
					4479ce9c1c | ||
| 
						 | 
					4a0d3530e0 | ||
| 
						 | 
					9907d2992d | ||
| 
						 | 
					9d9224f184 | ||
| 
						 | 
					78d4d87e39 | ||
| 
						 | 
					6211633273 | ||
| 
						 | 
					3a4cf918bf | ||
| 
						 | 
					e25eb309ec | ||
| 
						 | 
					ffa2b2aa7d | ||
| 
						 | 
					a77a95584d | ||
| 
						 | 
					68bb98159f | ||
| 
						 | 
					8e6905d238 | ||
| 
						 | 
					1a8521ff24 | ||
| 
						 | 
					9d5460d72d | ||
| 
						 | 
					35e59297fc | ||
| 
						 | 
					9b945233b1 | ||
| 
						 | 
					b065dc2eee | ||
| 
						 | 
					66c4bb1a70 | ||
| 
						 | 
					36abe6fe61 | ||
| 
						 | 
					3c786aa6c8 | ||
| 
						 | 
					e5cce6d356 | ||
| 
						 | 
					723b7d81e4 | ||
| 
						 | 
					a3ddd7358b | ||
| 
						 | 
					45c027f31f | ||
| 
						 | 
					3b62e9eb0d | ||
| 
						 | 
					34a8c7ec87 | ||
| 
						 | 
					d4a6240005 | ||
| 
						 | 
					5c6f76da0a | ||
| 
						 | 
					4636341b05 | ||
| 
						 | 
					be3b770d8f | ||
| 
						 | 
					af32387b3f | ||
| 
						 | 
					115fc340cb | ||
| 
						 | 
					900f7a8776 | ||
| 
						 | 
					4877e30504 | ||
| 
						 | 
					4656ec3852 | ||
| 
						 | 
					e336441197 | ||
| 
						 | 
					20d6182f33 | ||
| 
						 | 
					aa145866f9 | ||
| 
						 | 
					fdff41e166 | ||
| 
						 | 
					07b4bc3979 | ||
| 
						 | 
					0c66d3ae37 | ||
| 
						 | 
					bd869183d5 | ||
| 
						 | 
					7e2bf83100 | ||
| 
						 | 
					25e52a78fb | ||
| 
						 | 
					47c4bb2ddf | ||
| 
						 | 
					951dfbb13a | ||
| 
						 | 
					81780a3b62 | ||
| 
						 | 
					c574d0cdf2 | ||
| 
						 | 
					c987c3f999 | ||
| 
						 | 
					1a5e414863 | ||
| 
						 | 
					ec3639385e | ||
| 
						 | 
					f01cfca6a4 | ||
| 
						 | 
					7d5af5e0fa | ||
| 
						 | 
					8fdb296cbd | ||
| 
						 | 
					879b30aaa3 | ||
| 
						 | 
					40ddcb717a | ||
| 
						 | 
					da1841a075 | ||
| 
						 | 
					0a0a10d127 | ||
| 
						 | 
					df20b6e79b | ||
| 
						 | 
					f4f1dc39e0 | ||
| 
						 | 
					340b4dd7df | ||
| 
						 | 
					4b9dcd821f | ||
| 
						 | 
					669c5c9380 | ||
| 
						 | 
					7f9aa6c59b | ||
| 
						 | 
					d9c06b56ca | ||
| 
						 | 
					d045e1d77e | ||
| 
						 | 
					6d14cc7ec1 | ||
| 
						 | 
					eb499b2854 | ||
| 
						 | 
					65a82ef6d7 | ||
| 
						 | 
					616f581650 | ||
| 
						 | 
					57e802656f | ||
| 
						 | 
					5d7f15daf8 | ||
| 
						 | 
					ec67e3b7e4 | ||
| 
						 | 
					0d3ff3c073 | ||
| 
						 | 
					325e48867c | ||
| 
						 | 
					8de95bc05b | ||
| 
						 | 
					5e3003bb52 | ||
| 
						 | 
					e6e3f38bfa | ||
| 
						 | 
					aa17ab7e57 | ||
| 
						 | 
					35908bd040 | ||
| 
						 | 
					4a9cfd763e | ||
| 
						 | 
					0e73294e26 | ||
| 
						 | 
					b610f46bae | ||
| 
						 | 
					1921a1adb2 | ||
| 
						 | 
					6d2cd23f40 | ||
| 
						 | 
					14fb67f28a | ||
| 
						 | 
					c552680473 | ||
| 
						 | 
					edbf9f878d | ||
| 
						 | 
					2745ddfc33 | ||
| 
						 | 
					808606034a | ||
| 
						 | 
					e18eef3d7a | ||
| 
						 | 
					e78fc11a95 | ||
| 
						 | 
					83231cb376 | ||
| 
						 | 
					986ad56124 | ||
| 
						 | 
					b723a7b11b | ||
| 
						 | 
					1b6b67b17e | ||
| 
						 | 
					1ee3236f72 | ||
| 
						 | 
					b03a4917be | ||
| 
						 | 
					84971b39f5 | ||
| 
						 | 
					5ab3e743f3 | ||
| 
						 | 
					1c5dc844e7 | ||
| 
						 | 
					f871949efd | ||
| 
						 | 
					eb2ec6bee9 | ||
| 
						 | 
					df22f59f6e | ||
| 
						 | 
					db0edc3273 | ||
| 
						 | 
					6300c14248 | ||
| 
						 | 
					d4426e79a7 | ||
| 
						 | 
					b095418d20 | ||
| 
						 | 
					d6fd880481 | ||
| 
						 | 
					cbb0b734c7 | ||
| 
						 | 
					f4bcd70f27 | ||
| 
						 | 
					6e16b45d9d | ||
| 
						 | 
					e09e7ab362 | ||
| 
						 | 
					d5cc2f19cd | ||
| 
						 | 
					b7a80146f4 | ||
| 
						 | 
					5586a71a6e | ||
| 
						 | 
					81418b7c77 | ||
| 
						 | 
					8bd0c77ae3 | ||
| 
						 | 
					e2217e7ed5 | ||
| 
						 | 
					51b75ea7ef | ||
| 
						 | 
					41d4d6721c | ||
| 
						 | 
					9d01d50459 | ||
| 
						 | 
					e27c67c5c5 | ||
| 
						 | 
					e7decd5f4d | ||
| 
						 | 
					38a3178185 | ||
| 
						 | 
					58828ae573 | ||
| 
						 | 
					6b5f5e3508 | ||
| 
						 | 
					f0ec771933 | ||
| 
						 | 
					22d1087e16 | ||
| 
						 | 
					9f85fcefdc | ||
| 
						 | 
					269d2575cd | ||
| 
						 | 
					0b8ed5de2d | ||
| 
						 | 
					c22684eac9 | ||
| 
						 | 
					c42cd4b831 | ||
| 
						 | 
					4d018f7067 | ||
| 
						 | 
					46eaf3b0cc | ||
| 
						 | 
					9df2a00b94 | ||
| 
						 | 
					fbcf4bc1f2 | ||
| 
						 | 
					ca08c064bb | ||
| 
						 | 
					02df47d349 | ||
| 
						 | 
					41c39e3366 | ||
| 
						 | 
					45803988ce | ||
| 
						 | 
					28251e7ff9 | ||
| 
						 | 
					217382d584 | ||
| 
						 | 
					82a2cb6f51 | ||
| 
						 | 
					611ed5f312 | ||
| 
						 | 
					27fbb5dbf4 | ||
| 
						 | 
					db8d9b7cf1 | ||
| 
						 | 
					60ec950517 | ||
| 
						 | 
					2cd4ebc01f | ||
| 
						 | 
					5f4dcaf781 | ||
| 
						 | 
					c55d882fab | ||
| 
						 | 
					8dc7450068 | ||
| 
						 | 
					2e885232c2 | ||
| 
						 | 
					970d9b3795 | ||
| 
						 | 
					2f58af0d85 | ||
| 
						 | 
					0ae50f19da | ||
| 
						 | 
					c4ac37361e | ||
| 
						 | 
					3152861e81 | ||
| 
						 | 
					a14afd0804 | ||
| 
						 | 
					25d5d1a60d | ||
| 
						 | 
					6ff58b9240 | ||
| 
						 | 
					99237262d4 | ||
| 
						 | 
					29982dfd15 | ||
| 
						 | 
					6c4da94687 | ||
| 
						 | 
					6986d0e6eb | ||
| 
						 | 
					bc9320452c | ||
| 
						 | 
					23d43aae27 | ||
| 
						 | 
					de71735e7c | ||
| 
						 | 
					05decf3638 | ||
| 
						 | 
					95bffa1a1f | ||
| 
						 | 
					974d52fdb8 | ||
| 
						 | 
					7614f0e55e | ||
| 
						 | 
					0632284f79 | ||
| 
						 | 
					ad4a89f070 | ||
| 
						 | 
					6104c49f31 | ||
| 
						 | 
					07fc760999 | ||
| 
						 | 
					cf6bc84148 | ||
| 
						 | 
					36d51bea93 | ||
| 
						 | 
					fc12885b1b | ||
| 
						 | 
					ec7033745e | ||
| 
						 | 
					9e31e63147 | ||
| 
						 | 
					feef17fd88 | ||
| 
						 | 
					817f011191 | ||
| 
						 | 
					98c045cf3a | ||
| 
						 | 
					8860f3a82a | ||
| 
						 | 
					43e9f4ca2f | ||
| 
						 | 
					586f843c76 | ||
| 
						 | 
					7cfc9e6d8c | ||
| 
						 | 
					4952ed0fa4 | ||
| 
						 | 
					a084185d76 | ||
| 
						 | 
					914b80d276 | ||
| 
						 | 
					282557da52 | ||
| 
						 | 
					5f649d583c | ||
| 
						 | 
					b98225ebf5 | ||
| 
						 | 
					abb0c2bba4 | ||
| 
						 | 
					b3bdb474a9 | ||
| 
						 | 
					d796e6acb7 | ||
| 
						 | 
					d3afc92bc9 | ||
| 
						 | 
					35a97b4b7b | ||
| 
						 | 
					f59463aad3 | ||
| 
						 | 
					ed656499c4 | ||
| 
						 | 
					63533e9a22 | ||
| 
						 | 
					20f7053254 | ||
| 
						 | 
					8b8ef74d39 | ||
| 
						 | 
					3bfe024d8d | ||
| 
						 | 
					063333e03d | ||
| 
						 | 
					0a0918ff38 | ||
| 
						 | 
					802c014656 | ||
| 
						 | 
					860841794d | ||
| 
						 | 
					2a87c31237 | ||
| 
						 | 
					da5f7fdcee | ||
| 
						 | 
					d8b408b1de | ||
| 
						 | 
					64932f9e4a | ||
| 
						 | 
					5a20efcf17 | ||
| 
						 | 
					2a2857bbc8 | ||
| 
						 | 
					1bef284ab1 | ||
| 
						 | 
					d8d0b6434f | ||
| 
						 | 
					416b6fd115 | ||
| 
						 | 
					f685cf920b | ||
| 
						 | 
					54f51116b2 | ||
| 
						 | 
					b0d90958fc | ||
| 
						 | 
					049ced2c2f | ||
| 
						 | 
					844b0e603b | ||
| 
						 | 
					75ef751e23 | ||
| 
						 | 
					c4f6e56fca | ||
| 
						 | 
					ff86d3d894 | ||
| 
						 | 
					85b4c03e33 | ||
| 
						 | 
					efaf159af6 | ||
| 
						 | 
					daa657fb78 | ||
| 
						 | 
					4685663d73 | ||
| 
						 | 
					ed1f716022 | ||
| 
						 | 
					d3205a4898 | ||
| 
						 | 
					86731ce2c6 | ||
| 
						 | 
					1399309624 | ||
| 
						 | 
					cb59297438 | ||
| 
						 | 
					5824f6bc06 | ||
| 
						 | 
					5ce7090d54 | ||
| 
						 | 
					7306ab29bc | ||
| 
						 | 
					3a8b42f291 | ||
| 
						 | 
					e4c25383f2 | ||
| 
						 | 
					e734dcc2c7 | ||
| 
						 | 
					0fce007b8e | ||
| 
						 | 
					5a053a3a07 | ||
| 
						 | 
					3b2ba5f7fb | ||
| 
						 | 
					7f622f6c04 | ||
| 
						 | 
					801136bcc2 | ||
| 
						 | 
					3c0e39c539 | ||
| 
						 | 
					19fddebf0e | ||
| 
						 | 
					9eaf7e14c7 | ||
| 
						 | 
					0e441bc103 | ||
| 
						 | 
					cd9911fdf8 | ||
| 
						 | 
					6086422193 | ||
| 
						 | 
					9ddb11f11c | ||
| 
						 | 
					7a20cabd03 | ||
| 
						 | 
					9dc4ca4507 | ||
| 
						 | 
					62fea98b4f | ||
| 
						 | 
					7ae4eac5b6 | ||
| 
						 | 
					fcf8ae5e2b | ||
| 
						 | 
					55b9a7938b | ||
| 
						 | 
					cf1546a60e | ||
| 
						 | 
					e7eec05af0 | ||
| 
						 | 
					98e986141b | ||
| 
						 | 
					d7e35e0371 | ||
| 
						 | 
					222f224664 | ||
| 
						 | 
					62b6cd007f | ||
| 
						 | 
					1682e8fb12 | ||
| 
						 | 
					984aefe0e8 | ||
| 
						 | 
					2d54cc69c9 | ||
| 
						 | 
					2dd8278de8 | ||
| 
						 | 
					e0d8ac972e | ||
| 
						 | 
					ec03812fb0 | ||
| 
						 | 
					93cf2b17bf | ||
| 
						 | 
					77ef1a989d | ||
| 
						 | 
					423c7ac6c6 | ||
| 
						 | 
					2c368ef148 | ||
| 
						 | 
					b3c7162fd0 | ||
| 
						 | 
					67865069eb | ||
| 
						 | 
					1896a9be60 | ||
| 
						 | 
					b5b2c037c1 | ||
| 
						 | 
					1957924d51 | ||
| 
						 | 
					104a66f256 | ||
| 
						 | 
					3de6d65ea3 | ||
| 
						 | 
					fdb0a6e004 | ||
| 
						 | 
					87b857b6bf | ||
| 
						 | 
					b18165301d | ||
| 
						 | 
					097e65944a | ||
| 
						 | 
					0cdd29ea78 | ||
| 
						 | 
					7dec24688f | ||
| 
						 | 
					e62fa54811 | ||
| 
						 | 
					1614174e79 | ||
| 
						 | 
					f95d097359 | ||
| 
						 | 
					3c6ab9aad9 | ||
| 
						 | 
					4913b88f70 | ||
| 
						 | 
					273157153c | ||
| 
						 | 
					fb5156ff38 | ||
| 
						 | 
					2a824402f3 | ||
| 
						 | 
					86a249fe4f | ||
| 
						 | 
					6cae8221c9 | ||
| 
						 | 
					750cb3d248 | ||
| 
						 | 
					f254b540b8 | ||
| 
						 | 
					11024f252e | ||
| 
						 | 
					9d5cba17ba | ||
| 
						 | 
					1d01c9d43d | ||
| 
						 | 
					e32ea81876 | ||
| 
						 | 
					ef8a18f49b | ||
| 
						 | 
					b914049c53 | ||
| 
						 | 
					dabaea8048 | ||
| 
						 | 
					09c1a425a9 | ||
| 
						 | 
					8c6fed007f | ||
| 
						 | 
					2e39604021 | ||
| 
						 | 
					fbfb947b21 | ||
| 
						 | 
					8b963f4ba4 | ||
| 
						 | 
					9152f07eaf | ||
| 
						 | 
					35f70c09f5 | ||
| 
						 | 
					cc4cba7b5d | ||
| 
						 | 
					6b695fefd0 | ||
| 
						 | 
					910d193029 | ||
| 
						 | 
					f18dd687c8 | ||
| 
						 | 
					50d5376698 | ||
| 
						 | 
					5b9b62a7db | ||
| 
						 | 
					c0e29e5b01 | ||
| 
						 | 
					2f03129d46 | ||
| 
						 | 
					b44e2d3416 | ||
| 
						 | 
					564915681c | ||
| 
						 | 
					a24b7eeb87 | ||
| 
						 | 
					0215c01861 | ||
| 
						 | 
					beae6324e5 | ||
| 
						 | 
					71a61c573e | ||
| 
						 | 
					6b3b632767 | ||
| 
						 | 
					2a2fa04b7b | ||
| 
						 | 
					79b81d194b | ||
| 
						 | 
					ef04c9aff8 | ||
| 
						 | 
					7f85197c10 | ||
| 
						 | 
					ff0bfe64af | ||
| 
						 | 
					44b3a3a5e6 | ||
| 
						 | 
					7e3033aa93 | ||
| 
						 | 
					8bdbf50772 | ||
| 
						 | 
					ec33a76641 | ||
| 
						 | 
					00ce9376c7 | ||
| 
						 | 
					46e7a9797e | ||
| 
						 | 
					7006c4ac88 | ||
| 
						 | 
					a50a2126cf | ||
| 
						 | 
					07f7b4b470 | ||
| 
						 | 
					7e726e42f4 | ||
| 
						 | 
					40ba0257de | ||
| 
						 | 
					3fbd5f9fea | ||
| 
						 | 
					57b2246d35 | ||
| 
						 | 
					2a5b22d6f9 | ||
| 
						 | 
					f247dc7522 | ||
| 
						 | 
					e6531253e2 | ||
| 
						 | 
					c938babf00 | ||
| 
						 | 
					bf3900020f | ||
| 
						 | 
					586df3bb7f | ||
| 
						 | 
					c4b13b0268 | ||
| 
						 | 
					daef72316f | ||
| 
						 | 
					1f93c96e63 | ||
| 
						 | 
					8aa9c79276 | ||
| 
						 | 
					09a7f2e734 | ||
| 
						 | 
					b2d27e376d | ||
| 
						 | 
					644c4af11e | ||
| 
						 | 
					ca3dc3a0a0 | ||
| 
						 | 
					2b975dfd5b | ||
| 
						 | 
					0932892278 | ||
| 
						 | 
					fe0b3d98c2 | ||
| 
						 | 
					8d56c8b51c | ||
| 
						 | 
					d8e6409336 | ||
| 
						 | 
					a4ae746656 | ||
| 
						 | 
					331a0a7b9b | ||
| 
						 | 
					c630a3e8d6 | ||
| 
						 | 
					7435d89edf | ||
| 
						 | 
					14557c8be4 | ||
| 
						 | 
					98b4995bad | ||
| 
						 | 
					3000bdcc3a | ||
| 
						 | 
					cbe77a6753 | ||
| 
						 | 
					c58a1f76f8 | ||
| 
						 | 
					ecf2875ebf | ||
| 
						 | 
					ce2c19e357 | ||
| 
						 | 
					1b1081a3ed | ||
| 
						 | 
					37b200389a | ||
| 
						 | 
					6b5a8f3a22 | ||
| 
						 | 
					0b18d8b0c7 | ||
| 
						 | 
					3d187ede47 | ||
| 
						 | 
					f3b9c34515 | ||
| 
						 | 
					c923394924 | ||
| 
						 | 
					d9dbd24db5 | ||
| 
						 | 
					b135819d71 | ||
| 
						 | 
					cbcbd07da2 | ||
| 
						 | 
					24f6ab73a7 | ||
| 
						 | 
					5e88347e1b | ||
| 
						 | 
					cac0d4ee6f | ||
| 
						 | 
					428759b3d4 | ||
| 
						 | 
					898d3ecce0 | ||
| 
						 | 
					004f16f6c4 | ||
| 
						 | 
					4e2a0e58f2 | ||
| 
						 | 
					39d29195a7 | ||
| 
						 | 
					727c9b8027 | ||
| 
						 | 
					bd4e9b0512 | ||
| 
						 | 
					7844ff735f | ||
| 
						 | 
					49e96badcf | ||
| 
						 | 
					eb6a81bacc | ||
| 
						 | 
					6687f12988 | ||
| 
						 | 
					fcd12fc0f1 | ||
| 
						 | 
					0fb4d54068 | ||
| 
						 | 
					830a468a23 | ||
| 
						 | 
					af3ca7b4a9 | ||
| 
						 | 
					7a6bb17255 | ||
| 
						 | 
					bc6d459a6e | ||
| 
						 | 
					ff7f34e353 | ||
| 
						 | 
					2e3d79aaec | ||
| 
						 | 
					8a41bcc934 | ||
| 
						 | 
					e2414b41ad | ||
| 
						 | 
					266958bce7 | ||
| 
						 | 
					bc5354cbf0 | ||
| 
						 | 
					cc4997843e | ||
| 
						 | 
					ab95eac286 | ||
| 
						 | 
					1cd76233d1 | ||
| 
						 | 
					3d5afc8b83 | ||
| 
						 | 
					d28b7799dd | ||
| 
						 | 
					b0fb889c29 | ||
| 
						 | 
					460e80bd1d | ||
| 
						 | 
					bc1e96e942 | ||
| 
						 | 
					7ea61df414 | ||
| 
						 | 
					431712293d | ||
| 
						 | 
					335ed97263 | ||
| 
						 | 
					e00b165e9b | ||
| 
						 | 
					5467ddf0e1 | ||
| 
						 | 
					7a37dd92ed | ||
| 
						 | 
					d0c11e9d72 | ||
| 
						 | 
					5ec52fee2c | ||
| 
						 | 
					5026bc13bb | ||
| 
						 | 
					c7d27e5247 | ||
| 
						 | 
					b7d7af7ea9 | ||
| 
						 | 
					39663d2c40 | ||
| 
						 | 
					000299a0e6 | ||
| 
						 | 
					0a47d82b9b | ||
| 
						 | 
					198bcece58 | ||
| 
						 | 
					053677d124 | ||
| 
						 | 
					804072f014 | ||
| 
						 | 
					e9429b43ce | ||
| 
						 | 
					3d37d5e24a | ||
| 
						 | 
					2728a1b4f3 | ||
| 
						 | 
					adb040d4cb | ||
| 
						 | 
					479d7934c0 | ||
| 
						 | 
					22d1acd5ac | ||
| 
						 | 
					b257c152c6 | ||
| 
						 | 
					77b97ee0d7 | ||
| 
						 | 
					e2ac4732cd | ||
| 
						 | 
					e8f665b495 | ||
| 
						 | 
					55f3ef29ea | ||
| 
						 | 
					c2d78c9623 | ||
| 
						 | 
					a4578a5413 | ||
| 
						 | 
					e884fcf785 | ||
| 
						 | 
					a2c32e2d7f | ||
| 
						 | 
					80b168a5a9 | ||
| 
						 | 
					e96025755d | ||
| 
						 | 
					9426364be9 | ||
| 
						 | 
					c9028b0ab5 | ||
| 
						 | 
					b4d2858f95 | ||
| 
						 | 
					dea446d995 | ||
| 
						 | 
					5cd94f9e9d | ||
| 
						 | 
					429168e7ee | ||
| 
						 | 
					499fca2db3 | ||
| 
						 | 
					cad811fc41 | ||
| 
						 | 
					a28a5d9c62 | ||
| 
						 | 
					3f791ca818 | ||
| 
						 | 
					69f6a9f007 | ||
| 
						 | 
					4eeee0c59f | ||
| 
						 | 
					a5afa6c95f | ||
| 
						 | 
					625dacb93d | ||
| 
						 | 
					62e9c2e091 | ||
| 
						 | 
					e4106a4e24 | ||
| 
						 | 
					0ebfcc8f92 | ||
| 
						 | 
					c61f571ce0 | ||
| 
						 | 
					a506b8c7dd | ||
| 
						 | 
					e5cd536894 | ||
| 
						 | 
					60192e96b8 | ||
| 
						 | 
					629ea39a88 | ||
| 
						 | 
					7d9e1321c7 | ||
| 
						 | 
					83af7422a0 | ||
| 
						 | 
					ce8945f35c | ||
| 
						 | 
					dd890f0776 | ||
| 
						 | 
					af4ac437ab | ||
| 
						 | 
					85991994df | ||
| 
						 | 
					607585fdaf | ||
| 
						 | 
					b325518f45 | ||
| 
						 | 
					2f596aeef5 | ||
| 
						 | 
					b172dec864 | ||
| 
						 | 
					69762c75fa | ||
| 
						 | 
					61391e2314 | ||
| 
						 | 
					36b29660ce | ||
| 
						 | 
					4976983f30 | ||
| 
						 | 
					4b23506594 | ||
| 
						 | 
					31e4ad25ba | ||
| 
						 | 
					225f4daf15 | ||
| 
						 | 
					82d3dda8a1 | ||
| 
						 | 
					b9927cfa2d | ||
| 
						 | 
					fe8bf9560d | ||
| 
						 | 
					af6cafc603 | ||
| 
						 | 
					e4c9b85e65 | ||
| 
						 | 
					447aa49007 | ||
| 
						 | 
					15da07d436 | ||
| 
						 | 
					fe977f7512 | ||
| 
						 | 
					886ed3544b | ||
| 
						 | 
					e476f94212 | ||
| 
						 | 
					aff2922f9a | ||
| 
						 | 
					bbbd67108f | ||
| 
						 | 
					f32e0035a3 | ||
| 
						 | 
					7f246621b5 | ||
| 
						 | 
					b67d988915 | ||
| 
						 | 
					7b1e7706d8 | ||
| 
						 | 
					cd74dda72a | ||
| 
						 | 
					851e31ff07 | ||
| 
						 | 
					032bb2a2c5 | ||
| 
						 | 
					decc9ffc18 | ||
| 
						 | 
					fa96ed06d2 | ||
| 
						 | 
					43133041c9 | ||
| 
						 | 
					e0ee5ea962 | ||
| 
						 | 
					3f4657d131 | ||
| 
						 | 
					f5634286a3 | ||
| 
						 | 
					97d37c1c1e | ||
| 
						 | 
					739b139cb2 | ||
| 
						 | 
					0bc9920ad4 | ||
| 
						 | 
					3f516ce837 | ||
| 
						 | 
					67ffa18cce | ||
| 
						 | 
					9f197f9da5 | ||
| 
						 | 
					3dc2cc36e9 | ||
| 
						 | 
					788e67e227 | ||
| 
						 | 
					ca3e683747 | ||
| 
						 | 
					c50226594d | ||
| 
						 | 
					38a1757168 | ||
| 
						 | 
					51ff6bde38 | ||
| 
						 | 
					4104a57107 | ||
| 
						 | 
					28e4fe34e4 | ||
| 
						 | 
					c800a070b5 | ||
| 
						 | 
					b0c0f20071 | ||
| 
						 | 
					53d8996764 | ||
| 
						 | 
					32b1843ec6 | ||
| 
						 | 
					8712009778 | ||
| 
						 | 
					b8994f44e7 | ||
| 
						 | 
					f468e3824a | ||
| 
						 | 
					ea1b02db6a | ||
| 
						 | 
					2c4b354d32 | ||
| 
						 | 
					25a66ee3cb | ||
| 
						 | 
					0978dec131 | ||
| 
						 | 
					91b17fbad4 | ||
| 
						 | 
					ce92b6eb9c | ||
| 
						 | 
					7abbffc3fb | ||
| 
						 | 
					9dd8405341 | ||
| 
						 | 
					46a643763d | ||
| 
						 | 
					92c4468572 | ||
| 
						 | 
					10cde5010d | ||
| 
						 | 
					c4cd925cc0 | ||
| 
						 | 
					f210eb7b89 | ||
| 
						 | 
					734540f887 | ||
| 
						 | 
					804515425a | ||
| 
						 | 
					81a86fcf17 | ||
| 
						 | 
					a534bb09d3 | ||
| 
						 | 
					b6995add5c | ||
| 
						 | 
					8ccd06c66c | ||
| 
						 | 
					fe86616c72 | ||
| 
						 | 
					ba2ba27008 | ||
| 
						 | 
					f795123c4a | ||
| 
						 | 
					c596c795bf | ||
| 
						 | 
					3f19bbf4e3 | ||
| 
						 | 
					b874ce4dc2 | ||
| 
						 | 
					c6c2e3135d | ||
| 
						 | 
					4b26fe30de | ||
| 
						 | 
					4a8224b598 | ||
| 
						 | 
					8afca8d9c6 | ||
| 
						 | 
					35e8510e60 | ||
| 
						 | 
					8b15c74018 | ||
| 
						 | 
					3afa6cf866 | ||
| 
						 | 
					e19e549041 | ||
| 
						 | 
					d7561ac576 | ||
| 
						 | 
					7870774162 | ||
| 
						 | 
					fbeaa3c47d | ||
| 
						 | 
					ee2262b8d7 | ||
| 
						 | 
					b0ac0a8ef8 | ||
| 
						 | 
					0f4499360e | ||
| 
						 | 
					7dc17a6cf0 | ||
| 
						 | 
					b6223d2f70 | ||
| 
						 | 
					4213cdaf5d | ||
| 
						 | 
					39b4c974ee | ||
| 
						 | 
					256b5d5877 | ||
| 
						 | 
					508f56f17c | ||
| 
						 | 
					5d0d60e2f5 | ||
| 
						 | 
					57ee007035 | ||
| 
						 | 
					82e8cb403a | ||
| 
						 | 
					abee01c6f8 | ||
| 
						 | 
					48665b7c99 | ||
| 
						 | 
					2c288b2a7e | ||
| 
						 | 
					831721ef49 | ||
| 
						 | 
					51971f7293 | ||
| 
						 | 
					3d3addb252 | ||
| 
						 | 
					3f8bdd1fdb | ||
| 
						 | 
					6181fd949f | ||
| 
						 | 
					afd61c63c2 | ||
| 
						 | 
					9a2073b4cd | ||
| 
						 | 
					f28468188b | ||
| 
						 | 
					8871d87512 | ||
| 
						 | 
					a2b81188be | ||
| 
						 | 
					f91f6cd5e4 | ||
| 
						 | 
					bd923a7bac | ||
| 
						 | 
					373c88faef | ||
| 
						 | 
					14813d8123 | ||
| 
						 | 
					92f2437f48 | ||
| 
						 | 
					da959761ff | ||
| 
						 | 
					d8cd25aa0d | ||
| 
						 | 
					d63d4f46fc | ||
| 
						 | 
					52161e090d | ||
| 
						 | 
					9e55e06501 | ||
| 
						 | 
					0b6df67fb1 | ||
| 
						 | 
					bf087e1ea1 | ||
| 
						 | 
					885818fb7c | ||
| 
						 | 
					2f370048cb | ||
| 
						 | 
					28dc02a9d8 | ||
| 
						 | 
					54ebaca535 | ||
| 
						 | 
					4fedc91a4a | ||
| 
						 | 
					f734aaa413 | ||
| 
						 | 
					a575d4b9ee | ||
| 
						 | 
					77a87ded3a | ||
| 
						 | 
					b958d2c298 | ||
| 
						 | 
					dc72a195c2 | ||
| 
						 | 
					e2812ff61f | ||
| 
						 | 
					8c2e34e27f | ||
| 
						 | 
					31f3950fbf | ||
| 
						 | 
					75b3654d18 | ||
| 
						 | 
					418f9ac5e3 | ||
| 
						 | 
					ad4afe4edf | ||
| 
						 | 
					c844b971cb | ||
| 
						 | 
					ca9b1c47af | ||
| 
						 | 
					86039d2751 | ||
| 
						 | 
					420a692f04 | ||
| 
						 | 
					1d2a464fe0 | ||
| 
						 | 
					7735dd0750 | ||
| 
						 | 
					bf7b075f0c | 
							
								
								
									
										773
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										773
									
								
								CHANGES
									
									
									
									
									
								
							@@ -2,7 +2,562 @@
 | 
			
		||||
 OpenSSL CHANGES
 | 
			
		||||
 _______________
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7g and 0.9.8  [xx XXX xxxx]
 | 
			
		||||
 Changes between 0.9.8g and 0.9.8h  [28 May 2008]
 | 
			
		||||
 | 
			
		||||
  *) Fix flaw if 'Server Key exchange message' is omitted from a TLS
 | 
			
		||||
     handshake which could lead to a cilent crash as found using the
 | 
			
		||||
     Codenomicon TLS test suite (CVE-2008-1672) 
 | 
			
		||||
     [Steve Henson, Mark Cox]
 | 
			
		||||
 | 
			
		||||
  *) Fix double free in TLS server name extensions which could lead to
 | 
			
		||||
     a remote crash found by Codenomicon TLS test suite (CVE-2008-0891) 
 | 
			
		||||
     [Joe Orton]
 | 
			
		||||
 | 
			
		||||
  *) Clear error queue in SSL_CTX_use_certificate_chain_file()
 | 
			
		||||
 | 
			
		||||
     Clear the error queue to ensure that error entries left from
 | 
			
		||||
     older function calls do not interfere with the correct operation.
 | 
			
		||||
     [Lutz Jaenicke, Erik de Castro Lopo]
 | 
			
		||||
 | 
			
		||||
  *) Remove root CA certificates of commercial CAs:
 | 
			
		||||
 | 
			
		||||
     The OpenSSL project does not recommend any specific CA and does not
 | 
			
		||||
     have any policy with respect to including or excluding any CA.
 | 
			
		||||
     Therefore it does not make any sense to ship an arbitrary selection
 | 
			
		||||
     of root CA certificates with the OpenSSL software.
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) RSA OAEP patches to fix two separate invalid memory reads.
 | 
			
		||||
     The first one involves inputs when 'lzero' is greater than
 | 
			
		||||
     'SHA_DIGEST_LENGTH' (it would read about SHA_DIGEST_LENGTH bytes
 | 
			
		||||
     before the beginning of from). The second one involves inputs where
 | 
			
		||||
     the 'db' section contains nothing but zeroes (there is a one-byte
 | 
			
		||||
     invalid read after the end of 'db').
 | 
			
		||||
     [Ivan Nestlerode <inestlerode@us.ibm.com>]
 | 
			
		||||
 | 
			
		||||
  *) Partial backport from 0.9.9-dev:
 | 
			
		||||
 | 
			
		||||
     Introduce bn_mul_mont (dedicated Montgomery multiplication
 | 
			
		||||
     procedure) as a candidate for BIGNUM assembler implementation.
 | 
			
		||||
     While 0.9.9-dev uses assembler for various architectures, only
 | 
			
		||||
     x86_64 is available by default here in the 0.9.8 branch, and
 | 
			
		||||
     32-bit x86 is available through a compile-time setting.
 | 
			
		||||
 | 
			
		||||
     To try the 32-bit x86 assembler implementation, use Configure
 | 
			
		||||
     option "enable-montasm" (which exists only for this backport).
 | 
			
		||||
 | 
			
		||||
     As "enable-montasm" for 32-bit x86 disclaims code stability
 | 
			
		||||
     anyway, in this constellation we activate additional code
 | 
			
		||||
     backported from 0.9.9-dev for further performance improvements,
 | 
			
		||||
     namely BN_from_montgomery_word.  (To enable this otherwise,
 | 
			
		||||
     e.g. x86_64, try "-DMONT_FROM_WORD___NON_DEFAULT_0_9_8_BUILD".)
 | 
			
		||||
 | 
			
		||||
     [Andy Polyakov (backport partially by Bodo Moeller)]
 | 
			
		||||
 | 
			
		||||
  *) Add TLS session ticket callback. This allows an application to set
 | 
			
		||||
     TLS ticket cipher and HMAC keys rather than relying on hardcoded fixed
 | 
			
		||||
     values. This is useful for key rollover for example where several key
 | 
			
		||||
     sets may exist with different names.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Reverse ENGINE-internal logic for caching default ENGINE handles.
 | 
			
		||||
     This was broken until now in 0.9.8 releases, such that the only way
 | 
			
		||||
     a registered ENGINE could be used (assuming it initialises
 | 
			
		||||
     successfully on the host) was to explicitly set it as the default
 | 
			
		||||
     for the relevant algorithms. This is in contradiction with 0.9.7
 | 
			
		||||
     behaviour and the documentation. With this fix, when an ENGINE is
 | 
			
		||||
     registered into a given algorithm's table of implementations, the
 | 
			
		||||
     'uptodate' flag is reset so that auto-discovery will be used next
 | 
			
		||||
     time a new context for that algorithm attempts to select an
 | 
			
		||||
     implementation.
 | 
			
		||||
     [Ian Lister (tweaked by Geoff Thorpe)]
 | 
			
		||||
 | 
			
		||||
  *) Backport of CMS code to OpenSSL 0.9.8. This differs from the 0.9.9
 | 
			
		||||
     implemention in the following ways:
 | 
			
		||||
 | 
			
		||||
     Lack of EVP_PKEY_ASN1_METHOD means algorithm parameters have to be
 | 
			
		||||
     hard coded.
 | 
			
		||||
 | 
			
		||||
     Lack of BER streaming support means one pass streaming processing is
 | 
			
		||||
     only supported if data is detached: setting the streaming flag is
 | 
			
		||||
     ignored for embedded content.
 | 
			
		||||
 | 
			
		||||
     CMS support is disabled by default and must be explicitly enabled
 | 
			
		||||
     with the enable-cms configuration option.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Update the GMP engine glue to do direct copies between BIGNUM and
 | 
			
		||||
     mpz_t when openssl and GMP use the same limb size. Otherwise the
 | 
			
		||||
     existing "conversion via a text string export" trick is still used.
 | 
			
		||||
     [Paul Sheer <paulsheer@gmail.com>]
 | 
			
		||||
 | 
			
		||||
  *) Zlib compression BIO. This is a filter BIO which compressed and
 | 
			
		||||
     uncompresses any data passed through it.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add AES_wrap_key() and AES_unwrap_key() functions to implement
 | 
			
		||||
     RFC3394 compatible AES key wrapping.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add utility functions to handle ASN1 structures. ASN1_STRING_set0():
 | 
			
		||||
     sets string data without copying. X509_ALGOR_set0() and
 | 
			
		||||
     X509_ALGOR_get0(): set and retrieve X509_ALGOR (AlgorithmIdentifier)
 | 
			
		||||
     data. Attribute function X509at_get0_data_by_OBJ(): retrieves data
 | 
			
		||||
     from an X509_ATTRIBUTE structure optionally checking it occurs only
 | 
			
		||||
     once. ASN1_TYPE_set1(): set and ASN1_TYPE structure copying supplied
 | 
			
		||||
     data.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Fix BN flag handling in RSA_eay_mod_exp() and BN_MONT_CTX_set()
 | 
			
		||||
     to get the expected BN_FLG_CONSTTIME behavior.
 | 
			
		||||
     [Bodo Moeller (Google)]
 | 
			
		||||
  
 | 
			
		||||
  *) Netware support:
 | 
			
		||||
 | 
			
		||||
     - fixed wrong usage of ioctlsocket() when build for LIBC BSD sockets
 | 
			
		||||
     - fixed do_tests.pl to run the test suite with CLIB builds too (CLIB_OPT)
 | 
			
		||||
     - added some more tests to do_tests.pl
 | 
			
		||||
     - fixed RunningProcess usage so that it works with newer LIBC NDKs too
 | 
			
		||||
     - removed usage of BN_LLONG for CLIB builds to avoid runtime dependency
 | 
			
		||||
     - added new Configure targets netware-clib-bsdsock, netware-clib-gcc,
 | 
			
		||||
       netware-clib-bsdsock-gcc, netware-libc-bsdsock-gcc
 | 
			
		||||
     - various changes to netware.pl to enable gcc-cross builds on Win32
 | 
			
		||||
       platform
 | 
			
		||||
     - changed crypto/bio/b_sock.c to work with macro functions (CLIB BSD)
 | 
			
		||||
     - various changes to fix missing prototype warnings
 | 
			
		||||
     - fixed x86nasm.pl to create correct asm files for NASM COFF output
 | 
			
		||||
     - added AES, WHIRLPOOL and CPUID assembler code to build files
 | 
			
		||||
     - added missing AES assembler make rules to mk1mf.pl
 | 
			
		||||
     - fixed order of includes in apps/ocsp.c so that e_os.h settings apply
 | 
			
		||||
     [Guenter Knauf <eflash@gmx.net>]
 | 
			
		||||
 | 
			
		||||
  *) Implement certificate status request TLS extension defined in RFC3546.
 | 
			
		||||
     A client can set the appropriate parameters and receive the encoded
 | 
			
		||||
     OCSP response via a callback. A server can query the supplied parameters
 | 
			
		||||
     and set the encoded OCSP response in the callback. Add simplified examples
 | 
			
		||||
     to s_client and s_server.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8f and 0.9.8g  [19 Oct 2007]
 | 
			
		||||
 | 
			
		||||
  *) Fix various bugs:
 | 
			
		||||
     + Binary incompatibility of ssl_ctx_st structure
 | 
			
		||||
     + DTLS interoperation with non-compliant servers
 | 
			
		||||
     + Don't call get_session_cb() without proposed session
 | 
			
		||||
     + Fix ia64 assembler code
 | 
			
		||||
     [Andy Polyakov, Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8e and 0.9.8f  [11 Oct 2007]
 | 
			
		||||
 | 
			
		||||
  *) DTLS Handshake overhaul. There were longstanding issues with
 | 
			
		||||
     OpenSSL DTLS implementation, which were making it impossible for
 | 
			
		||||
     RFC 4347 compliant client to communicate with OpenSSL server.
 | 
			
		||||
     Unfortunately just fixing these incompatibilities would "cut off"
 | 
			
		||||
     pre-0.9.8f clients. To allow for hassle free upgrade post-0.9.8e
 | 
			
		||||
     server keeps tolerating non RFC compliant syntax. The opposite is
 | 
			
		||||
     not true, 0.9.8f client can not communicate with earlier server.
 | 
			
		||||
     This update even addresses CVE-2007-4995.
 | 
			
		||||
     [Andy Polyakov]
 | 
			
		||||
 | 
			
		||||
  *) Changes to avoid need for function casts in OpenSSL: some compilers
 | 
			
		||||
     (gcc 4.2 and later) reject their use.
 | 
			
		||||
     [Kurt Roeckx <kurt@roeckx.be>, Peter Hartley <pdh@utter.chaos.org.uk>,
 | 
			
		||||
      Steve Henson]
 | 
			
		||||
  
 | 
			
		||||
  *) Add RFC4507 support to OpenSSL. This includes the corrections in
 | 
			
		||||
     RFC4507bis. The encrypted ticket format is an encrypted encoded
 | 
			
		||||
     SSL_SESSION structure, that way new session features are automatically
 | 
			
		||||
     supported.
 | 
			
		||||
 | 
			
		||||
     If a client application caches session in an SSL_SESSION structure
 | 
			
		||||
     support is transparent because tickets are now stored in the encoded
 | 
			
		||||
     SSL_SESSION.
 | 
			
		||||
     
 | 
			
		||||
     The SSL_CTX structure automatically generates keys for ticket
 | 
			
		||||
     protection in servers so again support should be possible
 | 
			
		||||
     with no application modification.
 | 
			
		||||
 | 
			
		||||
     If a client or server wishes to disable RFC4507 support then the option
 | 
			
		||||
     SSL_OP_NO_TICKET can be set.
 | 
			
		||||
 | 
			
		||||
     Add a TLS extension debugging callback to allow the contents of any client
 | 
			
		||||
     or server extensions to be examined.
 | 
			
		||||
 | 
			
		||||
     This work was sponsored by Google.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add initial support for TLS extensions, specifically for the server_name
 | 
			
		||||
     extension so far.  The SSL_SESSION, SSL_CTX, and SSL data structures now
 | 
			
		||||
     have new members for a host name.  The SSL data structure has an
 | 
			
		||||
     additional member SSL_CTX *initial_ctx so that new sessions can be
 | 
			
		||||
     stored in that context to allow for session resumption, even after the
 | 
			
		||||
     SSL has been switched to a new SSL_CTX in reaction to a client's
 | 
			
		||||
     server_name extension.
 | 
			
		||||
 | 
			
		||||
     New functions (subject to change):
 | 
			
		||||
 | 
			
		||||
         SSL_get_servername()
 | 
			
		||||
         SSL_get_servername_type()
 | 
			
		||||
         SSL_set_SSL_CTX()
 | 
			
		||||
 | 
			
		||||
     New CTRL codes and macros (subject to change):
 | 
			
		||||
 | 
			
		||||
         SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
 | 
			
		||||
                                 - SSL_CTX_set_tlsext_servername_callback()
 | 
			
		||||
         SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG
 | 
			
		||||
                                      - SSL_CTX_set_tlsext_servername_arg()
 | 
			
		||||
         SSL_CTRL_SET_TLSEXT_HOSTNAME           - SSL_set_tlsext_host_name()
 | 
			
		||||
 | 
			
		||||
     openssl s_client has a new '-servername ...' option.
 | 
			
		||||
 | 
			
		||||
     openssl s_server has new options '-servername_host ...', '-cert2 ...',
 | 
			
		||||
     '-key2 ...', '-servername_fatal' (subject to change).  This allows
 | 
			
		||||
     testing the HostName extension for a specific single host name ('-cert'
 | 
			
		||||
     and '-key' remain fallbacks for handshakes without HostName
 | 
			
		||||
     negotiation).  If the unrecogninzed_name alert has to be sent, this by
 | 
			
		||||
     default is a warning; it becomes fatal with the '-servername_fatal'
 | 
			
		||||
     option.
 | 
			
		||||
 | 
			
		||||
     [Peter Sylvester,  Remy Allais, Christophe Renou, Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add AES and SSE2 assembly language support to VC++ build.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Mitigate attack on final subtraction in Montgomery reduction.
 | 
			
		||||
     [Andy Polyakov]
 | 
			
		||||
 | 
			
		||||
  *) Fix crypto/ec/ec_mult.c to work properly with scalars of value 0
 | 
			
		||||
     (which previously caused an internal error).
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Squeeze another 10% out of IGE mode when in != out.
 | 
			
		||||
     [Ben Laurie]
 | 
			
		||||
 | 
			
		||||
  *) AES IGE mode speedup.
 | 
			
		||||
     [Dean Gaudet (Google)]
 | 
			
		||||
 | 
			
		||||
  *) Add the Korean symmetric 128-bit cipher SEED (see
 | 
			
		||||
     http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp) and
 | 
			
		||||
     add SEED ciphersuites from RFC 4162:
 | 
			
		||||
 | 
			
		||||
        TLS_RSA_WITH_SEED_CBC_SHA      =  "SEED-SHA"
 | 
			
		||||
        TLS_DHE_DSS_WITH_SEED_CBC_SHA  =  "DHE-DSS-SEED-SHA"
 | 
			
		||||
        TLS_DHE_RSA_WITH_SEED_CBC_SHA  =  "DHE-RSA-SEED-SHA"
 | 
			
		||||
        TLS_DH_anon_WITH_SEED_CBC_SHA  =  "ADH-SEED-SHA"
 | 
			
		||||
 | 
			
		||||
     To minimize changes between patchlevels in the OpenSSL 0.9.8
 | 
			
		||||
     series, SEED remains excluded from compilation unless OpenSSL
 | 
			
		||||
     is configured with 'enable-seed'.
 | 
			
		||||
     [KISA, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Mitigate branch prediction attacks, which can be practical if a
 | 
			
		||||
     single processor is shared, allowing a spy process to extract
 | 
			
		||||
     information.  For detailed background information, see
 | 
			
		||||
     http://eprint.iacr.org/2007/039 (O. Aciicmez, S. Gueron,
 | 
			
		||||
     J.-P. Seifert, "New Branch Prediction Vulnerabilities in OpenSSL
 | 
			
		||||
     and Necessary Software Countermeasures").  The core of the change
 | 
			
		||||
     are new versions BN_div_no_branch() and
 | 
			
		||||
     BN_mod_inverse_no_branch() of BN_div() and BN_mod_inverse(),
 | 
			
		||||
     respectively, which are slower, but avoid the security-relevant
 | 
			
		||||
     conditional branches.  These are automatically called by BN_div()
 | 
			
		||||
     and BN_mod_inverse() if the flag BN_FLG_CONSTTIME is set for one
 | 
			
		||||
     of the input BIGNUMs.  Also, BN_is_bit_set() has been changed to
 | 
			
		||||
     remove a conditional branch.
 | 
			
		||||
 | 
			
		||||
     BN_FLG_CONSTTIME is the new name for the previous
 | 
			
		||||
     BN_FLG_EXP_CONSTTIME flag, since it now affects more than just
 | 
			
		||||
     modular exponentiation.  (Since OpenSSL 0.9.7h, setting this flag
 | 
			
		||||
     in the exponent causes BN_mod_exp_mont() to use the alternative
 | 
			
		||||
     implementation in BN_mod_exp_mont_consttime().)  The old name
 | 
			
		||||
     remains as a deprecated alias.
 | 
			
		||||
 | 
			
		||||
     Similary, RSA_FLAG_NO_EXP_CONSTTIME is replaced by a more general
 | 
			
		||||
     RSA_FLAG_NO_CONSTTIME flag since the RSA implementation now uses
 | 
			
		||||
     constant-time implementations for more than just exponentiation.
 | 
			
		||||
     Here too the old name is kept as a deprecated alias.
 | 
			
		||||
 | 
			
		||||
     BN_BLINDING_new() will now use BN_dup() for the modulus so that
 | 
			
		||||
     the BN_BLINDING structure gets an independent copy of the
 | 
			
		||||
     modulus.  This means that the previous "BIGNUM *m" argument to
 | 
			
		||||
     BN_BLINDING_new() and to BN_BLINDING_create_param() now
 | 
			
		||||
     essentially becomes "const BIGNUM *m", although we can't actually
 | 
			
		||||
     change this in the header file before 0.9.9.  It allows
 | 
			
		||||
     RSA_setup_blinding() to use BN_with_flags() on the modulus to
 | 
			
		||||
     enable BN_FLG_CONSTTIME.
 | 
			
		||||
 | 
			
		||||
     [Matthew D Wood (Intel Corp)]
 | 
			
		||||
 | 
			
		||||
  *) In the SSL/TLS server implementation, be strict about session ID
 | 
			
		||||
     context matching (which matters if an application uses a single
 | 
			
		||||
     external cache for different purposes).  Previously,
 | 
			
		||||
     out-of-context reuse was forbidden only if SSL_VERIFY_PEER was
 | 
			
		||||
     set.  This did ensure strict client verification, but meant that,
 | 
			
		||||
     with applications using a single external cache for quite
 | 
			
		||||
     different requirements, clients could circumvent ciphersuite
 | 
			
		||||
     restrictions for a given session ID context by starting a session
 | 
			
		||||
     in a different context.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Include "!eNULL" in SSL_DEFAULT_CIPHER_LIST to make sure that
 | 
			
		||||
     a ciphersuite string such as "DEFAULT:RSA" cannot enable
 | 
			
		||||
     authentication-only ciphersuites.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Update the SSL_get_shared_ciphers() fix CVE-2006-3738 which was
 | 
			
		||||
     not complete and could lead to a possible single byte overflow
 | 
			
		||||
     (CVE-2007-5135) [Ben Laurie]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8d and 0.9.8e  [23 Feb 2007]
 | 
			
		||||
 | 
			
		||||
  *) Since AES128 and AES256 (and similarly Camellia128 and
 | 
			
		||||
     Camellia256) share a single mask bit in the logic of
 | 
			
		||||
     ssl/ssl_ciph.c, the code for masking out disabled ciphers needs a
 | 
			
		||||
     kludge to work properly if AES128 is available and AES256 isn't
 | 
			
		||||
     (or if Camellia128 is available and Camellia256 isn't).
 | 
			
		||||
     [Victor Duchovni]
 | 
			
		||||
 | 
			
		||||
  *) Fix the BIT STRING encoding generated by crypto/ec/ec_asn1.c
 | 
			
		||||
     (within i2d_ECPrivateKey, i2d_ECPKParameters, i2d_ECParameters):
 | 
			
		||||
     When a point or a seed is encoded in a BIT STRING, we need to
 | 
			
		||||
     prevent the removal of trailing zero bits to get the proper DER
 | 
			
		||||
     encoding.  (By default, crypto/asn1/a_bitstr.c assumes the case
 | 
			
		||||
     of a NamedBitList, for which trailing 0 bits need to be removed.)
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Have SSL/TLS server implementation tolerate "mismatched" record
 | 
			
		||||
     protocol version while receiving ClientHello even if the
 | 
			
		||||
     ClientHello is fragmented.  (The server can't insist on the
 | 
			
		||||
     particular protocol version it has chosen before the ServerHello
 | 
			
		||||
     message has informed the client about his choice.)
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Add RFC 3779 support.
 | 
			
		||||
     [Rob Austein for ARIN, Ben Laurie]
 | 
			
		||||
 | 
			
		||||
  *) Load error codes if they are not already present instead of using a
 | 
			
		||||
     static variable. This allows them to be cleanly unloaded and reloaded.
 | 
			
		||||
     Improve header file function name parsing.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) extend SMTP and IMAP protocol emulation in s_client to use EHLO
 | 
			
		||||
     or CAPABILITY handshake as required by RFCs.
 | 
			
		||||
     [Goetz Babin-Ebell]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8c and 0.9.8d  [28 Sep 2006]
 | 
			
		||||
 | 
			
		||||
  *) Introduce limits to prevent malicious keys being able to
 | 
			
		||||
     cause a denial of service.  (CVE-2006-2940)
 | 
			
		||||
     [Steve Henson, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Fix ASN.1 parsing of certain invalid structures that can result
 | 
			
		||||
     in a denial of service.  (CVE-2006-2937)  [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Fix buffer overflow in SSL_get_shared_ciphers() function. 
 | 
			
		||||
     (CVE-2006-3738) [Tavis Ormandy and Will Drewry, Google Security Team]
 | 
			
		||||
 | 
			
		||||
  *) Fix SSL client code which could crash if connecting to a
 | 
			
		||||
     malicious SSLv2 server.  (CVE-2006-4343)
 | 
			
		||||
     [Tavis Ormandy and Will Drewry, Google Security Team]
 | 
			
		||||
 | 
			
		||||
  *) Since 0.9.8b, ciphersuite strings naming explicit ciphersuites
 | 
			
		||||
     match only those.  Before that, "AES256-SHA" would be interpreted
 | 
			
		||||
     as a pattern and match "AES128-SHA" too (since AES128-SHA got
 | 
			
		||||
     the same strength classification in 0.9.7h) as we currently only
 | 
			
		||||
     have a single AES bit in the ciphersuite description bitmap.
 | 
			
		||||
     That change, however, also applied to ciphersuite strings such as
 | 
			
		||||
     "RC4-MD5" that intentionally matched multiple ciphersuites --
 | 
			
		||||
     namely, SSL 2.0 ciphersuites in addition to the more common ones
 | 
			
		||||
     from SSL 3.0/TLS 1.0.
 | 
			
		||||
 | 
			
		||||
     So we change the selection algorithm again: Naming an explicit
 | 
			
		||||
     ciphersuite selects this one ciphersuite, and any other similar
 | 
			
		||||
     ciphersuite (same bitmap) from *other* protocol versions.
 | 
			
		||||
     Thus, "RC4-MD5" again will properly select both the SSL 2.0
 | 
			
		||||
     ciphersuite and the SSL 3.0/TLS 1.0 ciphersuite.
 | 
			
		||||
 | 
			
		||||
     Since SSL 2.0 does not have any ciphersuites for which the
 | 
			
		||||
     128/256 bit distinction would be relevant, this works for now.
 | 
			
		||||
     The proper fix will be to use different bits for AES128 and
 | 
			
		||||
     AES256, which would have avoided the problems from the beginning;
 | 
			
		||||
     however, bits are scarce, so we can only do this in a new release
 | 
			
		||||
     (not just a patchlevel) when we can change the SSL_CIPHER
 | 
			
		||||
     definition to split the single 'unsigned long mask' bitmap into
 | 
			
		||||
     multiple values to extend the available space.
 | 
			
		||||
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8b and 0.9.8c  [05 Sep 2006]
 | 
			
		||||
 | 
			
		||||
  *) Avoid PKCS #1 v1.5 signature attack discovered by Daniel Bleichenbacher
 | 
			
		||||
     (CVE-2006-4339)  [Ben Laurie and Google Security Team]
 | 
			
		||||
 | 
			
		||||
  *) Add AES IGE and biIGE modes.
 | 
			
		||||
     [Ben Laurie]
 | 
			
		||||
 | 
			
		||||
  *) Change the Unix randomness entropy gathering to use poll() when
 | 
			
		||||
     possible instead of select(), since the latter has some
 | 
			
		||||
     undesirable limitations.
 | 
			
		||||
     [Darryl Miles via Richard Levitte and Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Disable "ECCdraft" ciphersuites more thoroughly.  Now special
 | 
			
		||||
     treatment in ssl/ssl_ciph.s makes sure that these ciphersuites
 | 
			
		||||
     cannot be implicitly activated as part of, e.g., the "AES" alias.
 | 
			
		||||
     However, please upgrade to OpenSSL 0.9.9[-dev] for
 | 
			
		||||
     non-experimental use of the ECC ciphersuites to get TLS extension
 | 
			
		||||
     support, which is required for curve and point format negotiation
 | 
			
		||||
     to avoid potential handshake problems.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Disable rogue ciphersuites:
 | 
			
		||||
 | 
			
		||||
      - SSLv2 0x08 0x00 0x80 ("RC4-64-MD5")
 | 
			
		||||
      - SSLv3/TLSv1 0x00 0x61 ("EXP1024-RC2-CBC-MD5")
 | 
			
		||||
      - SSLv3/TLSv1 0x00 0x60 ("EXP1024-RC4-MD5")
 | 
			
		||||
 | 
			
		||||
     The latter two were purportedly from
 | 
			
		||||
     draft-ietf-tls-56-bit-ciphersuites-0[01].txt, but do not really
 | 
			
		||||
     appear there.
 | 
			
		||||
 | 
			
		||||
     Also deactivate the remaining ciphersuites from
 | 
			
		||||
     draft-ietf-tls-56-bit-ciphersuites-01.txt.  These are just as
 | 
			
		||||
     unofficial, and the ID has long expired.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Fix RSA blinding Heisenbug (problems sometimes occured on
 | 
			
		||||
     dual-core machines) and other potential thread-safety issues.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Add the symmetric cipher Camellia (128-bit, 192-bit, 256-bit key
 | 
			
		||||
     versions), which is now available for royalty-free use
 | 
			
		||||
     (see http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html).
 | 
			
		||||
     Also, add Camellia TLS ciphersuites from RFC 4132.
 | 
			
		||||
 | 
			
		||||
     To minimize changes between patchlevels in the OpenSSL 0.9.8
 | 
			
		||||
     series, Camellia remains excluded from compilation unless OpenSSL
 | 
			
		||||
     is configured with 'enable-camellia'.
 | 
			
		||||
     [NTT]
 | 
			
		||||
 | 
			
		||||
  *) Disable the padding bug check when compression is in use. The padding
 | 
			
		||||
     bug check assumes the first packet is of even length, this is not
 | 
			
		||||
     necessarily true if compresssion is enabled and can result in false
 | 
			
		||||
     positives causing handshake failure. The actual bug test is ancient
 | 
			
		||||
     code so it is hoped that implementations will either have fixed it by
 | 
			
		||||
     now or any which still have the bug do not support compression.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8a and 0.9.8b  [04 May 2006]
 | 
			
		||||
 | 
			
		||||
  *) When applying a cipher rule check to see if string match is an explicit
 | 
			
		||||
     cipher suite and only match that one cipher suite if it is.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Link in manifests for VC++ if needed.
 | 
			
		||||
     [Austin Ziegler <halostatue@gmail.com>]
 | 
			
		||||
 | 
			
		||||
  *) Update support for ECC-based TLS ciphersuites according to
 | 
			
		||||
     draft-ietf-tls-ecc-12.txt with proposed changes (but without
 | 
			
		||||
     TLS extensions, which are supported starting with the 0.9.9
 | 
			
		||||
     branch, not in the OpenSSL 0.9.8 branch).
 | 
			
		||||
     [Douglas Stebila]
 | 
			
		||||
 | 
			
		||||
  *) New functions EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free() to support
 | 
			
		||||
     opaque EVP_CIPHER_CTX handling.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Fixes and enhancements to zlib compression code. We now only use
 | 
			
		||||
     "zlib1.dll" and use the default __cdecl calling convention on Win32
 | 
			
		||||
     to conform with the standards mentioned here:
 | 
			
		||||
           http://www.zlib.net/DLL_FAQ.txt
 | 
			
		||||
     Static zlib linking now works on Windows and the new --with-zlib-include
 | 
			
		||||
     --with-zlib-lib options to Configure can be used to supply the location
 | 
			
		||||
     of the headers and library. Gracefully handle case where zlib library
 | 
			
		||||
     can't be loaded.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Several fixes and enhancements to the OID generation code. The old code
 | 
			
		||||
     sometimes allowed invalid OIDs (1.X for X >= 40 for example), couldn't
 | 
			
		||||
     handle numbers larger than ULONG_MAX, truncated printing and had a
 | 
			
		||||
     non standard OBJ_obj2txt() behaviour.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add support for building of engines under engine/ as shared libraries
 | 
			
		||||
     under VC++ build system.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Corrected the numerous bugs in the Win32 path splitter in DSO.
 | 
			
		||||
     Hopefully, we will not see any false combination of paths any more.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.8 and 0.9.8a  [11 Oct 2005]
 | 
			
		||||
 | 
			
		||||
  *) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING
 | 
			
		||||
     (part of SSL_OP_ALL).  This option used to disable the
 | 
			
		||||
     countermeasure against man-in-the-middle protocol-version
 | 
			
		||||
     rollback in the SSL 2.0 server implementation, which is a bad
 | 
			
		||||
     idea.  (CVE-2005-2969)
 | 
			
		||||
 | 
			
		||||
     [Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center
 | 
			
		||||
     for Information Security, National Institute of Advanced Industrial
 | 
			
		||||
     Science and Technology [AIST], Japan)]
 | 
			
		||||
 | 
			
		||||
  *) Add two function to clear and return the verify parameter flags.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Keep cipherlists sorted in the source instead of sorting them at
 | 
			
		||||
     runtime, thus removing the need for a lock.
 | 
			
		||||
     [Nils Larsch]
 | 
			
		||||
 | 
			
		||||
  *) Avoid some small subgroup attacks in Diffie-Hellman.
 | 
			
		||||
     [Nick Mathewson and Ben Laurie]
 | 
			
		||||
 | 
			
		||||
  *) Add functions for well-known primes.
 | 
			
		||||
     [Nick Mathewson]
 | 
			
		||||
 | 
			
		||||
  *) Extended Windows CE support.
 | 
			
		||||
     [Satoshi Nakamura and Andy Polyakov]
 | 
			
		||||
 | 
			
		||||
  *) Initialize SSL_METHOD structures at compile time instead of during
 | 
			
		||||
     runtime, thus removing the need for a lock.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Make PKCS7_decrypt() work even if no certificate is supplied by
 | 
			
		||||
     attempting to decrypt each encrypted key in turn. Add support to
 | 
			
		||||
     smime utility.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7h and 0.9.8  [05 Jul 2005]
 | 
			
		||||
 | 
			
		||||
  [NB: OpenSSL 0.9.7i and later 0.9.7 patch levels were released after
 | 
			
		||||
  OpenSSL 0.9.8.]
 | 
			
		||||
 | 
			
		||||
  *) Add libcrypto.pc and libssl.pc for those who feel they need them.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change CA.sh and CA.pl so they don't bundle the CSR and the private
 | 
			
		||||
     key into the same file any more.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add initial support for Win64, both IA64 and AMD64/x64 flavors.
 | 
			
		||||
     [Andy Polyakov]
 | 
			
		||||
 | 
			
		||||
  *) Add -utf8 command line and config file option to 'ca'.
 | 
			
		||||
     [Stefan <stf@udoma.org]
 | 
			
		||||
 | 
			
		||||
  *) Removed the macro des_crypt(), as it seems to conflict with some
 | 
			
		||||
     libraries.  Use DES_crypt().
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Correct naming of the 'chil' and '4758cca' ENGINEs. This
 | 
			
		||||
     involves renaming the source and generated shared-libs for
 | 
			
		||||
     both. The engines will accept the corrected or legacy ids
 | 
			
		||||
     ('ncipher' and '4758_cca' respectively) when binding. NB,
 | 
			
		||||
     this only applies when building 'shared'.
 | 
			
		||||
     [Corinna Vinschen <vinschen@redhat.com> and Geoff Thorpe]
 | 
			
		||||
 | 
			
		||||
  *) Add attribute functions to EVP_PKEY structure. Modify
 | 
			
		||||
     PKCS12_create() to recognize a CSP name attribute and
 | 
			
		||||
     use it. Make -CSP option work again in pkcs12 utility.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add new functionality to the bn blinding code:
 | 
			
		||||
     - automatic re-creation of the BN_BLINDING parameters after
 | 
			
		||||
@@ -774,14 +1329,14 @@
 | 
			
		||||
  *) Include some named elliptic curves, and add OIDs from X9.62,
 | 
			
		||||
     SECG, and WAP/WTLS.  Each curve can be obtained from the new
 | 
			
		||||
     function
 | 
			
		||||
          EC_GROUP_new_by_nid(),
 | 
			
		||||
          EC_GROUP_new_by_curve_name(),
 | 
			
		||||
     and the list of available named curves can be obtained with
 | 
			
		||||
          EC_get_builtin_curves().
 | 
			
		||||
     Also add a 'curve_name' member to EC_GROUP objects, which can be
 | 
			
		||||
     accessed via
 | 
			
		||||
         EC_GROUP_set_nid()
 | 
			
		||||
         EC_GROUP_get_nid()
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
 | 
			
		||||
         EC_GROUP_set_curve_name()
 | 
			
		||||
         EC_GROUP_get_curve_name()
 | 
			
		||||
     [Nils Larsch <larsch@trustcenter.de, Bodo Moeller]
 | 
			
		||||
 
 | 
			
		||||
  *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
 | 
			
		||||
     was actually never needed) and in BN_mul().  The removal in BN_mul()
 | 
			
		||||
@@ -792,7 +1347,182 @@
 | 
			
		||||
     differing sizes.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7g and 0.9.7h  [XX xxx XXXX]
 | 
			
		||||
 Changes between 0.9.7m and 0.9.7n  [xx XXX xxxx]
 | 
			
		||||
 | 
			
		||||
  *) In the SSL/TLS server implementation, be strict about session ID
 | 
			
		||||
     context matching (which matters if an application uses a single
 | 
			
		||||
     external cache for different purposes).  Previously,
 | 
			
		||||
     out-of-context reuse was forbidden only if SSL_VERIFY_PEER was
 | 
			
		||||
     set.  This did ensure strict client verification, but meant that,
 | 
			
		||||
     with applications using a single external cache for quite
 | 
			
		||||
     different requirements, clients could circumvent ciphersuite
 | 
			
		||||
     restrictions for a given session ID context by starting a session
 | 
			
		||||
     in a different context.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7l and 0.9.7m  [23 Feb 2007]
 | 
			
		||||
 | 
			
		||||
  *) Cleanse PEM buffers before freeing them since they may contain 
 | 
			
		||||
     sensitive data.
 | 
			
		||||
     [Benjamin Bennett <ben@psc.edu>]
 | 
			
		||||
 | 
			
		||||
  *) Include "!eNULL" in SSL_DEFAULT_CIPHER_LIST to make sure that
 | 
			
		||||
     a ciphersuite string such as "DEFAULT:RSA" cannot enable
 | 
			
		||||
     authentication-only ciphersuites.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Since AES128 and AES256 share a single mask bit in the logic of
 | 
			
		||||
     ssl/ssl_ciph.c, the code for masking out disabled ciphers needs a
 | 
			
		||||
     kludge to work properly if AES128 is available and AES256 isn't.
 | 
			
		||||
     [Victor Duchovni]
 | 
			
		||||
 | 
			
		||||
  *) Expand security boundary to match 1.1.1 module.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Remove redundant features: hash file source, editing of test vectors
 | 
			
		||||
     modify fipsld to use external fips_premain.c signature.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) New perl script mkfipsscr.pl to create shell scripts or batch files to
 | 
			
		||||
     run algorithm test programs.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Make algorithm test programs more tolerant of whitespace.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Have SSL/TLS server implementation tolerate "mismatched" record
 | 
			
		||||
     protocol version while receiving ClientHello even if the
 | 
			
		||||
     ClientHello is fragmented.  (The server can't insist on the
 | 
			
		||||
     particular protocol version it has chosen before the ServerHello
 | 
			
		||||
     message has informed the client about his choice.)
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Load error codes if they are not already present instead of using a
 | 
			
		||||
     static variable. This allows them to be cleanly unloaded and reloaded.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7k and 0.9.7l  [28 Sep 2006]
 | 
			
		||||
 | 
			
		||||
  *) Introduce limits to prevent malicious keys being able to
 | 
			
		||||
     cause a denial of service.  (CVE-2006-2940)
 | 
			
		||||
     [Steve Henson, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Fix ASN.1 parsing of certain invalid structures that can result
 | 
			
		||||
     in a denial of service.  (CVE-2006-2937)  [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Fix buffer overflow in SSL_get_shared_ciphers() function. 
 | 
			
		||||
     (CVE-2006-3738) [Tavis Ormandy and Will Drewry, Google Security Team]
 | 
			
		||||
 | 
			
		||||
  *) Fix SSL client code which could crash if connecting to a
 | 
			
		||||
     malicious SSLv2 server.  (CVE-2006-4343)
 | 
			
		||||
     [Tavis Ormandy and Will Drewry, Google Security Team]
 | 
			
		||||
 | 
			
		||||
  *) Change ciphersuite string processing so that an explicit
 | 
			
		||||
     ciphersuite selects this one ciphersuite (so that "AES256-SHA"
 | 
			
		||||
     will no longer include "AES128-SHA"), and any other similar
 | 
			
		||||
     ciphersuite (same bitmap) from *other* protocol versions (so that
 | 
			
		||||
     "RC4-MD5" will still include both the SSL 2.0 ciphersuite and the
 | 
			
		||||
     SSL 3.0/TLS 1.0 ciphersuite).  This is a backport combining
 | 
			
		||||
     changes from 0.9.8b and 0.9.8d.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7j and 0.9.7k  [05 Sep 2006]
 | 
			
		||||
 | 
			
		||||
  *) Avoid PKCS #1 v1.5 signature attack discovered by Daniel Bleichenbacher
 | 
			
		||||
     (CVE-2006-4339)  [Ben Laurie and Google Security Team]
 | 
			
		||||
 | 
			
		||||
  *) Change the Unix randomness entropy gathering to use poll() when
 | 
			
		||||
     possible instead of select(), since the latter has some
 | 
			
		||||
     undesirable limitations.
 | 
			
		||||
     [Darryl Miles via Richard Levitte and Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Disable rogue ciphersuites:
 | 
			
		||||
 | 
			
		||||
      - SSLv2 0x08 0x00 0x80 ("RC4-64-MD5")
 | 
			
		||||
      - SSLv3/TLSv1 0x00 0x61 ("EXP1024-RC2-CBC-MD5")
 | 
			
		||||
      - SSLv3/TLSv1 0x00 0x60 ("EXP1024-RC4-MD5")
 | 
			
		||||
 | 
			
		||||
     The latter two were purportedly from
 | 
			
		||||
     draft-ietf-tls-56-bit-ciphersuites-0[01].txt, but do not really
 | 
			
		||||
     appear there.
 | 
			
		||||
 | 
			
		||||
     Also deactive the remaining ciphersuites from
 | 
			
		||||
     draft-ietf-tls-56-bit-ciphersuites-01.txt.  These are just as
 | 
			
		||||
     unofficial, and the ID has long expired.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Fix RSA blinding Heisenbug (problems sometimes occured on
 | 
			
		||||
     dual-core machines) and other potential thread-safety issues.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7i and 0.9.7j  [04 May 2006]
 | 
			
		||||
 | 
			
		||||
  *) Adapt fipsld and the build system to link against the validated FIPS
 | 
			
		||||
     module in FIPS mode.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Fixes for VC++ 2005 build under Windows.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add new Windows build target VC-32-GMAKE for VC++. This uses GNU make 
 | 
			
		||||
     from a Windows bash shell such as MSYS. It is autodetected from the
 | 
			
		||||
     "config" script when run from a VC++ environment. Modify standard VC++
 | 
			
		||||
     build to use fipscanister.o from the GNU make build. 
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7h and 0.9.7i  [14 Oct 2005]
 | 
			
		||||
 | 
			
		||||
  *) Wrapped the definition of EVP_MAX_MD_SIZE in a #ifdef OPENSSL_FIPS.
 | 
			
		||||
     The value now differs depending on if you build for FIPS or not.
 | 
			
		||||
     BEWARE!  A program linked with a shared FIPSed libcrypto can't be
 | 
			
		||||
     safely run with a non-FIPSed libcrypto, as it may crash because of
 | 
			
		||||
     the difference induced by this change.
 | 
			
		||||
     [Andy Polyakov]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7g and 0.9.7h  [11 Oct 2005]
 | 
			
		||||
 | 
			
		||||
  *) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING
 | 
			
		||||
     (part of SSL_OP_ALL).  This option used to disable the
 | 
			
		||||
     countermeasure against man-in-the-middle protocol-version
 | 
			
		||||
     rollback in the SSL 2.0 server implementation, which is a bad
 | 
			
		||||
     idea.  (CVE-2005-2969)
 | 
			
		||||
 | 
			
		||||
     [Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center
 | 
			
		||||
     for Information Security, National Institute of Advanced Industrial
 | 
			
		||||
     Science and Technology [AIST], Japan)]
 | 
			
		||||
 | 
			
		||||
  *) Minimal support for X9.31 signatures and PSS padding modes. This is
 | 
			
		||||
     mainly for FIPS compliance and not fully integrated at this stage.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) For DSA signing, unless DSA_FLAG_NO_EXP_CONSTTIME is set, perform
 | 
			
		||||
     the exponentiation using a fixed-length exponent.  (Otherwise,
 | 
			
		||||
     the information leaked through timing could expose the secret key
 | 
			
		||||
     after many signatures; cf. Bleichenbacher's attack on DSA with
 | 
			
		||||
     biased k.)
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Make a new fixed-window mod_exp implementation the default for
 | 
			
		||||
     RSA, DSA, and DH private-key operations so that the sequence of
 | 
			
		||||
     squares and multiplies and the memory access pattern are
 | 
			
		||||
     independent of the particular secret key.  This will mitigate
 | 
			
		||||
     cache-timing and potential related attacks.
 | 
			
		||||
 | 
			
		||||
     BN_mod_exp_mont_consttime() is the new exponentiation implementation,
 | 
			
		||||
     and this is automatically used by BN_mod_exp_mont() if the new flag
 | 
			
		||||
     BN_FLG_EXP_CONSTTIME is set for the exponent.  RSA, DSA, and DH
 | 
			
		||||
     will use this BN flag for private exponents unless the flag
 | 
			
		||||
     RSA_FLAG_NO_EXP_CONSTTIME, DSA_FLAG_NO_EXP_CONSTTIME, or
 | 
			
		||||
     DH_FLAG_NO_EXP_CONSTTIME, respectively, is set.
 | 
			
		||||
 | 
			
		||||
     [Matthew D Wood (Intel Corp), with some changes by Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Change the client implementation for SSLv23_method() and
 | 
			
		||||
     SSLv23_client_method() so that is uses the SSL 3.0/TLS 1.0
 | 
			
		||||
     Client Hello message format if the SSL_OP_NO_SSLv2 option is set.
 | 
			
		||||
     (Previously, the SSL 2.0 backwards compatible Client Hello
 | 
			
		||||
     message format would be used even with SSL_OP_NO_SSLv2.)
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Add support for smime-type MIME parameter in S/MIME messages which some
 | 
			
		||||
     clients need.
 | 
			
		||||
@@ -810,6 +1540,9 @@
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7f and 0.9.7g  [11 Apr 2005]
 | 
			
		||||
 | 
			
		||||
  [NB: OpenSSL 0.9.7h and later 0.9.7 patch levels were released after
 | 
			
		||||
  OpenSSL 0.9.8.]
 | 
			
		||||
 | 
			
		||||
  *) Fixes for newer kerberos headers. NB: the casts are needed because
 | 
			
		||||
     the 'length' field is signed on one version and unsigned on another
 | 
			
		||||
     with no (?) obvious way to tell the difference, without these VC++
 | 
			
		||||
@@ -917,11 +1650,11 @@
 | 
			
		||||
 Changes between 0.9.7c and 0.9.7d  [17 Mar 2004]
 | 
			
		||||
 | 
			
		||||
  *) Fix null-pointer assignment in do_change_cipher_spec() revealed           
 | 
			
		||||
     by using the Codenomicon TLS Test Tool (CAN-2004-0079)                    
 | 
			
		||||
     by using the Codenomicon TLS Test Tool (CVE-2004-0079)                    
 | 
			
		||||
     [Joe Orton, Steve Henson]   
 | 
			
		||||
 | 
			
		||||
  *) Fix flaw in SSL/TLS handshaking when using Kerberos ciphersuites
 | 
			
		||||
     (CAN-2004-0112)
 | 
			
		||||
     (CVE-2004-0112)
 | 
			
		||||
     [Joe Orton, Steve Henson]   
 | 
			
		||||
 | 
			
		||||
  *) Make it possible to have multiple active certificates with the same
 | 
			
		||||
@@ -964,9 +1697,9 @@
 | 
			
		||||
  *) Fix various bugs revealed by running the NISCC test suite:
 | 
			
		||||
 | 
			
		||||
     Stop out of bounds reads in the ASN1 code when presented with
 | 
			
		||||
     invalid tags (CAN-2003-0543 and CAN-2003-0544).
 | 
			
		||||
     invalid tags (CVE-2003-0543 and CVE-2003-0544).
 | 
			
		||||
     
 | 
			
		||||
     Free up ASN1_TYPE correctly if ANY type is invalid (CAN-2003-0545).
 | 
			
		||||
     Free up ASN1_TYPE correctly if ANY type is invalid (CVE-2003-0545).
 | 
			
		||||
 | 
			
		||||
     If verify callback ignores invalid public key errors don't try to check
 | 
			
		||||
     certificate signature with the NULL public key.
 | 
			
		||||
@@ -1051,7 +1784,7 @@
 | 
			
		||||
     via timing by performing a MAC computation even if incorrrect
 | 
			
		||||
     block cipher padding has been found.  This is a countermeasure
 | 
			
		||||
     against active attacks where the attacker has to distinguish
 | 
			
		||||
     between bad padding and a MAC verification error. (CAN-2003-0078)
 | 
			
		||||
     between bad padding and a MAC verification error. (CVE-2003-0078)
 | 
			
		||||
 | 
			
		||||
     [Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
 | 
			
		||||
     Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
 | 
			
		||||
@@ -1268,7 +2001,7 @@
 | 
			
		||||
 | 
			
		||||
     Remote buffer overflow in SSL3 protocol - an attacker could
 | 
			
		||||
     supply an oversized master key in Kerberos-enabled versions.
 | 
			
		||||
     (CAN-2002-0657)
 | 
			
		||||
     (CVE-2002-0657)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Change the SSL kerb5 codes to match RFC 2712.
 | 
			
		||||
@@ -2952,7 +3685,7 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
 Changes between 0.9.6l and 0.9.6m  [17 Mar 2004]
 | 
			
		||||
 | 
			
		||||
  *) Fix null-pointer assignment in do_change_cipher_spec() revealed
 | 
			
		||||
     by using the Codenomicon TLS Test Tool (CAN-2004-0079)
 | 
			
		||||
     by using the Codenomicon TLS Test Tool (CVE-2004-0079)
 | 
			
		||||
     [Joe Orton, Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6k and 0.9.6l  [04 Nov 2003]
 | 
			
		||||
@@ -2960,7 +3693,7 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
  *) Fix additional bug revealed by the NISCC test suite:
 | 
			
		||||
 | 
			
		||||
     Stop bug triggering large recursion when presented with
 | 
			
		||||
     certain ASN.1 tags (CAN-2003-0851)
 | 
			
		||||
     certain ASN.1 tags (CVE-2003-0851)
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6j and 0.9.6k  [30 Sep 2003]
 | 
			
		||||
@@ -2968,7 +3701,7 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
  *) Fix various bugs revealed by running the NISCC test suite:
 | 
			
		||||
 | 
			
		||||
     Stop out of bounds reads in the ASN1 code when presented with
 | 
			
		||||
     invalid tags (CAN-2003-0543 and CAN-2003-0544).
 | 
			
		||||
     invalid tags (CVE-2003-0543 and CVE-2003-0544).
 | 
			
		||||
     
 | 
			
		||||
     If verify callback ignores invalid public key errors don't try to check
 | 
			
		||||
     certificate signature with the NULL public key.
 | 
			
		||||
@@ -3020,7 +3753,7 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     via timing by performing a MAC computation even if incorrrect
 | 
			
		||||
     block cipher padding has been found.  This is a countermeasure
 | 
			
		||||
     against active attacks where the attacker has to distinguish
 | 
			
		||||
     between bad padding and a MAC verification error. (CAN-2003-0078)
 | 
			
		||||
     between bad padding and a MAC verification error. (CVE-2003-0078)
 | 
			
		||||
 | 
			
		||||
     [Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
 | 
			
		||||
     Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
 | 
			
		||||
@@ -3153,7 +3886,7 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
  *) Add various sanity checks to asn1_get_length() to reject
 | 
			
		||||
     the ASN1 length bytes if they exceed sizeof(long), will appear
 | 
			
		||||
     negative or the content length exceeds the length of the
 | 
			
		||||
     supplied buffer. (CAN-2002-0659)
 | 
			
		||||
     supplied buffer. (CVE-2002-0659)
 | 
			
		||||
     [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
 | 
			
		||||
 | 
			
		||||
  *) Assertions for various potential buffer overflows, not known to
 | 
			
		||||
@@ -3161,15 +3894,15 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Various temporary buffers to hold ASCII versions of integers were
 | 
			
		||||
     too small for 64 bit platforms. (CAN-2002-0655)
 | 
			
		||||
     too small for 64 bit platforms. (CVE-2002-0655)
 | 
			
		||||
     [Matthew Byng-Maddick <mbm@aldigital.co.uk> and Ben Laurie (CHATS)>
 | 
			
		||||
 | 
			
		||||
  *) Remote buffer overflow in SSL3 protocol - an attacker could
 | 
			
		||||
     supply an oversized session ID to a client. (CAN-2002-0656)
 | 
			
		||||
     supply an oversized session ID to a client. (CVE-2002-0656)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Remote buffer overflow in SSL2 protocol - an attacker could
 | 
			
		||||
     supply an oversized client master key. (CAN-2002-0656)
 | 
			
		||||
     supply an oversized client master key. (CVE-2002-0656)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6c and 0.9.6d  [9 May 2002]
 | 
			
		||||
 
 | 
			
		||||
@@ -133,14 +133,6 @@ be added to the end of this file.
 | 
			
		||||
 | 
			
		||||
	Whoops, forgot FIPS DES, also add EVPs for DES CFB1 and 8.
 | 
			
		||||
 | 
			
		||||
2003-07-31 23:30  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		Makefile.org (1.154.2.71), "Exp", lines: +2 -0
 | 
			
		||||
 | 
			
		||||
	If FDIRS is to be treated like SDIRS, let's not forget to
 | 
			
		||||
	initialize it in Makefile.org.
 | 
			
		||||
 | 
			
		||||
2003-08-01 12:25  ben
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
@@ -158,48 +150,6 @@ be added to the end of this file.
 | 
			
		||||
 | 
			
		||||
	DES CFB8 test.
 | 
			
		||||
 | 
			
		||||
2004-05-12 16:11  ben
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		crypto/rand/rand.h (1.26.2.8), "Exp", lines: +2 -0
 | 
			
		||||
		crypto/rand/rand_err.c (1.6.2.4), "Exp", lines: +2 -0
 | 
			
		||||
		fips/fingerprint.sha1 (1.1.2.5), "Exp", lines: +1 -1
 | 
			
		||||
		fips/fips.c (1.1.2.4), "Exp", lines: +5 -1
 | 
			
		||||
		fips/rand/fingerprint.sha1 (1.1.2.5), "Exp", lines: +1 -1
 | 
			
		||||
		fips/rand/fips_rand.c (1.1.2.5), "Exp", lines: +29 -0
 | 
			
		||||
 | 
			
		||||
	Blow up in people's faces if they don't reseed.
 | 
			
		||||
 | 
			
		||||
2004-06-21 20:05  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		Makefile.org (1.154.2.82), "Exp", lines: +3 -1
 | 
			
		||||
 | 
			
		||||
	Standard sh doesn't tolerate ! as part of the conditional command.
 | 
			
		||||
 | 
			
		||||
		PR: 900
 | 
			
		||||
 | 
			
		||||
2004-08-02 16:15  levitte [FIPS]
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		crypto/cryptlib.c (1.32.2.13), "Exp", lines: +4 -4
 | 
			
		||||
 | 
			
		||||
	Let's lock a write lock when changing values, shall we?
 | 
			
		||||
 | 
			
		||||
		Thanks to Dr Stephen Henson <shenson@drh-consultancy.co.uk>
 | 
			
		||||
	for making me aware of this error.
 | 
			
		||||
 | 
			
		||||
2005-03-15 10:46  appro [FIPS]
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		Makefile.org (1.154.2.96), "Exp", lines: +1 -1
 | 
			
		||||
		crypto/Makefile (1.1.4.6), "Exp", lines: +2 -3
 | 
			
		||||
		fips/Makefile (1.1.4.8), "Exp", lines: +4 -1
 | 
			
		||||
 | 
			
		||||
	Real Bourne shell doesn't accept ! as in "if ! grep ..." Fix this
 | 
			
		||||
	in crypto/Makefile and make Makefile.org and fips/Makefile more
 | 
			
		||||
	discreet.
 | 
			
		||||
 | 
			
		||||
2005-04-19 16:21  appro
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
 
 | 
			
		||||
@@ -141,6 +141,14 @@ This is the "FIPS"-related part.
 | 
			
		||||
 | 
			
		||||
	Missing files.
 | 
			
		||||
 | 
			
		||||
2003-07-31 23:30  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		Makefile.org (1.154.2.71), "Exp", lines: +2 -0
 | 
			
		||||
 | 
			
		||||
	If FDIRS is to be treated like SDIRS, let's not forget to
 | 
			
		||||
	initialize it in Makefile.org.
 | 
			
		||||
 | 
			
		||||
2003-07-31 23:41  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
@@ -580,6 +588,18 @@ This is the "FIPS"-related part.
 | 
			
		||||
 | 
			
		||||
	Ignore 'Makefile.save'
 | 
			
		||||
 | 
			
		||||
2004-05-12 16:11  ben
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		crypto/rand/rand.h (1.26.2.8), "Exp", lines: +2 -0
 | 
			
		||||
		crypto/rand/rand_err.c (1.6.2.4), "Exp", lines: +2 -0
 | 
			
		||||
		fips/fingerprint.sha1 (1.1.2.5), "Exp", lines: +1 -1
 | 
			
		||||
		fips/fips.c (1.1.2.4), "Exp", lines: +5 -1
 | 
			
		||||
		fips/rand/fingerprint.sha1 (1.1.2.5), "Exp", lines: +1 -1
 | 
			
		||||
		fips/rand/fips_rand.c (1.1.2.5), "Exp", lines: +29 -0
 | 
			
		||||
 | 
			
		||||
	Blow up in people's faces if they don't reseed.
 | 
			
		||||
 | 
			
		||||
2004-05-15 19:51  ben
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
@@ -746,6 +766,15 @@ This is the "FIPS"-related part.
 | 
			
		||||
 | 
			
		||||
		PR: 900
 | 
			
		||||
 | 
			
		||||
2004-06-21 20:05  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		Makefile.org (1.154.2.82), "Exp", lines: +3 -1
 | 
			
		||||
 | 
			
		||||
	Standard sh doesn't tolerate ! as part of the conditional command.
 | 
			
		||||
 | 
			
		||||
		PR: 900
 | 
			
		||||
 | 
			
		||||
2004-06-28 22:33  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
@@ -911,6 +940,16 @@ This is the "FIPS"-related part.
 | 
			
		||||
	rebuilt to use FIPS functionality will need to be recompiled in any
 | 
			
		||||
	case, thus not being a problem either.
 | 
			
		||||
 | 
			
		||||
2004-08-02 16:15  levitte
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		crypto/cryptlib.c (1.32.2.13), "Exp", lines: +4 -4
 | 
			
		||||
 | 
			
		||||
	Let's lock a write lock when changing values, shall we?
 | 
			
		||||
 | 
			
		||||
		Thanks to Dr Stephen Henson <shenson@drh-consultancy.co.uk>
 | 
			
		||||
	for making me aware of this error.
 | 
			
		||||
 | 
			
		||||
2004-08-05 20:11  steve
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
@@ -1240,6 +1279,17 @@ This is the "FIPS"-related part.
 | 
			
		||||
 | 
			
		||||
	In FIPS mode use SHA1 as default digest in x509 and req utilities.
 | 
			
		||||
 | 
			
		||||
2005-03-15 10:46  appro
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
		Makefile.org (1.154.2.96), "Exp", lines: +1 -1
 | 
			
		||||
		crypto/Makefile (1.1.4.6), "Exp", lines: +2 -3
 | 
			
		||||
		fips/Makefile (1.1.4.8), "Exp", lines: +4 -1
 | 
			
		||||
 | 
			
		||||
	Real Bourne shell doesn't accept ! as in "if ! grep ..." Fix this
 | 
			
		||||
	in crypto/Makefile and make Makefile.org and fips/Makefile more
 | 
			
		||||
	discreet.
 | 
			
		||||
 | 
			
		||||
2005-03-22 18:29  steve
 | 
			
		||||
 | 
			
		||||
	Changed:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										277
									
								
								Configure
									
									
									
									
									
								
							
							
						
						
									
										277
									
								
								Configure
									
									
									
									
									
								
							@@ -10,7 +10,7 @@ use strict;
 | 
			
		||||
 | 
			
		||||
# see INSTALL for instructions.
 | 
			
		||||
 | 
			
		||||
my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
 | 
			
		||||
my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [enable-montasm] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
 | 
			
		||||
 | 
			
		||||
# Options:
 | 
			
		||||
#
 | 
			
		||||
@@ -54,6 +54,8 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lx
 | 
			
		||||
# [no-]zlib     [don't] compile support for zlib compression.
 | 
			
		||||
# zlib-dynamic	Like "zlib", but the zlib library is expected to be a shared
 | 
			
		||||
#		library and will be loaded in run-time by the OpenSSL library.
 | 
			
		||||
# enable-montasm 0.9.8 branch only: enable Montgomery x86 assembler backport
 | 
			
		||||
#               from 0.9.9
 | 
			
		||||
# 386           generate 80386 code
 | 
			
		||||
# no-sse2	disables IA-32 SSE2 code, above option implies no-sse2
 | 
			
		||||
# no-<cipher>   build without specified algorithm (rsa, idea, rc5, ...)
 | 
			
		||||
@@ -114,12 +116,12 @@ my $tlib="-lnsl -lsocket";
 | 
			
		||||
my $bits1="THIRTY_TWO_BIT ";
 | 
			
		||||
my $bits2="SIXTY_FOUR_BIT ";
 | 
			
		||||
 | 
			
		||||
my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o:rm86-elf.o:r586-elf.o";
 | 
			
		||||
my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o";
 | 
			
		||||
my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o";
 | 
			
		||||
my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o MAYBE-MO86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o rc4_skey.o:rm86-elf.o:r586-elf.o";
 | 
			
		||||
my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o MAYBE-MO86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o rc4_skey.o:rm86-cof.o:r586-cof.o";
 | 
			
		||||
my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o MAYBE-MO86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o rc4_skey.o:rm86-out.o:r586-out.o";
 | 
			
		||||
 | 
			
		||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
 | 
			
		||||
my $ia64_asm=":ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
 | 
			
		||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o::";
 | 
			
		||||
my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o::";
 | 
			
		||||
 | 
			
		||||
my $no_asm="::::::::::";
 | 
			
		||||
 | 
			
		||||
@@ -155,17 +157,20 @@ my %table=(
 | 
			
		||||
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
			
		||||
"debug-bodo",	"gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
			
		||||
"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll",
 | 
			
		||||
"debug-steve",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
 | 
			
		||||
"debug-steve64", "gcc:-m64 -DL_ENDIAN -DTERMIO -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DOPENSSL_NO_DEPRECATED -g -pedantic -Wall -Werror -Wno-long-long -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-steve32", "gcc:-m32 -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DOPENSSL_NO_DEPRECATED -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-steve",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
 | 
			
		||||
"debug-steve-opt",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -O3 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
 | 
			
		||||
"debug-steve-linux-pseudo64",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT:${no_asm}:dlfcn:linux-shared",
 | 
			
		||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-geoff","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"dist",		"cc:-O::(unknown)::::::",
 | 
			
		||||
 | 
			
		||||
# Basic configs that should work on any (32 and less bit) box
 | 
			
		||||
@@ -173,10 +178,8 @@ my %table=(
 | 
			
		||||
"cc",		"cc:-O::(unknown)::::::",
 | 
			
		||||
 | 
			
		||||
####VOS Configurations
 | 
			
		||||
"vos-gcc","gcc:-b hppa1.1-stratus-vos -O3 -Wall -Wuninitialized -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
 | 
			
		||||
"debug-vos-gcc","gcc:-b hppa1.1-stratus-vos -O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
 | 
			
		||||
"vos-vcc","vcc:-b i386-stratus-vos -O3 -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map::${no_asm}:::::.so:",
 | 
			
		||||
"debug-vos-vcc","vcc:-b i386-stratus-vos -O0 -g -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map::${no_asm}:::::.so:",
 | 
			
		||||
"vos-gcc","gcc:-O3 -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DB_ENDIAN::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
 | 
			
		||||
"debug-vos-gcc","gcc:-O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DB_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
 | 
			
		||||
 | 
			
		||||
#### Solaris x86 with GNU C setups
 | 
			
		||||
# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it
 | 
			
		||||
@@ -184,7 +187,7 @@ my %table=(
 | 
			
		||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
 | 
			
		||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
 | 
			
		||||
# error message.
 | 
			
		||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# -shared -static-libgcc might appear controversial, but modules taken
 | 
			
		||||
# from static libgcc do not have relocations and linking them into our
 | 
			
		||||
# shared objects doesn't have any negative side-effects. On the contrary,
 | 
			
		||||
@@ -197,17 +200,17 @@ my %table=(
 | 
			
		||||
 
 | 
			
		||||
#### Solaris x86 with Sun C setups
 | 
			
		||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with GNU C setups
 | 
			
		||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc
 | 
			
		||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
####
 | 
			
		||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -mcpu=ultrasparc -pedantic -ansi -Wall -Wshadow -Wno-long-long -D__EXTENSIONS__ -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -mcpu=ultrasparc -pedantic -ansi -Wall -Wshadow -Wno-long-long -D__EXTENSIONS__ -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with Sun C setups
 | 
			
		||||
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
 | 
			
		||||
@@ -215,11 +218,11 @@ my %table=(
 | 
			
		||||
# SC5.0 note: Compiler common patch 107357-01 or later is required!
 | 
			
		||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
 | 
			
		||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
 | 
			
		||||
####
 | 
			
		||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8.o::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8plus.o::::md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 
 | 
			
		||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8.o::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8plus.o::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 
 | 
			
		||||
 | 
			
		||||
#### SunOS configs, assuming sparc for the gcc one.
 | 
			
		||||
#"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:${no_asm}::",
 | 
			
		||||
@@ -232,11 +235,11 @@ my %table=(
 | 
			
		||||
#### IRIX 6.x configs
 | 
			
		||||
# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
 | 
			
		||||
# './Configure irix-cc -o32' manually.
 | 
			
		||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT::mips3.o::::::::::dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT::mips3.o::::::::::dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# N64 ABI builds.
 | 
			
		||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::mips3.o::::::::::dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::mips3.o::::::::::dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### Unified HP-UX ANSI C configs.
 | 
			
		||||
# Special notes:
 | 
			
		||||
@@ -287,7 +290,7 @@ my %table=(
 | 
			
		||||
# with debugging of the following config.
 | 
			
		||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD64 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# GCC builds...
 | 
			
		||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT::ia64.o::aes-ia64.o:::sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux64-ia64-gcc","gcc:-mlp64 -O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:-fpic:-mlp64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 
 | 
			
		||||
 | 
			
		||||
# Legacy HPUX 9.X configs...
 | 
			
		||||
@@ -304,19 +307,11 @@ my %table=(
 | 
			
		||||
#
 | 
			
		||||
# - William Shakespeare, "Romeo & Juliet", Act II, scene II.
 | 
			
		||||
#
 | 
			
		||||
# There's also an alternate target available (which `config' will never
 | 
			
		||||
# select) called alpha-cc-rpath.  This target builds an RPATH into the
 | 
			
		||||
# shared libraries, which is very convenient on Tru64 since binaries
 | 
			
		||||
# linked against that shared library will automatically inherit that RPATH,
 | 
			
		||||
# and hence know where to look for the openssl libraries, even if they're in
 | 
			
		||||
# an odd place.
 | 
			
		||||
#
 | 
			
		||||
# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
 | 
			
		||||
#
 | 
			
		||||
"osf1-alpha-gcc", "gcc:-O3::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
 | 
			
		||||
"ofs1-alpha-cc",  "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
 | 
			
		||||
"tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:tru64-shared:::.so",
 | 
			
		||||
"alpha-cc-rpath", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:tru64-shared-rpath:::.so",
 | 
			
		||||
"osf1-alpha-cc",  "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
 | 
			
		||||
"tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
 | 
			
		||||
 | 
			
		||||
####
 | 
			
		||||
#### Variety of LINUX:-)
 | 
			
		||||
@@ -328,13 +323,13 @@ my %table=(
 | 
			
		||||
#### IA-32 targets...
 | 
			
		||||
"linux-ia32-icc",	"icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-elf",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
			
		||||
"linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
			
		||||
####
 | 
			
		||||
"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# -bpowerpc64-linux is transient option, -m64 should be the one to use...
 | 
			
		||||
"linux-ppc64",	"gcc:-bpowerpc64-linux -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-bpowerpc64-linux:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ppc64",	"gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64",	"gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-x86_64",	"gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
#### SPARC Linux setups
 | 
			
		||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
 | 
			
		||||
@@ -342,9 +337,9 @@ my %table=(
 | 
			
		||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
 | 
			
		||||
# -Wa,-Av8plus should do the trick no matter what.
 | 
			
		||||
"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# GCC 3.1 is a requirement
 | 
			
		||||
"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::md5-sparcv9.o::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
#### Alpha Linux with GNU C and Compaq C setups
 | 
			
		||||
# Special notes:
 | 
			
		||||
# - linux-alpha+bwx-gcc is ment to be used from ./config only. If you
 | 
			
		||||
@@ -374,11 +369,11 @@ my %table=(
 | 
			
		||||
# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
 | 
			
		||||
# simply *happens* to work around a compiler bug in gcc 3.3.3,
 | 
			
		||||
# triggered by RIPEMD160 code.
 | 
			
		||||
"BSD-sparc64",	"gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:::des_enc-sparc.o fcrypt_b.o:::md5-sparcv9.o::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"BSD-sparc64",	"gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"BSD-ia64",	"gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"BSD-x86_64",	"gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
"bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
"nextstep",	"cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"nextstep3.3",	"cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
@@ -405,21 +400,19 @@ my %table=(
 | 
			
		||||
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"sco3-gcc",  "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
 | 
			
		||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
 | 
			
		||||
"sco5-cc",  "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"sco5-gcc",  "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### IBM's AIX.
 | 
			
		||||
"aix3-cc",  "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 | 
			
		||||
"aix-gcc",  "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:",
 | 
			
		||||
"aix-gcc",  "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
 | 
			
		||||
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
 | 
			
		||||
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
 | 
			
		||||
# at build time. $OBJECT_MODE is respected at ./config stage!
 | 
			
		||||
"aix-cc",   "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
 | 
			
		||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
 | 
			
		||||
"aix-cc",   "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
 | 
			
		||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Cray T90 and similar (SDSC)
 | 
			
		||||
@@ -468,24 +461,19 @@ my %table=(
 | 
			
		||||
"OS390-Unix","c89.sh:-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H  -D_ALL_SOURCE::(unknown):::THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::",
 | 
			
		||||
 | 
			
		||||
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
 | 
			
		||||
"VC-WIN64I","cl::::WIN64I::SIXTY_FOUR_BIT EXPORT_VAR_AS_FN:${no_asm}:win32",
 | 
			
		||||
"VC-WIN64A","cl::::WIN64A::SIXTY_FOUR_BIT EXPORT_VAR_AS_FN:${no_asm}:win32",
 | 
			
		||||
"VC-WIN64I","cl::::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${no_asm}:win32",
 | 
			
		||||
"VC-WIN64A","cl::::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${no_asm}:win32",
 | 
			
		||||
 | 
			
		||||
# Visual C targets
 | 
			
		||||
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
 | 
			
		||||
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
 | 
			
		||||
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
 | 
			
		||||
"VC-WIN16","cl:::(unknown):WIN16::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
 | 
			
		||||
"VC-W31-16","cl:::(unknown):WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
			
		||||
"VC-W31-32","cl::::WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
 | 
			
		||||
"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
			
		||||
 | 
			
		||||
# Borland C++ 4.5
 | 
			
		||||
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32",
 | 
			
		||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
			
		||||
 | 
			
		||||
# MinGW
 | 
			
		||||
"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall -D_WIN32_WINNT=0x333:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin -shared:.dll.a",
 | 
			
		||||
"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall -D_WIN32_WINNT=0x333:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a",
 | 
			
		||||
 | 
			
		||||
# UWIN 
 | 
			
		||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
 | 
			
		||||
@@ -493,29 +481,39 @@ my %table=(
 | 
			
		||||
# Cygwin
 | 
			
		||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
 | 
			
		||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_coff_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
 | 
			
		||||
"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
 | 
			
		||||
"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
 | 
			
		||||
 | 
			
		||||
# NetWare from David Ward (dsward@novell.com) - requires MetroWerks NLM development tools
 | 
			
		||||
# NetWare from David Ward (dsward@novell.com)
 | 
			
		||||
# requires either MetroWerks NLM development tools, or gcc / nlmconv
 | 
			
		||||
# NetWare defaults socket bio to WinSock sockets. However,
 | 
			
		||||
# the builds can be configured to use BSD sockets instead.
 | 
			
		||||
# netware-clib => legacy CLib c-runtime support
 | 
			
		||||
"netware-clib", "mwccnlm:::::${x86_gcc_opts}:::",
 | 
			
		||||
"netware-clib", "mwccnlm::::::${x86_gcc_opts}::",
 | 
			
		||||
"netware-clib-bsdsock", "mwccnlm::::::${x86_gcc_opts}::",
 | 
			
		||||
"netware-clib-gcc", "i586-netware-gcc:-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYSNAME_NETWARE -O2 -Wall:::::${x86_gcc_opts}::",
 | 
			
		||||
"netware-clib-bsdsock-gcc", "i586-netware-gcc:-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYSNAME_NETWARE -O2 -Wall:::::${x86_gcc_opts}::",
 | 
			
		||||
# netware-libc => LibC/NKS support
 | 
			
		||||
"netware-libc", "mwccnlm:::::BN_LLONG ${x86_gcc_opts}:::",
 | 
			
		||||
"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall::::${x86_gcc_opts}:::",
 | 
			
		||||
"netware-libc", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
 | 
			
		||||
"netware-libc-bsdsock", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
 | 
			
		||||
"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::",
 | 
			
		||||
"netware-libc-bsdsock-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::",
 | 
			
		||||
 | 
			
		||||
# DJGPP
 | 
			
		||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
 | 
			
		||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
 | 
			
		||||
 | 
			
		||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 | 
			
		||||
"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::BN_LLONG::::",
 | 
			
		||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
 | 
			
		||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
 | 
			
		||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
 | 
			
		||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
 | 
			
		||||
"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o:::::::::::darwin-shared:-fPIC -fno-common::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:ppccpuid_osx64.o:osx_ppc64.o osx_ppc64-mont.o:::::sha1-ppc_osx64.o sha256-ppc_osx64.o sha512-ppc_osx64.o:::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -fno-common::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
 | 
			
		||||
##### A/UX
 | 
			
		||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
@@ -524,7 +522,7 @@ my %table=(
 | 
			
		||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
 | 
			
		||||
 | 
			
		||||
##### GNU Hurd
 | 
			
		||||
"hurd-x86",  "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
 | 
			
		||||
"hurd-x86",  "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
 | 
			
		||||
 | 
			
		||||
##### OS/2 EMX
 | 
			
		||||
"OS2-EMX", "gcc::::::::",
 | 
			
		||||
@@ -532,7 +530,7 @@ my %table=(
 | 
			
		||||
##### VxWorks for various targets
 | 
			
		||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::${no_asm}::::::ranlibmips:",
 | 
			
		||||
 | 
			
		||||
@@ -543,8 +541,9 @@ my %table=(
 | 
			
		||||
 | 
			
		||||
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
 | 
			
		||||
		    VC-NT VC-CE VC-WIN32
 | 
			
		||||
		    VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS
 | 
			
		||||
		    BC-32 BC-16 OS2-EMX netware-clib netware-libc);
 | 
			
		||||
		    BC-32 OS2-EMX
 | 
			
		||||
		    netware-clib netware-clib-bsdsock
 | 
			
		||||
		    netware-libc netware-libc-bsdsock);
 | 
			
		||||
 | 
			
		||||
my $idx = 0;
 | 
			
		||||
my $idx_cc = $idx++;
 | 
			
		||||
@@ -582,6 +581,8 @@ my $threads=0;
 | 
			
		||||
my $no_shared=0; # but "no-shared" is default
 | 
			
		||||
my $zlib=1;      # but "no-zlib" is default
 | 
			
		||||
my $no_krb5=0;   # but "no-krb5" is implied unless "--with-krb5-..." is used
 | 
			
		||||
my $no_rfc3779=1; # but "no-rfc3779" is default
 | 
			
		||||
my $montasm=1;   # but "no-montasm" is default
 | 
			
		||||
my $no_asm=0;
 | 
			
		||||
my $no_dso=0;
 | 
			
		||||
my $no_gmp=0;
 | 
			
		||||
@@ -601,7 +602,7 @@ my $des_enc="des_enc.o fcrypt_b.o";
 | 
			
		||||
my $aes_enc="aes_core.o aes_cbc.o";
 | 
			
		||||
my $bf_enc	="bf_enc.o";
 | 
			
		||||
my $cast_enc="c_enc.o";
 | 
			
		||||
my $rc4_enc="rc4_enc.o";
 | 
			
		||||
my $rc4_enc="rc4_enc.o rc4_skey.o";
 | 
			
		||||
my $rc5_enc="rc5_enc.o";
 | 
			
		||||
my $md5_obj="";
 | 
			
		||||
my $sha1_obj="";
 | 
			
		||||
@@ -614,10 +615,16 @@ my $perl;
 | 
			
		||||
# All of the following is disabled by default (RC5 was enabled before 0.9.8):
 | 
			
		||||
 | 
			
		||||
my %disabled = ( # "what"         => "comment"
 | 
			
		||||
		 "gmp"		  => "default",
 | 
			
		||||
                 "camellia"       => "default",
 | 
			
		||||
                 "cms"            => "default",
 | 
			
		||||
                 "gmp"            => "default",
 | 
			
		||||
                 "mdc2"           => "default",
 | 
			
		||||
                 "montasm"        => "default", # explicit option in 0.9.8 only (implicitly enabled in 0.9.9)
 | 
			
		||||
                 "rc5"            => "default",
 | 
			
		||||
                 "rfc3779"        => "default",
 | 
			
		||||
                 "seed"           => "default",
 | 
			
		||||
                 "shared"         => "default",
 | 
			
		||||
                 "tlsext"         => "default",
 | 
			
		||||
                 "zlib"           => "default",
 | 
			
		||||
                 "zlib-dynamic"   => "default"
 | 
			
		||||
               );
 | 
			
		||||
@@ -627,7 +634,7 @@ my %disabled = ( # "what"         => "comment"
 | 
			
		||||
# For symmetry, "disable-..." is a synonym for "no-...".
 | 
			
		||||
 | 
			
		||||
# This is what $depflags will look like with the above default:
 | 
			
		||||
my $default_depflags = "-DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 ";
 | 
			
		||||
my $default_depflags = "-DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT ";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
my $no_sse2=0;
 | 
			
		||||
@@ -711,7 +718,7 @@ PROCESS_ARGS:
 | 
			
		||||
				{
 | 
			
		||||
				while (<IN>)
 | 
			
		||||
					{
 | 
			
		||||
					chop;
 | 
			
		||||
					chomp;
 | 
			
		||||
					if (/^CONFIGURE_ARGS=(.*)/)
 | 
			
		||||
						{
 | 
			
		||||
						$argvstring=$1;
 | 
			
		||||
@@ -762,6 +769,14 @@ PROCESS_ARGS:
 | 
			
		||||
				{
 | 
			
		||||
				$withargs{"krb5-".$1}=$2;
 | 
			
		||||
				}
 | 
			
		||||
			elsif (/^--with-zlib-lib=(.*)$/)
 | 
			
		||||
				{
 | 
			
		||||
				$withargs{"zlib-lib"}=$1;
 | 
			
		||||
				}
 | 
			
		||||
			elsif (/^--with-zlib-include=(.*)$/)
 | 
			
		||||
				{
 | 
			
		||||
				$withargs{"zlib-include"}="-I$1";
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				print STDERR $usage;
 | 
			
		||||
@@ -775,7 +790,7 @@ PROCESS_ARGS:
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			die "target already defined - $target\n" if ($target ne "");
 | 
			
		||||
			die "target already defined - $target (offending arg: $_)\n" if ($target ne "");
 | 
			
		||||
			$target=$_;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
@@ -841,6 +856,10 @@ if (defined($disabled{"md5"}) || defined($disabled{"sha"})
 | 
			
		||||
	$disabled{"tls1"} = "forced";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if (defined($disabled{"tls1"}))
 | 
			
		||||
	{
 | 
			
		||||
	$disabled{"tlsext"} = "forced";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($target eq "TABLE") {
 | 
			
		||||
	foreach $target (sort keys %table) {
 | 
			
		||||
@@ -880,6 +899,10 @@ foreach (sort (keys %disabled))
 | 
			
		||||
		{ $no_shared = 1; }
 | 
			
		||||
	elsif (/^zlib$/)
 | 
			
		||||
		{ $zlib = 0; }
 | 
			
		||||
	elsif (/^montasm$/)
 | 
			
		||||
		{ $montasm = 0; }
 | 
			
		||||
	elsif (/^static-engine$/)
 | 
			
		||||
		{ }
 | 
			
		||||
	elsif (/^zlib-dynamic$/)
 | 
			
		||||
		{ }
 | 
			
		||||
	elsif (/^symlinks$/)
 | 
			
		||||
@@ -896,8 +919,8 @@ foreach (sort (keys %disabled))
 | 
			
		||||
			$openssl_other_defines .= "#define OPENSSL_NO_$ALGO\n";
 | 
			
		||||
			print " OPENSSL_NO_$ALGO";
 | 
			
		||||
		
 | 
			
		||||
			if (/^err$/)
 | 
			
		||||
				{ $flags .= "-DOPENSSL_NO_ERR "; }
 | 
			
		||||
			if (/^err$/)	{ $flags .= "-DOPENSSL_NO_ERR "; }
 | 
			
		||||
			elsif (/^asm$/)	{ $no_asm = 1; }
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
@@ -922,9 +945,10 @@ foreach (sort (keys %disabled))
 | 
			
		||||
 | 
			
		||||
my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 | 
			
		||||
 | 
			
		||||
$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin");
 | 
			
		||||
$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys());
 | 
			
		||||
 | 
			
		||||
$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
 | 
			
		||||
$exe_ext=".nlm" if ($target =~ /netware/);
 | 
			
		||||
$exe_ext=".pm"  if ($target =~ /vos/);
 | 
			
		||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
 | 
			
		||||
$prefix=$openssldir if $prefix eq "";
 | 
			
		||||
@@ -969,6 +993,11 @@ my $shared_extension = $fields[$idx_shared_extension];
 | 
			
		||||
my $ranlib = $fields[$idx_ranlib];
 | 
			
		||||
my $arflags = $fields[$idx_arflags];
 | 
			
		||||
 | 
			
		||||
# '%' in $lflags is used to split flags to "pre-" and post-flags
 | 
			
		||||
my ($prelflags,$postlflags)=split('%',$lflags);
 | 
			
		||||
if (defined($postlflags))	{ $lflags=$postlflags;  }
 | 
			
		||||
else				{ $lflags=$prelflags; undef $prelflags; }
 | 
			
		||||
 | 
			
		||||
my $no_shared_warn=0;
 | 
			
		||||
my $no_user_cflags=0;
 | 
			
		||||
 | 
			
		||||
@@ -1098,6 +1127,14 @@ if ($no_asm)
 | 
			
		||||
	$cpuid_obj=$bn_obj=$des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj="";
 | 
			
		||||
	$sha1_obj=$md5_obj=$rmd160_obj="";
 | 
			
		||||
	}
 | 
			
		||||
if ($montasm)
 | 
			
		||||
	{
 | 
			
		||||
	$bn_obj =~ s/MAYBE-MO86-/mo86-/;
 | 
			
		||||
	}
 | 
			
		||||
else
 | 
			
		||||
	{
 | 
			
		||||
	$bn_obj =~ s/MAYBE-MO86-[a-z.]*//;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if (!$no_shared)
 | 
			
		||||
	{
 | 
			
		||||
@@ -1138,21 +1175,31 @@ if (!$no_shared)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($no_shared)
 | 
			
		||||
if (!$IsMK1MF)
 | 
			
		||||
	{
 | 
			
		||||
	$openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n";
 | 
			
		||||
	}
 | 
			
		||||
else
 | 
			
		||||
	{
 | 
			
		||||
	$openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
 | 
			
		||||
	if ($no_shared)
 | 
			
		||||
		{
 | 
			
		||||
		$openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n";
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		$openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# Compiler fix-ups
 | 
			
		||||
if ($target =~ /icc$/)
 | 
			
		||||
$cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/);
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Platform fix-ups
 | 
			
		||||
#
 | 
			
		||||
if ($target =~ /\-icc$/)	# Intel C compiler
 | 
			
		||||
	{
 | 
			
		||||
	my($iccver)=`$cc -V 2>&1`;
 | 
			
		||||
	if ($iccver =~ /Version ([0-9]+)\./)	{ $iccver=$1; }
 | 
			
		||||
	else					{ $iccver=0;  }
 | 
			
		||||
	my $iccver=0;
 | 
			
		||||
	if (open(FD,"$cc -V 2>&1 |"))
 | 
			
		||||
		{
 | 
			
		||||
		while(<FD>) { $iccver=$1 if (/Version ([0-9]+)\./); }
 | 
			
		||||
		close(FD);
 | 
			
		||||
		}
 | 
			
		||||
	if ($iccver>=8)
 | 
			
		||||
		{
 | 
			
		||||
		# Eliminate unnecessary dependency from libirc.a. This is
 | 
			
		||||
@@ -1160,6 +1207,28 @@ if ($target =~ /icc$/)
 | 
			
		||||
		# apps/openssl can end up in endless loop upon startup...
 | 
			
		||||
		$cflags.=" -Dmemcpy=__builtin_memcpy -Dmemset=__builtin_memset";
 | 
			
		||||
		}
 | 
			
		||||
	if ($iccver>=9)
 | 
			
		||||
		{
 | 
			
		||||
		$cflags.=" -i-static";
 | 
			
		||||
		$cflags=~s/\-no_cpprt/-no-cpprt/;
 | 
			
		||||
		}
 | 
			
		||||
	if ($iccver>=10)
 | 
			
		||||
		{
 | 
			
		||||
		$cflags=~s/\-i\-static/-static-intel/;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# Unlike other OSes (like Solaris, Linux, Tru64, IRIX) BSD run-time
 | 
			
		||||
# linkers (tested OpenBSD, NetBSD and FreeBSD) "demand" RPATH set on
 | 
			
		||||
# .so objects. Apparently application RPATH is not global and does
 | 
			
		||||
# not apply to .so linked with other .so. Problem manifests itself
 | 
			
		||||
# when libssl.so fails to load libcrypto.so. One can argue that we
 | 
			
		||||
# should engrave this into Makefile.shared rules or into BSD-* config
 | 
			
		||||
# lines above. Meanwhile let's try to be cautious and pass -rpath to
 | 
			
		||||
# linker only when --prefix is not /usr.
 | 
			
		||||
if ($target =~ /^BSD\-/)
 | 
			
		||||
	{
 | 
			
		||||
	$shared_ldflag.=" -Wl,-rpath,\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($sys_id ne "")
 | 
			
		||||
@@ -1184,6 +1253,7 @@ $bn_obj = $bn_asm unless $bn_obj ne "";
 | 
			
		||||
# bn86* is the only one implementing bn_*_part_words
 | 
			
		||||
$cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn86/);
 | 
			
		||||
$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /bn86/);
 | 
			
		||||
$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /\-mont|mo86\-/);
 | 
			
		||||
 | 
			
		||||
$des_obj=$des_enc	unless ($des_obj =~ /\.o$/);
 | 
			
		||||
$bf_obj=$bf_enc		unless ($bf_obj =~ /\.o$/);
 | 
			
		||||
@@ -1196,7 +1266,7 @@ if ($sha1_obj =~ /\.o$/)
 | 
			
		||||
	$cflags.=" -DSHA1_ASM"   if ($sha1_obj =~ /sx86/ || $sha1_obj =~ /sha1/);
 | 
			
		||||
	$cflags.=" -DSHA256_ASM" if ($sha1_obj =~ /sha256/);
 | 
			
		||||
	$cflags.=" -DSHA512_ASM" if ($sha1_obj =~ /sha512/);
 | 
			
		||||
	if ($sha1_obj =~ /x86/)
 | 
			
		||||
	if ($sha1_obj =~ /sse2/)
 | 
			
		||||
	    {	if ($no_sse2)
 | 
			
		||||
		{   $sha1_obj =~ s/\S*sse2\S+//;        }
 | 
			
		||||
		elsif ($cflags !~ /OPENSSL_IA32_SSE2/)
 | 
			
		||||
@@ -1264,7 +1334,7 @@ print OUT "### Generated automatically from Makefile.org by Configure.\n\n";
 | 
			
		||||
my $sdirs=0;
 | 
			
		||||
while (<IN>)
 | 
			
		||||
	{
 | 
			
		||||
	chop;
 | 
			
		||||
	chomp;
 | 
			
		||||
	$sdirs = 1 if /^SDIRS=/;
 | 
			
		||||
	if ($sdirs) {
 | 
			
		||||
		my $dir;
 | 
			
		||||
@@ -1291,6 +1361,7 @@ while (<IN>)
 | 
			
		||||
	s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
 | 
			
		||||
	s/^CFLAG=.*$/CFLAG= $cflags/;
 | 
			
		||||
	s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
 | 
			
		||||
	s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/;
 | 
			
		||||
	s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
 | 
			
		||||
	s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
 | 
			
		||||
	s/^CPUID_OBJ=.*$/CPUID_OBJ= $cpuid_obj/;
 | 
			
		||||
@@ -1310,6 +1381,8 @@ while (<IN>)
 | 
			
		||||
	s/^PERL=.*/PERL= $perl/;
 | 
			
		||||
	s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
 | 
			
		||||
	s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
 | 
			
		||||
	s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/;
 | 
			
		||||
	s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/;
 | 
			
		||||
	s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
 | 
			
		||||
	s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/;
 | 
			
		||||
	s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared);
 | 
			
		||||
@@ -1576,7 +1649,7 @@ EOF
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# create the ms/version32.rc file if needed
 | 
			
		||||
if ($IsMK1MF) {
 | 
			
		||||
if ($IsMK1MF && ($target !~ /^netware/)) {
 | 
			
		||||
	my ($v1, $v2, $v3, $v4);
 | 
			
		||||
	if ($version_num =~ /(^[0-9a-f]{1})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i) {
 | 
			
		||||
		$v1=hex $1;
 | 
			
		||||
@@ -1804,3 +1877,11 @@ sub test_sanity
 | 
			
		||||
	print STDERR "No sanity errors detected!\n" if $errorcnt == 0;
 | 
			
		||||
	return $errorcnt;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# Attempt to detect MSYS environment
 | 
			
		||||
 | 
			
		||||
sub is_msys
 | 
			
		||||
	{
 | 
			
		||||
	return 1 if (exists $ENV{"TERM"} && $ENV{"TERM"} eq "msys");
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										139
									
								
								FAQ
									
									
									
									
									
								
							
							
						
						
									
										139
									
								
								FAQ
									
									
									
									
									
								
							@@ -31,6 +31,8 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Why does my browser give a warning about a mismatched hostname?
 | 
			
		||||
* How do I install a CA certificate into a browser?
 | 
			
		||||
* Why is OpenSSL x509 DN output not conformant to RFC2253?
 | 
			
		||||
* What is a "128 bit certificate"? Can I create one with OpenSSL?
 | 
			
		||||
* How can I set up a bundle of commercial root CA certificates?
 | 
			
		||||
 | 
			
		||||
[BUILD] Questions about building and testing OpenSSL
 | 
			
		||||
 | 
			
		||||
@@ -46,6 +48,9 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Why does the OpenSSL test suite fail on MacOS X?
 | 
			
		||||
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
 | 
			
		||||
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
 | 
			
		||||
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
 | 
			
		||||
* Why does compiler fail to compile sha512.c?
 | 
			
		||||
* Test suite still fails, what to do?
 | 
			
		||||
 | 
			
		||||
[PROG] Questions about programming with OpenSSL
 | 
			
		||||
 | 
			
		||||
@@ -62,6 +67,7 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Why doesn't my server application receive a client certificate?
 | 
			
		||||
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
 | 
			
		||||
* I think I've detected a memory leak, is this a bug?
 | 
			
		||||
* Why does Valgrind complain about the use of uninitialized data?
 | 
			
		||||
 | 
			
		||||
===============================================================================
 | 
			
		||||
 | 
			
		||||
@@ -70,7 +76,7 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Which is the current version of OpenSSL?
 | 
			
		||||
 | 
			
		||||
The current version is available from <URL: http://www.openssl.org>.
 | 
			
		||||
OpenSSL 0.9.7g was released on April 11, 2005.
 | 
			
		||||
OpenSSL 0.9.8h was released on May 28th, 2008.
 | 
			
		||||
 | 
			
		||||
In addition to the current stable release, you can also access daily
 | 
			
		||||
snapshots of the OpenSSL development version at <URL:
 | 
			
		||||
@@ -141,8 +147,8 @@ less Unix-centric, it might have been used much earlier.
 | 
			
		||||
 | 
			
		||||
With version 0.9.6 OpenSSL was extended to interface to external crypto
 | 
			
		||||
hardware. This was realized in a special release '0.9.6-engine'. With
 | 
			
		||||
version 0.9.7 (not yet released) the changes were merged into the main
 | 
			
		||||
development line, so that the special release is no longer necessary.
 | 
			
		||||
version 0.9.7 the changes were merged into the main development line,
 | 
			
		||||
so that the special release is no longer necessary.
 | 
			
		||||
 | 
			
		||||
* How do I check the authenticity of the OpenSSL distribution?
 | 
			
		||||
 | 
			
		||||
@@ -384,6 +390,57 @@ interface, the "-nameopt" option could be introduded. See the manual
 | 
			
		||||
page of the "openssl x509" commandline tool for details. The old behaviour
 | 
			
		||||
has however been left as default for the sake of compatibility.
 | 
			
		||||
 | 
			
		||||
* What is a "128 bit certificate"? Can I create one with OpenSSL?
 | 
			
		||||
 | 
			
		||||
The term "128 bit certificate" is a highly misleading marketing term. It does
 | 
			
		||||
*not* refer to the size of the public key in the certificate! A certificate
 | 
			
		||||
containing a 128 bit RSA key would have negligible security.
 | 
			
		||||
 | 
			
		||||
There were various other names such as "magic certificates", "SGC
 | 
			
		||||
certificates", "step up certificates" etc.
 | 
			
		||||
 | 
			
		||||
You can't generally create such a certificate using OpenSSL but there is no
 | 
			
		||||
need to any more. Nowadays web browsers using unrestricted strong encryption
 | 
			
		||||
are generally available.
 | 
			
		||||
 | 
			
		||||
When there were tight export restrictions on the export of strong encryption
 | 
			
		||||
software from the US only weak encryption algorithms could be freely exported
 | 
			
		||||
(initially 40 bit and then 56 bit). It was widely recognised that this was
 | 
			
		||||
inadequate. A relaxation the rules allowed the use of strong encryption but
 | 
			
		||||
only to an authorised server.
 | 
			
		||||
 | 
			
		||||
Two slighly different techniques were developed to support this, one used by
 | 
			
		||||
Netscape was called "step up", the other used by MSIE was called "Server Gated
 | 
			
		||||
Cryptography" (SGC). When a browser initially connected to a server it would
 | 
			
		||||
check to see if the certificate contained certain extensions and was issued by
 | 
			
		||||
an authorised authority. If these test succeeded it would reconnect using
 | 
			
		||||
strong encryption.
 | 
			
		||||
 | 
			
		||||
Only certain (initially one) certificate authorities could issue the
 | 
			
		||||
certificates and they generally cost more than ordinary certificates.
 | 
			
		||||
 | 
			
		||||
Although OpenSSL can create certificates containing the appropriate extensions
 | 
			
		||||
the certificate would not come from a permitted authority and so would not
 | 
			
		||||
be recognized.
 | 
			
		||||
 | 
			
		||||
The export laws were later changed to allow almost unrestricted use of strong
 | 
			
		||||
encryption so these certificates are now obsolete.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* How can I set up a bundle of commercial root CA certificates?
 | 
			
		||||
 | 
			
		||||
The OpenSSL software is shipped without any root CA certificate as the
 | 
			
		||||
OpenSSL project does not have any policy on including or excluding
 | 
			
		||||
any specific CA and does not intend to set up such a policy. Deciding
 | 
			
		||||
about which CAs to support is up to application developers or
 | 
			
		||||
administrators.
 | 
			
		||||
 | 
			
		||||
Other projects do have other policies so you can for example extract the CA
 | 
			
		||||
bundle used by Mozilla and/or modssl as described in this article:
 | 
			
		||||
 | 
			
		||||
  http://www.mail-archive.com/modssl-users@modssl.org/msg16980.html
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[BUILD] =======================================================================
 | 
			
		||||
 | 
			
		||||
* Why does the linker complain about undefined symbols?
 | 
			
		||||
@@ -598,6 +655,35 @@ Reportedly elder *BSD a.out platforms also suffer from this problem and
 | 
			
		||||
remedy should be same. Provided binary is statically linked and should be
 | 
			
		||||
working across wider range of *BSD branches, not just OpenBSD.
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
 | 
			
		||||
 | 
			
		||||
If the test program in question fails withs SIGILL, Illegal Instruction
 | 
			
		||||
exception, then you more than likely to run SSE2-capable CPU, such as
 | 
			
		||||
Intel P4, under control of kernel which does not support SSE2
 | 
			
		||||
instruction extentions. See accompanying INSTALL file and
 | 
			
		||||
OPENSSL_ia32cap(3) documentation page for further information.
 | 
			
		||||
 | 
			
		||||
* Why does compiler fail to compile sha512.c?
 | 
			
		||||
 | 
			
		||||
OpenSSL SHA-512 implementation depends on compiler support for 64-bit
 | 
			
		||||
integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a
 | 
			
		||||
couple] lack support for this and therefore are incapable of compiling
 | 
			
		||||
the module in question. The recommendation is to disable SHA-512 by
 | 
			
		||||
adding no-sha512 to ./config [or ./Configure] command line. Another
 | 
			
		||||
possible alternative might be to switch to GCC.
 | 
			
		||||
 | 
			
		||||
* Test suite still fails, what to do?
 | 
			
		||||
 | 
			
		||||
Another common reason for failure to complete some particular test is
 | 
			
		||||
simply bad code generated by a buggy component in toolchain or deficiency
 | 
			
		||||
in run-time environment. There are few cases documented in PROBLEMS file,
 | 
			
		||||
consult it for possible workaround before you beat the drum. Even if you
 | 
			
		||||
don't find solution or even mention there, do reserve for possibility of
 | 
			
		||||
a compiler bug. Compiler bugs might appear in rather bizarre ways, they
 | 
			
		||||
never make sense, and tend to emerge when you least expect them. In order
 | 
			
		||||
to identify one, drop optimization level, e.g. by editing CFLAG line in
 | 
			
		||||
top-level Makefile, recompile and re-run the test.
 | 
			
		||||
 | 
			
		||||
[PROG] ========================================================================
 | 
			
		||||
 | 
			
		||||
* Is OpenSSL thread-safe?
 | 
			
		||||
@@ -609,8 +695,9 @@ libraries.  If your platform is not one of these, consult the INSTALL
 | 
			
		||||
file.
 | 
			
		||||
 | 
			
		||||
Multi-threaded applications must provide two callback functions to
 | 
			
		||||
OpenSSL.  This is described in the threads(3) manpage.
 | 
			
		||||
 | 
			
		||||
OpenSSL by calling CRYPTO_set_locking_callback() and
 | 
			
		||||
CRYPTO_set_id_callback().  This is described in the threads(3)
 | 
			
		||||
manpage.
 | 
			
		||||
 | 
			
		||||
* I've compiled a program under Windows and it crashes: why?
 | 
			
		||||
 | 
			
		||||
@@ -630,10 +717,10 @@ your application must link  against the same by which OpenSSL was
 | 
			
		||||
built.  If you are using MS Visual C++ (Studio) this can be changed
 | 
			
		||||
by:
 | 
			
		||||
 | 
			
		||||
1.  Select Settings... from the Project Menu.
 | 
			
		||||
2.  Select the C/C++ Tab.
 | 
			
		||||
3.  Select "Code Generation from the "Category" drop down list box
 | 
			
		||||
4.  Select the Appropriate library (see table below) from the "Use
 | 
			
		||||
 1. Select Settings... from the Project Menu.
 | 
			
		||||
 2. Select the C/C++ Tab.
 | 
			
		||||
 3. Select "Code Generation from the "Category" drop down list box
 | 
			
		||||
 4. Select the Appropriate library (see table below) from the "Use
 | 
			
		||||
    run-time library" drop down list box.  Perform this step for both
 | 
			
		||||
    your debug and release versions of your application (look at the
 | 
			
		||||
    top left of the settings panel to change between the two)
 | 
			
		||||
@@ -652,6 +739,20 @@ by:
 | 
			
		||||
Note that debug and release libraries are NOT interchangeable.  If you
 | 
			
		||||
built OpenSSL with /MD your application must use /MD and cannot use /MDd.
 | 
			
		||||
 | 
			
		||||
As per 0.9.8 the above limitation is eliminated for .DLLs. OpenSSL
 | 
			
		||||
.DLLs compiled with some specific run-time option [we insist on the
 | 
			
		||||
default /MD] can be deployed with application compiled with different
 | 
			
		||||
option or even different compiler. But there is a catch! Instead of
 | 
			
		||||
re-compiling OpenSSL toolkit, as you would have to with prior versions,
 | 
			
		||||
you have to compile small C snippet with compiler and/or options of
 | 
			
		||||
your choice. The snippet gets installed as
 | 
			
		||||
<install-root>/include/openssl/applink.c and should be either added to
 | 
			
		||||
your application project or simply #include-d in one [and only one]
 | 
			
		||||
of your application source files. Failure to link this shim module
 | 
			
		||||
into your application manifests itself as fatal "no OPENSSL_Applink"
 | 
			
		||||
run-time error. An explicit reminder is due that in this situation
 | 
			
		||||
[mixing compiler options] it is as important to add CRYPTO_malloc_init
 | 
			
		||||
prior first call to OpenSSL.
 | 
			
		||||
 | 
			
		||||
* How do I read or write a DER encoded buffer using the ASN1 functions?
 | 
			
		||||
 | 
			
		||||
@@ -737,11 +838,11 @@ code itself (the hex digits after the second colon).
 | 
			
		||||
 | 
			
		||||
* Why do I get errors about unknown algorithms?
 | 
			
		||||
 | 
			
		||||
This can happen under several circumstances such as reading in an
 | 
			
		||||
encrypted private key or attempting to decrypt a PKCS#12 file. The cause
 | 
			
		||||
is forgetting to load OpenSSL's table of algorithms with
 | 
			
		||||
OpenSSL_add_all_algorithms(). See the manual page for more information.
 | 
			
		||||
 | 
			
		||||
The cause is forgetting to load OpenSSL's table of algorithms with
 | 
			
		||||
OpenSSL_add_all_algorithms(). See the manual page for more information. This
 | 
			
		||||
can cause several problems such as being unable to read in an encrypted
 | 
			
		||||
PEM file, unable to decrypt a PKCS#12 file or signature failure when
 | 
			
		||||
verifying certificates.
 | 
			
		||||
 | 
			
		||||
* Why can't the OpenSSH configure script detect OpenSSL?
 | 
			
		||||
 | 
			
		||||
@@ -809,5 +910,15 @@ thread-safe):
 | 
			
		||||
  ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does Valgrind complain about the use of uninitialized data?
 | 
			
		||||
 | 
			
		||||
When OpenSSL's PRNG routines are called to generate random numbers the supplied
 | 
			
		||||
buffer contents are mixed into the entropy pool: so it technically does not
 | 
			
		||||
matter whether the buffer is initialized at this point or not.  Valgrind (and
 | 
			
		||||
other test tools) will complain about this. When using Valgrind, make sure the
 | 
			
		||||
OpenSSL library has been compiled with the PURIFY macro defined (-DPURIFY)
 | 
			
		||||
to get rid of these warnings.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===============================================================================
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								INSTALL
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								INSTALL
									
									
									
									
									
								
							@@ -75,7 +75,9 @@
 | 
			
		||||
  no-asm        Do not use assembler code.
 | 
			
		||||
 | 
			
		||||
  386           Use the 80386 instruction set only (the default x86 code is
 | 
			
		||||
                more efficient, but requires at least a 486).
 | 
			
		||||
                more efficient, but requires at least a 486). Note: Use
 | 
			
		||||
                compiler flags for any other CPU specific configuration,
 | 
			
		||||
                e.g. "-m32" to build x86 code on an x64 system.
 | 
			
		||||
 | 
			
		||||
  no-sse2	Exclude SSE2 code pathes. Normally SSE2 extention is
 | 
			
		||||
		detected at run-time, but the decision whether or not the
 | 
			
		||||
@@ -96,7 +98,7 @@
 | 
			
		||||
                The crypto/<cipher> directory can be removed after running
 | 
			
		||||
                "make depend".
 | 
			
		||||
 | 
			
		||||
  -Dxxx, -lxxx, -Lxxx, -fxxx, -Kxxx These system specific options will
 | 
			
		||||
  -Dxxx, -lxxx, -Lxxx, -fxxx, -mxxx, -Kxxx These system specific options will
 | 
			
		||||
                be passed through to the compiler to allow you to
 | 
			
		||||
                define preprocessor symbols, specify additional libraries,
 | 
			
		||||
                library directories or other compiler options.
 | 
			
		||||
@@ -156,7 +158,7 @@
 | 
			
		||||
     standard headers).  If it is a problem with OpenSSL itself, please
 | 
			
		||||
     report the problem to <openssl-bugs@openssl.org> (note that your
 | 
			
		||||
     message will be recorded in the request tracker publicly readable
 | 
			
		||||
     via http://www.openssl.org/support/rt2.html and will be forwarded to a
 | 
			
		||||
     via http://www.openssl.org/support/rt.html and will be forwarded to a
 | 
			
		||||
     public mailing list). Include the output of "make report" in your message.
 | 
			
		||||
     Please check out the request tracker. Maybe the bug was already
 | 
			
		||||
     reported or has already been fixed.
 | 
			
		||||
@@ -178,7 +180,7 @@
 | 
			
		||||
     in Makefile.ssl and run "make clean; make". Please send a bug
 | 
			
		||||
     report to <openssl-bugs@openssl.org>, including the output of
 | 
			
		||||
     "make report" in order to be added to the request tracker at
 | 
			
		||||
     http://www.openssl.org/support/rt2.html.
 | 
			
		||||
     http://www.openssl.org/support/rt.html.
 | 
			
		||||
 | 
			
		||||
  4. If everything tests ok, install OpenSSL with
 | 
			
		||||
 | 
			
		||||
@@ -300,10 +302,10 @@
 | 
			
		||||
 Note on shared libraries
 | 
			
		||||
 ------------------------
 | 
			
		||||
 | 
			
		||||
 Shared library is currently an experimental feature.  The only reason to
 | 
			
		||||
 have them would be to conserve memory on systems where several program
 | 
			
		||||
 are using OpenSSL.  Binary backward compatibility can't be guaranteed
 | 
			
		||||
 before OpenSSL version 1.0.
 | 
			
		||||
 Shared libraries have certain caveats.  Binary backward compatibility
 | 
			
		||||
 can't be guaranteed before OpenSSL version 1.0.  The only reason to
 | 
			
		||||
 use them would be to conserve memory on systems where several programs
 | 
			
		||||
 are using OpenSSL.
 | 
			
		||||
 | 
			
		||||
 For some systems, the OpenSSL Configure script knows what is needed to
 | 
			
		||||
 build shared libraries for libcrypto and libssl.  On these systems,
 | 
			
		||||
@@ -328,7 +330,7 @@
 | 
			
		||||
 Note on support for multiple builds
 | 
			
		||||
 -----------------------------------
 | 
			
		||||
 | 
			
		||||
 OpenSSL is usually built in it's source tree.  Unfortunately, this doesn't
 | 
			
		||||
 OpenSSL is usually built in its source tree.  Unfortunately, this doesn't
 | 
			
		||||
 support building for multiple platforms from the same source tree very well.
 | 
			
		||||
 It is however possible to build in a separate tree through the use of lots
 | 
			
		||||
 of symbolic links, which should be prepared like this:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										152
									
								
								INSTALL.NW
									
									
									
									
									
								
							
							
						
						
									
										152
									
								
								INSTALL.NW
									
									
									
									
									
								
							@@ -8,54 +8,62 @@ Notes about building OpenSSL for NetWare.
 | 
			
		||||
BUILD PLATFORM:
 | 
			
		||||
---------------
 | 
			
		||||
The build scripts (batch files, perl scripts, etc) have been developed and
 | 
			
		||||
tested on W2K.  The scripts should run fine on other Windows
 | 
			
		||||
platforms (NT, Win9x, WinXP) but they haven't been tested.  They may require 
 | 
			
		||||
some modifications.
 | 
			
		||||
tested on W2K.  The scripts should run fine on other Windows platforms
 | 
			
		||||
(NT, Win9x, WinXP) but they have not been tested.  They may require some
 | 
			
		||||
modifications.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Supported NetWare Platforms - NetWare 5.x, NetWare 6.x:
 | 
			
		||||
------------------------------------------
 | 
			
		||||
OpenSSL uses the WinSock interfaces introduced in NetWare 5.  Therefore,
 | 
			
		||||
previous versions of NetWare, 4.x and 3.x, are not supported.
 | 
			
		||||
-------------------------------------------------------
 | 
			
		||||
OpenSSL can either use the WinSock interfaces introduced in NetWare 5,
 | 
			
		||||
or the BSD socket interface.  Previous versions of NetWare, 4.x and 3.x,
 | 
			
		||||
are only supported if OpenSSL is build for CLIB and BSD sockets;
 | 
			
		||||
WinSock builds only support NetWare 5 and up.
 | 
			
		||||
 | 
			
		||||
On NetWare there are two c-runtime libraries.  There is the legacy CLIB 
 | 
			
		||||
interfaces and the newer LibC interfaces.  Being ANSI-C libraries, the 
 | 
			
		||||
functionality in CLIB and LibC is similar but the LibC interfaces are built 
 | 
			
		||||
interfaces and the newer LIBC interfaces.  Being ANSI-C libraries, the 
 | 
			
		||||
functionality in CLIB and LIBC is similar but the LIBC interfaces are built 
 | 
			
		||||
using Novell Kernal Services (NKS) which is designed to leverage 
 | 
			
		||||
multi-processor environments.
 | 
			
		||||
 | 
			
		||||
The NetWare port of OpenSSL can configured to build using CLIB or LibC.  The 
 | 
			
		||||
CLIB build was developed and tested using NetWare 5.0 sp6.0a.  The LibC 
 | 
			
		||||
The NetWare port of OpenSSL can be configured to build using CLIB or LIBC.
 | 
			
		||||
The CLIB build was developed and tested using NetWare 5.0 sp6.0a.  The LIBC 
 | 
			
		||||
build was developed and tested using the NetWare 6.0 FCS.  
 | 
			
		||||
 | 
			
		||||
The necessary LibC functionality ships with NetWare 6.  However, earlier 
 | 
			
		||||
NetWare 5.x versions will require updates in order to run the OpenSSL LibC
 | 
			
		||||
build.
 | 
			
		||||
The necessary LIBC functionality ships with NetWare 6.  However, earlier 
 | 
			
		||||
NetWare 5.x versions will require updates in order to run the OpenSSL LIBC
 | 
			
		||||
build (NetWare 5.1 SP8 is known to work).
 | 
			
		||||
 | 
			
		||||
As of June 2005, the LIBC build can be configured to use BSD sockets instead
 | 
			
		||||
of WinSock sockets. Call Configure (usually through netware\build.bat) using
 | 
			
		||||
a target of "netware-libc-bsdsock" instead of "netware-libc".
 | 
			
		||||
 | 
			
		||||
As of June 2007, support for CLIB and BSD sockets is also now available
 | 
			
		||||
using a target of "netware-clib-bsdsock" instead of "netware-clib";
 | 
			
		||||
also gcc builds are now supported on both Linux and Win32 (post 0.9.8e).
 | 
			
		||||
 | 
			
		||||
REQUIRED TOOLS:
 | 
			
		||||
---------------
 | 
			
		||||
Based upon the configuration and build options used, some or all of the
 | 
			
		||||
following tools may be required:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Perl for Win32 - required (http://www.activestate.com/ActivePerl)
 | 
			
		||||
   Used to run the various perl scripts on the build platform.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Perl 5.8.0 for NetWare v3.20 (or later) - required 
 | 
			
		||||
   (http://developer.novell.com) Used to run the test script on NetWare 
 | 
			
		||||
   after building.
 | 
			
		||||
 | 
			
		||||
* Compiler / Linker - required:
 | 
			
		||||
   Metrowerks CodeWarrior PDK 2.1 (or later) for NetWare (commercial):
 | 
			
		||||
      Provides command line tools used for building.
 | 
			
		||||
      Tools:
 | 
			
		||||
      mwccnlm.exe  - C/C++ Compiler for NetWare
 | 
			
		||||
      mwldnlm.exe  - Linker for NetWare
 | 
			
		||||
      mwasmnlm.exe - x86 assembler for NetWare (if using assembly option)
 | 
			
		||||
 | 
			
		||||
* Metrowerks CodeWarrior PDK 2.1 (or later) for NetWare - required:
 | 
			
		||||
   Provides command line tools used for building.
 | 
			
		||||
 | 
			
		||||
   Tools:
 | 
			
		||||
   mwccnlm.exe  - C/C++ Compiler for NetWare
 | 
			
		||||
   mwldnlm.exe  - Linker for NetWare
 | 
			
		||||
   mwasmnlm.exe - x86 assembler for NetWare (if using assembly option)
 | 
			
		||||
 | 
			
		||||
   gcc / nlmconv Cross-Compiler, available from Novell Forge (free):
 | 
			
		||||
         http://forge.novell.com/modules/xfmod/project/?aunixnw
 | 
			
		||||
 | 
			
		||||
* Assemblers - optional:
 | 
			
		||||
   If you intend to build using the assembly options you will need an
 | 
			
		||||
@@ -75,11 +83,11 @@ following tools may be required:
 | 
			
		||||
   In order to build you will need a make tool.  Two make tools are
 | 
			
		||||
   supported, GNU make (gmake.exe) or Microsoft nmake.exe.
 | 
			
		||||
 | 
			
		||||
   gmake.exe - GNU make for Windows (version 3.75 used for development)
 | 
			
		||||
         http://www.gnu.org/software/make/make.html
 | 
			
		||||
   make.exe - GNU make for Windows (version 3.75 used for development)
 | 
			
		||||
         http://gnuwin32.sourceforge.net/packages/make.htm
 | 
			
		||||
 | 
			
		||||
   nmake.exe - Microsoft make (Version 6.00.8168.0 used for development)
 | 
			
		||||
 | 
			
		||||
         http://support.microsoft.com/kb/132084/EN-US/
 | 
			
		||||
 | 
			
		||||
* Novell Developer Kit (NDK) - required: (http://developer.novell.com)
 | 
			
		||||
 | 
			
		||||
@@ -95,7 +103,12 @@ following tools may be required:
 | 
			
		||||
         Microsoft SDK.  Note: The winsock2.h support headers may change
 | 
			
		||||
         with various versions of winsock2.h.  Check the dependencies
 | 
			
		||||
         section on the NDK WinSock2 download page for the latest
 | 
			
		||||
         information on dependencies.
 | 
			
		||||
         information on dependencies. These components are unsupported by
 | 
			
		||||
         Novell. They are provided as a courtesy, but it is strongly
 | 
			
		||||
         suggested that all development be done using LIBC, not CLIB.
 | 
			
		||||
 | 
			
		||||
         As of June 2005, the WinSock2 components are available at:
 | 
			
		||||
         http://forgeftp.novell.com//ws2comp/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      NLM and NetWare libraries for C (including CLIB and XPlat):
 | 
			
		||||
@@ -114,14 +127,15 @@ following tools may be required:
 | 
			
		||||
 | 
			
		||||
   LIBC - BUILDS:
 | 
			
		||||
   
 | 
			
		||||
      Libraries for C (LibC) - LibC headers and import files
 | 
			
		||||
         If you are going to build a LibC version of OpenSSL, you will
 | 
			
		||||
         need the LibC headers and imports.  The March 14, 2002 NDK release or
 | 
			
		||||
      Libraries for C (LIBC) - LIBC headers and import files
 | 
			
		||||
         If you are going to build a LIBC version of OpenSSL, you will
 | 
			
		||||
         need the LIBC headers and imports.  The March 14, 2002 NDK release or
 | 
			
		||||
         later is required.  
 | 
			
		||||
         
 | 
			
		||||
         NOTE: The LibC SDK includes the necessary WinSock2 support.  It
 | 
			
		||||
         It is not necessary to download the WinSock2 Developer when building
 | 
			
		||||
         for LibC.
 | 
			
		||||
         NOTE: The LIBC SDK includes the necessary WinSock2 support.
 | 
			
		||||
         It is not necessary to download the WinSock2 NDK when building for
 | 
			
		||||
         LIBC. The LIBC SDK also includes the appropriate BSD socket support
 | 
			
		||||
         if configuring to use BSD sockets.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BUILDING:
 | 
			
		||||
@@ -133,33 +147,36 @@ The set_env.bat file is a template you can use to set up the path
 | 
			
		||||
and environment variables you will need to build.  Modify the
 | 
			
		||||
various lines to point to YOUR tools and run set_env.bat.
 | 
			
		||||
 | 
			
		||||
   netware\set_env.bat [target]
 | 
			
		||||
   netware\set_env.bat <target> [compiler]
 | 
			
		||||
 | 
			
		||||
      target        - "netware-clib" - CLib NetWare build
 | 
			
		||||
                    - "netware-libc" - LibC NetWare build
 | 
			
		||||
      target        - "netware-clib" - CLIB NetWare build
 | 
			
		||||
                    - "netware-libc" - LIBC NetWare build
 | 
			
		||||
 | 
			
		||||
      compiler      - "gnuc"         - GNU GCC Compiler
 | 
			
		||||
                    - "codewarrior"  - MetroWerks CodeWarrior (default)
 | 
			
		||||
 | 
			
		||||
If you don't use set_env.bat, you will need to set up the following
 | 
			
		||||
environment variables:
 | 
			
		||||
 | 
			
		||||
   path - Set path to point to the tools you will use.
 | 
			
		||||
   PATH - Set PATH to point to the tools you will use.
 | 
			
		||||
 | 
			
		||||
   MWCIncludes - The location of the NDK include files.
 | 
			
		||||
   INCLUDE - The location of the NDK include files.
 | 
			
		||||
         
 | 
			
		||||
            CLIB ex: set MWCIncludes=c:\ndk\nwsdk\include\nlm
 | 
			
		||||
            LibC ex: set MWCIncludes=c:\ndk\libc\include
 | 
			
		||||
            CLIB ex: set INCLUDE=c:\ndk\nwsdk\include\nlm
 | 
			
		||||
            LIBC ex: set INCLUDE=c:\ndk\libc\include
 | 
			
		||||
 | 
			
		||||
   PRELUDE - The absolute path of the prelude object to link with.  For
 | 
			
		||||
            a CLIB build it is recommended you use the "clibpre.o" files shipped
 | 
			
		||||
            with the Metrowerks PDK for NetWare.  For a LibC build you should 
 | 
			
		||||
            use the "libcpre.o" file delivered with the LibC NDK components.
 | 
			
		||||
            with the Metrowerks PDK for NetWare.  For a LIBC build you should 
 | 
			
		||||
            use the "libcpre.o" file delivered with the LIBC NDK components.
 | 
			
		||||
 | 
			
		||||
            CLIB ex: set PRELUDE=c:\ndk\nwsdk\imports\clibpre.o
 | 
			
		||||
            LibC ex: set PRELUDE=c:\ndk\libc\imports\libcpre.o
 | 
			
		||||
            LIBC ex: set PRELUDE=c:\ndk\libc\imports\libcpre.o
 | 
			
		||||
 | 
			
		||||
   IMPORTS - The locaton of the NDK import files.
 | 
			
		||||
 | 
			
		||||
            CLIB ex: set IMPORTS=c:\ndk\nwsdk\imports
 | 
			
		||||
            LibC ex: set IMPORTS=c:\ndk\libc\imports
 | 
			
		||||
            LIBC ex: set IMPORTS=c:\ndk\libc\imports
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
In order to build, you need to run the Perl scripts to configure the build
 | 
			
		||||
@@ -172,8 +189,10 @@ the assembly code.  Always run build.bat from the "openssl" directory.
 | 
			
		||||
 | 
			
		||||
   netware\build [target] [debug opts] [assembly opts] [configure opts]
 | 
			
		||||
 | 
			
		||||
      target        - "netware-clib" - CLib NetWare build
 | 
			
		||||
                    - "netware-libc" - LibC NetWare build
 | 
			
		||||
      target        - "netware-clib" - CLIB NetWare build (WinSock Sockets)
 | 
			
		||||
                    - "netware-clib-bsdsock" - CLIB NetWare build (BSD Sockets)
 | 
			
		||||
                    - "netware-libc" - LIBC NetWare build (WinSock Sockets)
 | 
			
		||||
                    - "netware-libc-bsdsock" - LIBC NetWare build (BSD Sockets)
 | 
			
		||||
 
 | 
			
		||||
      debug opts    - "debug"  - build debug
 | 
			
		||||
 | 
			
		||||
@@ -182,35 +201,41 @@ the assembly code.  Always run build.bat from the "openssl" directory.
 | 
			
		||||
                      "no-asm"   - don't use assembly
 | 
			
		||||
 | 
			
		||||
      configure opts- all unrecognized arguments are passed to the
 | 
			
		||||
                      perl configure script
 | 
			
		||||
                      perl 'configure' script. See that script for
 | 
			
		||||
                      internal documentation regarding options that
 | 
			
		||||
                      are available.
 | 
			
		||||
 | 
			
		||||
   examples:
 | 
			
		||||
 | 
			
		||||
      CLIB build, debug, without assembly:
 | 
			
		||||
         netware\build.bat netware-clib debug no-asm
 | 
			
		||||
 | 
			
		||||
      LibC build, non-debug, using NASM assembly:
 | 
			
		||||
         netware\build.bat netware-libc nw-nasm
 | 
			
		||||
      LIBC build, non-debug, using NASM assembly, add mdc2 support:
 | 
			
		||||
         netware\build.bat netware-libc nw-nasm enable-mdc2
 | 
			
		||||
 | 
			
		||||
      LIBC build, BSD sockets, non-debug, without assembly:
 | 
			
		||||
         netware\build.bat netware-libc-bsdsock no-asm
 | 
			
		||||
 | 
			
		||||
Running build.bat generates a make file to be processed by your make 
 | 
			
		||||
tool (gmake or nmake):
 | 
			
		||||
 | 
			
		||||
   CLIB ex: gmake -f netware\nlm_clib.mak 
 | 
			
		||||
   LibC ex: gmake -f netware\nlm_libc.mak 
 | 
			
		||||
   CLIB ex: gmake -f netware\nlm_clib_dbg.mak 
 | 
			
		||||
   LIBC ex: gmake -f netware\nlm_libc.mak 
 | 
			
		||||
   LIBC ex: gmake -f netware\nlm_libc_bsdsock.mak 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
You can also run the build scripts manually if you do not want to use the
 | 
			
		||||
build.bat file.  Run the following scripts in the "\openssl"
 | 
			
		||||
subdirectory (in the order listed below):
 | 
			
		||||
 | 
			
		||||
   perl configure no-asm [other config opts] [netware-clib|netware-libc]
 | 
			
		||||
   perl configure no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock]
 | 
			
		||||
      configures no assembly build for specified netware environment
 | 
			
		||||
      (CLIB or LibC).
 | 
			
		||||
      (CLIB or LIBC).
 | 
			
		||||
 | 
			
		||||
   perl util\mkfiles.pl >MINFO
 | 
			
		||||
      generates a listing of source files (used by mk1mf)
 | 
			
		||||
 | 
			
		||||
   perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc >netware\nlm.mak
 | 
			
		||||
   perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock >netware\nlm.mak
 | 
			
		||||
      generates the makefile for NetWare
 | 
			
		||||
 | 
			
		||||
   gmake -f netware\nlm.mak
 | 
			
		||||
@@ -235,12 +260,12 @@ The output from the build is placed in the following directories:
 | 
			
		||||
      tmp_nw_clib         - temporary build files
 | 
			
		||||
      outinc_nw_clib      - necesary include files
 | 
			
		||||
 | 
			
		||||
   LibC Debug build:
 | 
			
		||||
   LIBC Debug build:
 | 
			
		||||
      out_nw_libc.dbg     - static libs & test nlm(s)
 | 
			
		||||
      tmp_nw_libc.dbg     - temporary build files
 | 
			
		||||
      outinc_nw_libc      - necessary include files
 | 
			
		||||
 | 
			
		||||
   LibC Non-debug build:
 | 
			
		||||
   LIBC Non-debug build:
 | 
			
		||||
      out_nw_libc         - static libs & test nlm(s)
 | 
			
		||||
      tmp_nw_libc         - temporary build files
 | 
			
		||||
      outinc_nw_libc      - necesary include files
 | 
			
		||||
@@ -266,7 +291,7 @@ To run cpy_tests.bat:
 | 
			
		||||
      NetWare drive    - drive letter of mapped drive
 | 
			
		||||
 | 
			
		||||
      CLIB ex: netware\cpy_tests out_nw_clib m:
 | 
			
		||||
      LibC ex: netware\cpy_tests out_nw_libc m:
 | 
			
		||||
      LIBC ex: netware\cpy_tests out_nw_libc m:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The Perl script, "do_tests.pl", in the "OpenSSL" directory on the server
 | 
			
		||||
@@ -288,13 +313,6 @@ The do_tests.pl script generates a log file "\openssl\test_out\tests.log"
 | 
			
		||||
which should be reviewed for errors.  Any errors will be denoted by the word
 | 
			
		||||
"ERROR" in the log.
 | 
			
		||||
 | 
			
		||||
NOTE:  Currently (11/2002), the LibC test nlms report an error while loading
 | 
			
		||||
       when launched from the perl script (do_tests.pl).  The problems are 
 | 
			
		||||
       being addressed by the LibC development team and should be fixed in the
 | 
			
		||||
       next release.  Until the problems are corrected, the LibC test nlms 
 | 
			
		||||
       will have to be executed manually.  
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DEVELOPING WITH THE OPENSSL SDK:
 | 
			
		||||
--------------------------------
 | 
			
		||||
Now that everything is built and tested, you are ready to use the OpenSSL
 | 
			
		||||
@@ -348,9 +366,9 @@ clean up the resources!
 | 
			
		||||
 | 
			
		||||
Multi-threaded Development
 | 
			
		||||
---------------------------
 | 
			
		||||
The NetWare version of OpenSSL is thread-safe however, multi-threaded
 | 
			
		||||
The NetWare version of OpenSSL is thread-safe, however multi-threaded
 | 
			
		||||
applications must provide the necessary locking function callbacks.  This
 | 
			
		||||
is described in doc\threads.doc.  The file "openssl\crypto\threads\mttest.c"
 | 
			
		||||
is described in doc\threads.doc.  The file "openssl-x.x.x\crypto\threads\mttest.c"
 | 
			
		||||
is a multi-threaded test program and demonstrates the locking functions.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -420,7 +438,7 @@ Makefile "vclean"
 | 
			
		||||
------------------
 | 
			
		||||
The generated makefile has a "vclean" target which cleans up the build
 | 
			
		||||
directories.  If you have been building successfully and suddenly
 | 
			
		||||
experience problems, use "vclean" (gmake -f netware\nlm.mak vclean) and retry.
 | 
			
		||||
experience problems, use "vclean" (gmake -f netware\nlm_xxxx.mak vclean) and retry.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
"Undefined Symbol" Linker errors
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										39
									
								
								INSTALL.W32
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								INSTALL.W32
									
									
									
									
									
								
							@@ -3,6 +3,7 @@
 | 
			
		||||
 ----------------------------------
 | 
			
		||||
 | 
			
		||||
 [Instructions for building for Windows CE can be found in INSTALL.WCE]
 | 
			
		||||
 [Instructions for building for Win64 can be found in INSTALL.W64]
 | 
			
		||||
 | 
			
		||||
 Heres a few comments about building OpenSSL in Windows environments.  Most
 | 
			
		||||
 of this is tested on Win32 but it may also work in Win 3.1 with some
 | 
			
		||||
@@ -48,7 +49,9 @@
 | 
			
		||||
 | 
			
		||||
 Firstly you should run Configure:
 | 
			
		||||
 | 
			
		||||
 > perl Configure VC-WIN32
 | 
			
		||||
 > perl Configure VC-WIN32 --prefix=c:/some/openssl/dir
 | 
			
		||||
 | 
			
		||||
Where the prefix argument specifies where OpenSSL will be installed to.
 | 
			
		||||
 | 
			
		||||
 Next you need to build the Makefiles and optionally the assembly language
 | 
			
		||||
 files:
 | 
			
		||||
@@ -76,8 +79,12 @@
 | 
			
		||||
 If all is well it should compile and you will have some DLLs and executables
 | 
			
		||||
 in out32dll. If you want to try the tests then do:
 | 
			
		||||
 
 | 
			
		||||
 > cd out32dll
 | 
			
		||||
 > ..\ms\test
 | 
			
		||||
 > nmake -f ms\ntdll.mak test
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
To install OpenSSL to the specified location do:
 | 
			
		||||
 | 
			
		||||
> nmake -f ms\ntdll.mak install
 | 
			
		||||
 | 
			
		||||
 Tweaks:
 | 
			
		||||
 | 
			
		||||
@@ -87,6 +94,12 @@
 | 
			
		||||
 compiled in. Note that mk1mf.pl expects the platform to be the last argument
 | 
			
		||||
 on the command line, so 'debug' must appear before that, as all other options.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 By default in 0.9.8 OpenSSL will compile builtin ENGINES into the libeay32.dll
 | 
			
		||||
 shared library. If you specify the "no-static-engine" option on the command
 | 
			
		||||
 line to Configure the shared library build (ms\ntdll.mak) will compile the
 | 
			
		||||
 engines as separate DLLs.
 | 
			
		||||
 | 
			
		||||
 The default Win32 environment is to leave out any Windows NT specific
 | 
			
		||||
 features.
 | 
			
		||||
 | 
			
		||||
@@ -97,6 +110,8 @@
 | 
			
		||||
 You can also build a static version of the library using the Makefile
 | 
			
		||||
 ms\nt.mak
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 Borland C++ builder 5
 | 
			
		||||
 ---------------------
 | 
			
		||||
 | 
			
		||||
@@ -286,3 +301,21 @@
 | 
			
		||||
 (e.g. fopen()), and OpenSSL cannot change these; so in general you cannot
 | 
			
		||||
 rely on CRYPTO_malloc_init() solving your problem, and you should
 | 
			
		||||
 consistently use the multithreaded library.
 | 
			
		||||
 | 
			
		||||
 Linking your application
 | 
			
		||||
 ------------------------
 | 
			
		||||
 | 
			
		||||
 If you link with static OpenSSL libraries [those built with ms/nt.mak],
 | 
			
		||||
 then you're expected to additionally link your application with
 | 
			
		||||
 WSOCK32.LIB, ADVAPI32.LIB, GDI32.LIB and USER32.LIB. Those developing
 | 
			
		||||
 non-interactive service applications might feel concerned about linking
 | 
			
		||||
 with latter two, as they are justly associated with interactive desktop,
 | 
			
		||||
 which is not available to service processes. The toolkit is designed
 | 
			
		||||
 to detect in which context it's currently executed, GUI, console app
 | 
			
		||||
 or service, and act accordingly, namely whether or not to actually make
 | 
			
		||||
 GUI calls.
 | 
			
		||||
 | 
			
		||||
 If you link with OpenSSL .DLLs, then you're expected to include into
 | 
			
		||||
 your application code small "shim" snippet, which provides glue between
 | 
			
		||||
 OpenSSL BIO layer and your compiler run-time. Look up OPENSSL_Applink
 | 
			
		||||
 reference page for further details.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										66
									
								
								INSTALL.W64
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								INSTALL.W64
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,66 @@
 | 
			
		||||
 | 
			
		||||
 INSTALLATION ON THE WIN64 PLATFORM
 | 
			
		||||
 ----------------------------------
 | 
			
		||||
 | 
			
		||||
 Caveat lector
 | 
			
		||||
 -------------
 | 
			
		||||
 | 
			
		||||
 As of moment of this writing Win64 support is classified "initial"
 | 
			
		||||
 for the following reasons.
 | 
			
		||||
 | 
			
		||||
 - No assembler modules are engaged upon initial 0.9.8 release.
 | 
			
		||||
 - API might change within 0.9.8 life-span, *but* in a manner which
 | 
			
		||||
   doesn't break backward binary compatibility. Or in other words,
 | 
			
		||||
   application programs compiled with initial 0.9.8 headers will
 | 
			
		||||
   be expected to work with future minor release .DLL without need
 | 
			
		||||
   to re-compile, even if future minor release features modified API.
 | 
			
		||||
 - Above mentioned API modifications have everything to do with
 | 
			
		||||
   elimination of a number of limitations, which are normally
 | 
			
		||||
   considered inherent to 32-bit platforms. Which in turn is why they
 | 
			
		||||
   are treated as limitations on 64-bit platform such as Win64:-)
 | 
			
		||||
   The current list comprises [but not necessarily limited to]:
 | 
			
		||||
 | 
			
		||||
   - null-terminated strings may not be longer than 2G-1 bytes,
 | 
			
		||||
     longer strings are treated as zero-length;
 | 
			
		||||
   - dynamically and *internally* allocated chunks can't be larger
 | 
			
		||||
     than 2G-1 bytes;
 | 
			
		||||
   - inability to encrypt/decrypt chunks of data larger than 4GB
 | 
			
		||||
     [it's possibly to *hash* chunks of arbitrary size through];
 | 
			
		||||
 | 
			
		||||
   Neither of these is actually big deal and hardly encountered
 | 
			
		||||
   in real-life applications.
 | 
			
		||||
 | 
			
		||||
 Compiling procedure
 | 
			
		||||
 -------------------
 | 
			
		||||
 | 
			
		||||
 You will need Perl. You can run under Cygwin or you can download
 | 
			
		||||
 ActiveState Perl from http://www.activestate.com/ActivePerl.
 | 
			
		||||
 | 
			
		||||
 You will need Microsoft Platform SDK, available for download at
 | 
			
		||||
 http://www.microsoft.com/msdownload/platformsdk/sdkupdate/. As per
 | 
			
		||||
 April 2005 Platform SDK is equipped with Win64 compilers, as well
 | 
			
		||||
 as assemblers, but it might change in the future.
 | 
			
		||||
 | 
			
		||||
 To build for Win64/x64:
 | 
			
		||||
 | 
			
		||||
 > perl Configure VC-WIN64A
 | 
			
		||||
 > ms\do_win64a
 | 
			
		||||
 > nmake -f ms\ntdll.mak
 | 
			
		||||
 > cd out32dll
 | 
			
		||||
 > ..\ms\test
 | 
			
		||||
 | 
			
		||||
 To build for Win64/IA64:
 | 
			
		||||
 | 
			
		||||
 > perl Configure VC-WIN64I
 | 
			
		||||
 > ms\do_win64i
 | 
			
		||||
 > nmake -f ms\ntdll.mak
 | 
			
		||||
 > cd out32dll
 | 
			
		||||
 > ..\ms\test
 | 
			
		||||
 | 
			
		||||
 Naturally test-suite itself has to be executed on the target platform.
 | 
			
		||||
 | 
			
		||||
 Installation
 | 
			
		||||
 ------------
 | 
			
		||||
 | 
			
		||||
 TBD, for now see INSTALL.W32.
 | 
			
		||||
 | 
			
		||||
@@ -11,8 +11,11 @@
 | 
			
		||||
 You also need Perl for Win32.  You will need ActiveState Perl, available
 | 
			
		||||
 from http://www.activestate.com/ActivePerl.
 | 
			
		||||
 | 
			
		||||
 Windows CE support in OpenSSL relies on wcecompat.  All Windows CE specific
 | 
			
		||||
 issues should be directed to www.essemer.com.au.
 | 
			
		||||
 Windows CE support in OpenSSL relies on wcecompat and therefore it's
 | 
			
		||||
 appropriate to check http://www.essemer.com.au/windowsce/ for updates in
 | 
			
		||||
 case of compilation problems. As for the moment of this writing version
 | 
			
		||||
 1.1 is available and actually required for WCE 4.2 and newer platforms.
 | 
			
		||||
 All Windows CE specific issues should be directed to www.essemer.com.au.
 | 
			
		||||
 | 
			
		||||
 The C Runtime Library implementation for Windows CE that is included with
 | 
			
		||||
 Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							@@ -12,7 +12,7 @@
 | 
			
		||||
  ---------------
 | 
			
		||||
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										210
									
								
								Makefile.org
									
									
									
									
									
								
							
							
						
						
									
										210
									
								
								Makefile.org
									
									
									
									
									
								
							@@ -100,6 +100,10 @@ RMD160_ASM_OBJ=
 | 
			
		||||
KRB5_INCLUDES=
 | 
			
		||||
LIBKRB5=
 | 
			
		||||
 | 
			
		||||
# Zlib stuff
 | 
			
		||||
ZLIB_INCLUDE=
 | 
			
		||||
LIBZLIB=
 | 
			
		||||
 | 
			
		||||
DIRS=   crypto ssl engines apps test tools
 | 
			
		||||
SHLIBDIRS= crypto ssl
 | 
			
		||||
 | 
			
		||||
@@ -107,11 +111,13 @@ SHLIBDIRS= crypto ssl
 | 
			
		||||
SDIRS=  \
 | 
			
		||||
	objects \
 | 
			
		||||
	md2 md4 md5 sha mdc2 hmac ripemd \
 | 
			
		||||
	des aes rc2 rc4 rc5 idea bf cast \
 | 
			
		||||
	des aes rc2 rc4 rc5 idea bf cast camellia seed \
 | 
			
		||||
	bn ec rsa dsa ecdsa dh ecdh dso engine \
 | 
			
		||||
	buffer bio stack lhash rand err \
 | 
			
		||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
 | 
			
		||||
	store pqueue
 | 
			
		||||
	store cms pqueue
 | 
			
		||||
# keep in mind that the above list is adjusted by ./Configure
 | 
			
		||||
# according to no-xxx arguments...
 | 
			
		||||
 | 
			
		||||
# tests to perform.  "alltests" is a special word indicating that all tests
 | 
			
		||||
# should be performed.
 | 
			
		||||
@@ -144,14 +150,35 @@ WTARFILE=       $(NAME)-win.tar
 | 
			
		||||
EXHEADER=       e_os2.h
 | 
			
		||||
HEADER=         e_os.h
 | 
			
		||||
 | 
			
		||||
all: Makefile build_all openssl.pc
 | 
			
		||||
all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
 | 
			
		||||
 | 
			
		||||
# as we stick to -e, CLEARENV ensures that local variables in lower
 | 
			
		||||
# Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
 | 
			
		||||
# shell, which [annoyingly enough] terminates unset with error if VAR
 | 
			
		||||
# is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
 | 
			
		||||
# which terminates unset with error if no variable was present:-(
 | 
			
		||||
CLEARENV=	TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS}	\
 | 
			
		||||
		$${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES}	\
 | 
			
		||||
		$${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC}		\
 | 
			
		||||
		$${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL}	\
 | 
			
		||||
		$${EXHEADER+EXHEADER} $${HEADER+HEADER}		\
 | 
			
		||||
		$${GENERAL+GENERAL} $${CFLAGS+CFLAGS}		\
 | 
			
		||||
		$${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS}		\
 | 
			
		||||
		$${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS}		\
 | 
			
		||||
		$${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS}	\
 | 
			
		||||
		$${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
 | 
			
		||||
 | 
			
		||||
BUILDENV=	PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
 | 
			
		||||
		SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}'	\
 | 
			
		||||
		CC='${CC}' CFLAG='${CFLAG}' 			\
 | 
			
		||||
		AS='${CC}' ASFLAG='${CFLAG} -c'			\
 | 
			
		||||
		AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'	\
 | 
			
		||||
		LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)"	\
 | 
			
		||||
		SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib'	\
 | 
			
		||||
		INSTALL_PREFIX='${INSTALL_PREFIX}'		\
 | 
			
		||||
		INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'	\
 | 
			
		||||
		MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
 | 
			
		||||
		DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}'	\
 | 
			
		||||
		MAKEDEPPROG='${MAKEDEPPROG}'			\
 | 
			
		||||
		SHARED_LDFLAGS='${SHARED_LDFLAGS}'		\
 | 
			
		||||
		KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}'	\
 | 
			
		||||
		EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}'	\
 | 
			
		||||
		SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}'	\
 | 
			
		||||
@@ -163,15 +190,37 @@ BUILDENV=	PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
 | 
			
		||||
		RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}'	\
 | 
			
		||||
		SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'			\
 | 
			
		||||
		MD5_ASM_OBJ='${MD5_ASM_OBJ}'			\
 | 
			
		||||
		RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'
 | 
			
		||||
		RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'		\
 | 
			
		||||
		THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
 | 
			
		||||
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
 | 
			
		||||
# which in turn eliminates ambiguities in variable treatment with -e.
 | 
			
		||||
 | 
			
		||||
BUILD_CMD=if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
 | 
			
		||||
	if [ -d "$$dir" ]; then \
 | 
			
		||||
		(cd $$dir && echo "making $$target in $$dir..." && \
 | 
			
		||||
		$(MAKE) -e $(BUILDENV) $$target ) || exit 1; \
 | 
			
		||||
	else \
 | 
			
		||||
		$(MAKE) $$dir; \
 | 
			
		||||
	fi; fi
 | 
			
		||||
# BUILD_CMD is a generic macro to build a given target in a given
 | 
			
		||||
# subdirectory.  The target must be given through the shell variable
 | 
			
		||||
# `target' and the subdirectory to build in must be given through `dir'.
 | 
			
		||||
# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
 | 
			
		||||
# BUILD_ONE_CMD instead.
 | 
			
		||||
#
 | 
			
		||||
# BUILD_ONE_CMD is a macro to build a given target in a given
 | 
			
		||||
# subdirectory if that subdirectory is part of $(DIRS).  It requires
 | 
			
		||||
# exactly the same shell variables as BUILD_CMD.
 | 
			
		||||
#
 | 
			
		||||
# RECURSIVE_BUILD_CMD is a macro to build a given target in all
 | 
			
		||||
# subdirectories defined in $(DIRS).  It requires that the target
 | 
			
		||||
# is given through the shell variable `target'.
 | 
			
		||||
BUILD_CMD=  if [ -d "$$dir" ]; then \
 | 
			
		||||
	    (	cd $$dir && echo "making $$target in $$dir..." && \
 | 
			
		||||
		$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
 | 
			
		||||
	    ) || exit 1; \
 | 
			
		||||
	    fi
 | 
			
		||||
RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
 | 
			
		||||
BUILD_ONE_CMD=\
 | 
			
		||||
	if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
 | 
			
		||||
		$(BUILD_CMD); \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
reflect:
 | 
			
		||||
	@[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
 | 
			
		||||
 | 
			
		||||
sub_all: build_all
 | 
			
		||||
build_all: build_libs build_apps build_tests build_tools
 | 
			
		||||
@@ -179,21 +228,21 @@ build_all: build_libs build_apps build_tests build_tools
 | 
			
		||||
build_libs: build_crypto build_ssl build_engines
 | 
			
		||||
 | 
			
		||||
build_crypto:
 | 
			
		||||
	@dir=crypto; target=all; $(BUILD_CMD)
 | 
			
		||||
	@dir=crypto; target=all; $(BUILD_ONE_CMD)
 | 
			
		||||
build_ssl:
 | 
			
		||||
	@dir=ssl; target=all; $(BUILD_CMD)
 | 
			
		||||
	@dir=ssl; target=all; $(BUILD_ONE_CMD)
 | 
			
		||||
build_engines:
 | 
			
		||||
	@dir=engines; target=all; $(BUILD_CMD)
 | 
			
		||||
	@dir=engines; target=all; $(BUILD_ONE_CMD)
 | 
			
		||||
build_apps:
 | 
			
		||||
	@dir=apps; target=all; $(BUILD_CMD)
 | 
			
		||||
	@dir=apps; target=all; $(BUILD_ONE_CMD)
 | 
			
		||||
build_tests:
 | 
			
		||||
	@dir=test; target=all; $(BUILD_CMD)
 | 
			
		||||
	@dir=test; target=all; $(BUILD_ONE_CMD)
 | 
			
		||||
build_tools:
 | 
			
		||||
	@dir=tools; target=all; $(BUILD_CMD)
 | 
			
		||||
	@dir=tools; target=all; $(BUILD_ONE_CMD)
 | 
			
		||||
 | 
			
		||||
all_testapps: build_libs build_testapps
 | 
			
		||||
build_testapps:
 | 
			
		||||
	@dir=crypto; target=testapps; $(BUILD_CMD)
 | 
			
		||||
	@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
 | 
			
		||||
 | 
			
		||||
libcrypto$(SHLIB_EXT): libcrypto.a
 | 
			
		||||
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
 | 
			
		||||
@@ -227,7 +276,7 @@ clean-shared:
 | 
			
		||||
 | 
			
		||||
link-shared:
 | 
			
		||||
	@ set -e; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		$(MAKE) -f $(HERE)/Makefile.shared \
 | 
			
		||||
		$(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
 | 
			
		||||
			LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
 | 
			
		||||
			symlink.$(SHLIB_TARGET); \
 | 
			
		||||
@@ -241,16 +290,40 @@ do_$(SHLIB_TARGET):
 | 
			
		||||
		if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
			
		||||
			libs="$(LIBKRB5) $$libs"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		$(MAKE) -f Makefile.shared \
 | 
			
		||||
			$(BUILDENV) \
 | 
			
		||||
		$(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
 | 
			
		||||
			LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
 | 
			
		||||
			LIBDEPS="$$libs $(EX_LIBS)" \
 | 
			
		||||
			LIBRPATH="$(INSTALLTOP)/lib" \
 | 
			
		||||
			link_a.$(SHLIB_TARGET); \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
libcrypto.pc: Makefile
 | 
			
		||||
	@ ( echo 'prefix=$(INSTALLTOP)'; \
 | 
			
		||||
	    echo 'exec_prefix=$${prefix}'; \
 | 
			
		||||
	    echo 'libdir=$${exec_prefix}/lib'; \
 | 
			
		||||
	    echo 'includedir=$${prefix}/include'; \
 | 
			
		||||
	    echo ''; \
 | 
			
		||||
	    echo 'Name: OpenSSL-libcrypto'; \
 | 
			
		||||
	    echo 'Description: OpenSSL cryptography library'; \
 | 
			
		||||
	    echo 'Version: '$(VERSION); \
 | 
			
		||||
	    echo 'Requires: '; \
 | 
			
		||||
	    echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
 | 
			
		||||
	    echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
 | 
			
		||||
 | 
			
		||||
libssl.pc: Makefile
 | 
			
		||||
	@ ( echo 'prefix=$(INSTALLTOP)'; \
 | 
			
		||||
	    echo 'exec_prefix=$${prefix}'; \
 | 
			
		||||
	    echo 'libdir=$${exec_prefix}/lib'; \
 | 
			
		||||
	    echo 'includedir=$${prefix}/include'; \
 | 
			
		||||
	    echo ''; \
 | 
			
		||||
	    echo 'Name: OpenSSL'; \
 | 
			
		||||
	    echo 'Description: Secure Sockets Layer and cryptography libraries'; \
 | 
			
		||||
	    echo 'Version: '$(VERSION); \
 | 
			
		||||
	    echo 'Requires: '; \
 | 
			
		||||
	    echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
 | 
			
		||||
	    echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
 | 
			
		||||
 | 
			
		||||
openssl.pc: Makefile
 | 
			
		||||
	@ ( echo 'prefix=$(INSTALLTOP)'; \
 | 
			
		||||
	    echo 'exec_prefix=$${prefix}'; \
 | 
			
		||||
@@ -270,19 +343,13 @@ Makefile: Makefile.org Configure config
 | 
			
		||||
	@false
 | 
			
		||||
 | 
			
		||||
libclean:
 | 
			
		||||
	rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
 | 
			
		||||
	rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
 | 
			
		||||
 | 
			
		||||
clean:	libclean
 | 
			
		||||
	rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
 | 
			
		||||
	@set -e; for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making clean in $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
 | 
			
		||||
		rm -f $(LIBS); \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	rm -f openssl.pc
 | 
			
		||||
	@set -e; target=clean; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
	rm -f $(LIBS)
 | 
			
		||||
	rm -f openssl.pc libssl.pc libcrypto.pc
 | 
			
		||||
	rm -f speed.* .pure
 | 
			
		||||
	rm -f $(TARFILE)
 | 
			
		||||
	@set -e; for i in $(ONEDIRS) ;\
 | 
			
		||||
@@ -296,32 +363,20 @@ makefile.one: files
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
 | 
			
		||||
	@set -e; for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making 'files' in $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	@set -e; target=files; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
 | 
			
		||||
links:
 | 
			
		||||
	@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
 | 
			
		||||
	@set -e; target=links; for dir in $(DIRS); do $(BUILD_CMD); done
 | 
			
		||||
	@set -e; target=links; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
 | 
			
		||||
gentests:
 | 
			
		||||
	@(cd test && echo "generating dummy tests (if needed)..." && \
 | 
			
		||||
	$(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
 | 
			
		||||
	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
	rm -f *.bak
 | 
			
		||||
	@set -e; for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making dclean in $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	@set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
 | 
			
		||||
rehash: rehash.time
 | 
			
		||||
rehash.time: certs
 | 
			
		||||
@@ -335,29 +390,17 @@ test:   tests
 | 
			
		||||
 | 
			
		||||
tests: rehash
 | 
			
		||||
	@(cd test && echo "testing..." && \
 | 
			
		||||
	$(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
 | 
			
		||||
	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
 | 
			
		||||
	util/opensslwrap.sh version -a
 | 
			
		||||
 | 
			
		||||
report:
 | 
			
		||||
	@$(PERL) util/selftest.pl
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	@set -e; for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making dependencies $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' CFLAG='-DOPENSSL_NO_DEPRECATED ${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	@set -e; target=depend; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
 | 
			
		||||
lint:
 | 
			
		||||
	@set -e; for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making lint $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	@set -e; target=lint; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	rm -f TAGS
 | 
			
		||||
@@ -366,6 +409,7 @@ tags:
 | 
			
		||||
errors:
 | 
			
		||||
	$(PERL) util/mkerr.pl -recurse -write
 | 
			
		||||
	(cd engines; $(MAKE) PERL=$(PERL) errors)
 | 
			
		||||
	$(PERL) util/ck_errf.pl */*.c */*/*.c
 | 
			
		||||
 | 
			
		||||
stacks:
 | 
			
		||||
	$(PERL) util/mkstack.pl -write
 | 
			
		||||
@@ -384,11 +428,15 @@ crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt c
 | 
			
		||||
apps/openssl-vms.cnf: apps/openssl.cnf
 | 
			
		||||
	$(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
 | 
			
		||||
 | 
			
		||||
crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
 | 
			
		||||
	$(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TABLE: Configure
 | 
			
		||||
	(echo 'Output of `Configure TABLE'"':"; \
 | 
			
		||||
	$(PERL) Configure TABLE) > TABLE
 | 
			
		||||
 | 
			
		||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE
 | 
			
		||||
update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
 | 
			
		||||
 | 
			
		||||
# Build distribution tar-file. As the list of files returned by "find" is
 | 
			
		||||
# pretty long, on several platforms a "too many arguments" error or similar
 | 
			
		||||
@@ -423,7 +471,7 @@ dist:
 | 
			
		||||
	@$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
 | 
			
		||||
 | 
			
		||||
dist_pem_h:
 | 
			
		||||
	(cd crypto/pem; $(MAKE) $(BUILDENV) pem.h; $(MAKE) clean)
 | 
			
		||||
	(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
 | 
			
		||||
 | 
			
		||||
install: all install_docs install_sw
 | 
			
		||||
 | 
			
		||||
@@ -441,13 +489,7 @@ install_sw:
 | 
			
		||||
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 | 
			
		||||
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@set -e; for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i; echo "installing $$i..."; \
 | 
			
		||||
		$(MAKE) $(BUILDENV) INSTALL_PREFIX='${INSTALL_PREFIX}' OPENSSLDIR='${OPENSSLDIR}' install ); \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done
 | 
			
		||||
	@set -e; target=install; $(RECURSIVE_BUILD_CMD)
 | 
			
		||||
	@set -e; for i in $(LIBS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
		if [ -f "$$i" ]; then \
 | 
			
		||||
@@ -469,13 +511,13 @@ install_sw:
 | 
			
		||||
					chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
				else \
 | 
			
		||||
					c=`echo $$i | sed 's/^lib/cyg/'`; \
 | 
			
		||||
					c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
 | 
			
		||||
					cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
			
		||||
					chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
				fi ); \
 | 
			
		||||
			fi; \
 | 
			
		||||
		done; \
 | 
			
		||||
@@ -489,6 +531,10 @@ install_sw:
 | 
			
		||||
			sed -e '1,/^$$/d' doc/openssl-shared.txt; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi
 | 
			
		||||
	cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
 | 
			
		||||
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libcrypto.pc
 | 
			
		||||
	cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
 | 
			
		||||
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libssl.pc
 | 
			
		||||
	cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
 | 
			
		||||
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
 | 
			
		||||
 | 
			
		||||
@@ -514,8 +560,8 @@ install_docs:
 | 
			
		||||
			--release=$(VERSION) `basename $$i`") \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
 | 
			
		||||
		$(PERL) util/extract-names.pl < $$i | \
 | 
			
		||||
			grep -v $$filecase "^$$fn\$$" | \
 | 
			
		||||
			grep -v "[	]" | \
 | 
			
		||||
			(grep -v $$filecase "^$$fn\$$"; true) | \
 | 
			
		||||
			(grep -v "[	]"; true) | \
 | 
			
		||||
			(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
 | 
			
		||||
			 while read n; do \
 | 
			
		||||
				$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
 | 
			
		||||
@@ -531,8 +577,8 @@ install_docs:
 | 
			
		||||
			--release=$(VERSION) `basename $$i`") \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
 | 
			
		||||
		$(PERL) util/extract-names.pl < $$i | \
 | 
			
		||||
			grep -v $$filecase "^$$fn\$$" | \
 | 
			
		||||
			grep -v "[	]" | \
 | 
			
		||||
			(grep -v $$filecase "^$$fn\$$"; true) | \
 | 
			
		||||
			(grep -v "[	]"; true) | \
 | 
			
		||||
			(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
 | 
			
		||||
			 while read n; do \
 | 
			
		||||
				$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										339
									
								
								Makefile.shared
									
									
									
									
									
								
							
							
						
						
									
										339
									
								
								Makefile.shared
									
									
									
									
									
								
							@@ -7,6 +7,7 @@
 | 
			
		||||
 | 
			
		||||
# CC contains the current compiler.  This one MUST be defined
 | 
			
		||||
CC=cc
 | 
			
		||||
CFLAGS=$(CFLAG)
 | 
			
		||||
# LDFLAGS contains flags to be used when temporary object files (when building
 | 
			
		||||
# shared libraries) are created, or when an application is linked.
 | 
			
		||||
# SHARED_LDFLAGS contains flags to be used when the shared library is created.
 | 
			
		||||
@@ -88,20 +89,28 @@ CALC_VERSIONS=	\
 | 
			
		||||
 | 
			
		||||
LINK_APP=	\
 | 
			
		||||
  ( $(SET_X);   \
 | 
			
		||||
    LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
 | 
			
		||||
    LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
 | 
			
		||||
    LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
 | 
			
		||||
    LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
 | 
			
		||||
    LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
 | 
			
		||||
    $$LDCMD $$LDFLAGS -o $$APPNAME $(OBJECTS) $$LIBDEPS )
 | 
			
		||||
    $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
 | 
			
		||||
 | 
			
		||||
LINK_SO=	\
 | 
			
		||||
  ( $(SET_X);   \
 | 
			
		||||
    LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
 | 
			
		||||
    SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
 | 
			
		||||
    SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
 | 
			
		||||
    nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
 | 
			
		||||
    LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
 | 
			
		||||
    LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
 | 
			
		||||
    LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
 | 
			
		||||
    $$SHAREDCMD $$SHAREDFLAGS -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
 | 
			
		||||
	$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS ) && \
 | 
			
		||||
  $(SYMLINK_SO); ( $(SET_X); rm -f lib$(LIBNAME).exp )
 | 
			
		||||
    $${SHAREDCMD} $${SHAREDFLAGS} \
 | 
			
		||||
	-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
 | 
			
		||||
	$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
 | 
			
		||||
  ) && $(SYMLINK_SO); \
 | 
			
		||||
  ( $(SET_X); rm -f lib$(LIBNAME).exp )
 | 
			
		||||
 | 
			
		||||
SYMLINK_SO=	\
 | 
			
		||||
	if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
 | 
			
		||||
		prev=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
 | 
			
		||||
@@ -120,12 +129,14 @@ SYMLINK_SO=	\
 | 
			
		||||
 | 
			
		||||
LINK_SO_A=	SHOBJECTS="lib$(LIBNAME).a $(LIBEXTRAS)"; $(LINK_SO)
 | 
			
		||||
LINK_SO_O=	SHOBJECTS="$(LIBEXTRAS)"; $(LINK_SO)
 | 
			
		||||
 | 
			
		||||
LINK_SO_A_VIA_O=	\
 | 
			
		||||
  SHOBJECTS=lib$(LIBNAME).o; \
 | 
			
		||||
  ALL=$$ALLSYMSFLAGS; ALLSYMSFLAGS=; NOALLSYMSFLAGS=; \
 | 
			
		||||
  ( $(SET_X); \
 | 
			
		||||
    ld $(LDFLAGS) -r -o lib$(LIBNAME).o $$ALL lib$(LIBNAME).a $(LIBEXTRAS) ); \
 | 
			
		||||
  $(LINK_SO) && rm -f $(LIBNAME).o
 | 
			
		||||
 | 
			
		||||
LINK_SO_A_UNPACKED=	\
 | 
			
		||||
  UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
 | 
			
		||||
  (cd $$UNPACKDIR; ar x ../lib$(LIBNAME).a) && \
 | 
			
		||||
@@ -138,15 +149,11 @@ DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
 | 
			
		||||
DO_GNU_SO=$(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS='-Wl,--whole-archive'; \
 | 
			
		||||
	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
 | 
			
		||||
	SHAREDCMD='$(CC)'
 | 
			
		||||
DO_GNU_APP=LDCMD=$(CC);\
 | 
			
		||||
	LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME=$(APPNAME)
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
 | 
			
		||||
 | 
			
		||||
DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
 | 
			
		||||
 | 
			
		||||
#This is rather special.  It's a special target with which one can link
 | 
			
		||||
#applications without bothering with any features that have anything to
 | 
			
		||||
@@ -154,10 +161,6 @@ DO_GNU_APP=LDCMD=$(CC);\
 | 
			
		||||
#libraries.  It's mostly here to avoid a lot of conditionals everywhere
 | 
			
		||||
#else...
 | 
			
		||||
link_app.:
 | 
			
		||||
	LDCMD=$(CC); \
 | 
			
		||||
	LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
link_o.gnu:
 | 
			
		||||
@@ -172,41 +175,38 @@ link_o.bsd:
 | 
			
		||||
	$(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS=; \
 | 
			
		||||
	LIBDEPS=" "; \
 | 
			
		||||
	ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
 | 
			
		||||
	NOALLSYMSFLAGS=; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -shared -nostdlib"; \
 | 
			
		||||
	SHAREDCMD=$(CC); \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -nostdlib"; \
 | 
			
		||||
	fi; $(LINK_SO_O)
 | 
			
		||||
link_a.bsd:
 | 
			
		||||
	@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
 | 
			
		||||
	$(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS=; \
 | 
			
		||||
	LIBDEPS=" "; \
 | 
			
		||||
	ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
 | 
			
		||||
	NOALLSYMSFLAGS=; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -shared -nostdlib"; \
 | 
			
		||||
	SHAREDCMD=$(CC); \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -nostdlib"; \
 | 
			
		||||
	fi; $(LINK_SO_A)
 | 
			
		||||
link_app.bsd:
 | 
			
		||||
	@if ${DETECT_GNU_LD}; then $(DO_GNU_APP); else \
 | 
			
		||||
	LDCMD=$(CC); \
 | 
			
		||||
	LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBPATH)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; $(LINK_APP)
 | 
			
		||||
 | 
			
		||||
# For Darwin AKA Mac OS/X (dyld)
 | 
			
		||||
# link_o.darwin produces .so, because we let it use dso_dlfcn module,
 | 
			
		||||
# which has .so extension hard-coded. One can argue that one should
 | 
			
		||||
# develop special dso module for MacOS X. At least manual encourages
 | 
			
		||||
# to use native NSModule(3) API and refers to dlfcn as termporary hack.
 | 
			
		||||
link_o.darwin:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME); \
 | 
			
		||||
	SHLIB_SUFFIX=.dylib; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	SHLIB_SUFFIX=.so; \
 | 
			
		||||
	ALLSYMSFLAGS='-all_load'; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -dynamiclib"; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \
 | 
			
		||||
	if [ -n "$(LIBVERSION)" ]; then \
 | 
			
		||||
		SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
@@ -218,61 +218,55 @@ link_a.darwin:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME); \
 | 
			
		||||
	SHLIB_SUFFIX=.dylib; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS='-all_load'; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -dynamiclib"; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \
 | 
			
		||||
	if [ -n "$(LIBVERSION)" ]; then \
 | 
			
		||||
		SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
 | 
			
		||||
		SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	SHAREDFLAGS="$$SHAREDFLAGS -install_name ${INSTALLTOP}/lib/$$SHLIB${SHLIB_EXT}"; \
 | 
			
		||||
	$(LINK_SO_A)
 | 
			
		||||
link_app.darwin:
 | 
			
		||||
	LDCMD=$(CC);\
 | 
			
		||||
	LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"; \
 | 
			
		||||
link_app.darwin:	# is there run-path on darwin?
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
link_o.cygwin:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	INHIBIT_SYMLINKS=yes; \
 | 
			
		||||
	SHLIB=cyg$(LIBNAME); \
 | 
			
		||||
	expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
 | 
			
		||||
	base=-Wl,--enable-auto-image-base; \
 | 
			
		||||
	if expr $(PLATFORM) : 'mingw' > /dev/null; then \
 | 
			
		||||
		SHLIB=$(LIBNAME)eay32; base=; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	SHLIB_SUFFIX=.dll; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	SHLIB_SOVER=-$(LIBVERSION); \
 | 
			
		||||
	LIBVERSION="$(LIBVERSION)"; \
 | 
			
		||||
	SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \
 | 
			
		||||
	ALLSYMSFLAGS='-Wl,--whole-archive'; \
 | 
			
		||||
	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
 | 
			
		||||
	SHAREDCMD='${CC}'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.cygwin:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	INHIBIT_SYMLINKS=yes; \
 | 
			
		||||
	SHLIB=cyg$(LIBNAME); \
 | 
			
		||||
	expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
 | 
			
		||||
	base=-Wl,--enable-auto-image-base; \
 | 
			
		||||
	if expr $(PLATFORM) : 'mingw' > /dev/null; then \
 | 
			
		||||
		SHLIB=$(LIBNAME)eay32; \
 | 
			
		||||
		base=;  [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	SHLIB_SUFFIX=.dll; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	SHLIB_SOVER=; \
 | 
			
		||||
	SHLIB_SOVER=-$(LIBVERSION); \
 | 
			
		||||
	ALLSYMSFLAGS='-Wl,--whole-archive'; \
 | 
			
		||||
	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
 | 
			
		||||
	base=;  [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x61200000; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
 | 
			
		||||
	SHAREDCMD='${CC}'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
 | 
			
		||||
	[ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \
 | 
			
		||||
	[ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \
 | 
			
		||||
	$(LINK_SO_A) || exit 1; \
 | 
			
		||||
	cp -p $$SHLIB$$SHLIB_SUFFIX apps/; \
 | 
			
		||||
	cp -p $$SHLIB$$SHLIB_SUFFIX test/
 | 
			
		||||
	cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX apps/; \
 | 
			
		||||
	cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX test/
 | 
			
		||||
link_app.cygwin:
 | 
			
		||||
	LDCMD=$(CC);\
 | 
			
		||||
	LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
link_o.alpha-osf1:
 | 
			
		||||
@@ -281,7 +275,6 @@ link_o.alpha-osf1:
 | 
			
		||||
	else \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
			
		||||
@@ -291,10 +284,9 @@ link_o.alpha-osf1:
 | 
			
		||||
		SHLIB_SOVER=; \
 | 
			
		||||
		ALLSYMSFLAGS='-all'; \
 | 
			
		||||
		NOALLSYMSFLAGS='-none'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version $$SHLIB_HIST"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
@@ -304,7 +296,6 @@ link_a.alpha-osf1:
 | 
			
		||||
	else \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
			
		||||
@@ -314,139 +305,17 @@ link_a.alpha-osf1:
 | 
			
		||||
		SHLIB_SOVER=; \
 | 
			
		||||
		ALLSYMSFLAGS='-all'; \
 | 
			
		||||
		NOALLSYMSFLAGS='-none'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version $$SHLIB_HIST"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A)
 | 
			
		||||
link_app.alpha-osf1:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
	@if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
 | 
			
		||||
# option passed to the linker.
 | 
			
		||||
link_o.tru64:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_SO); \
 | 
			
		||||
	else \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
			
		||||
		else \
 | 
			
		||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		SHLIB_SOVER=; \
 | 
			
		||||
		ALLSYMSFLAGS='-all'; \
 | 
			
		||||
		NOALLSYMSFLAGS='-none'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared -msym -rpath $(LIBRPATH)"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.tru64:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_SO); \
 | 
			
		||||
	else \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
			
		||||
		else \
 | 
			
		||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		SHLIB_SOVER=; \
 | 
			
		||||
		ALLSYMSFLAGS='-all'; \
 | 
			
		||||
		NOALLSYMSFLAGS='-none'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared -msym -rpath $(LIBRPATH)"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A)
 | 
			
		||||
link_app.tru64:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS) -rpath $(LIBRPATH)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
# The difference between tru64-shared and tru64-shared-rpath is the
 | 
			
		||||
# -rpath ${LIBRPATH} passed to the linker.
 | 
			
		||||
link_o.tru64-rpath:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_SO); \
 | 
			
		||||
	else \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
			
		||||
		else \
 | 
			
		||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		SHLIB_SOVER=; \
 | 
			
		||||
		ALLSYMSFLAGS='-all'; \
 | 
			
		||||
		NOALLSYMSFLAGS='-none'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared -msym -rpath $(LIBRPATH)"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.tru64-rpath:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_SO); \
 | 
			
		||||
	else \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
			
		||||
		else \
 | 
			
		||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		SHLIB_SOVER=; \
 | 
			
		||||
		ALLSYMSFLAGS='-all'; \
 | 
			
		||||
		NOALLSYMSFLAGS='-none'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared -msym -rpath $(LIBRPATH)"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
			
		||||
			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
			
		||||
		fi; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A)
 | 
			
		||||
link_app.tru64-rpath:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS) -rpath $(LIBRPATH)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
@@ -456,14 +325,12 @@ link_o.solaris:
 | 
			
		||||
	else \
 | 
			
		||||
		$(CALC_VERSIONS); \
 | 
			
		||||
		MINUSZ='-z '; \
 | 
			
		||||
		(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 | 
			
		||||
		($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		ALLSYMSFLAGS="$${MINUSZ}allextract"; \
 | 
			
		||||
		NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.solaris:
 | 
			
		||||
@@ -475,21 +342,16 @@ link_a.solaris:
 | 
			
		||||
		(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=;\
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		ALLSYMSFLAGS="$${MINUSZ}allextract"; \
 | 
			
		||||
		NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A)
 | 
			
		||||
link_app.solaris:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS) -R $(LIBRPATH)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
@@ -501,11 +363,9 @@ link_o.svr3:
 | 
			
		||||
		$(CALC_VERSIONS); \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		ALLSYMSFLAGS=''; \
 | 
			
		||||
		NOALLSYMSFLAGS=''; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.svr3:
 | 
			
		||||
@@ -515,22 +375,13 @@ link_a.svr3:
 | 
			
		||||
		$(CALC_VERSIONS); \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		ALLSYMSFLAGS=''; \
 | 
			
		||||
		NOALLSYMSFLAGS=''; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A_UNPACKED)
 | 
			
		||||
link_app.svr3:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	@${DETECT_GNU_LD} && $(DO_GNU_APP); \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
# UnixWare 7 and OpenUNIX 8 native compilers used
 | 
			
		||||
@@ -540,14 +391,12 @@ link_o.svr5:
 | 
			
		||||
	else \
 | 
			
		||||
		$(CALC_VERSIONS); \
 | 
			
		||||
		SHARE_FLAG='-G'; \
 | 
			
		||||
		(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
 | 
			
		||||
		($(CC) -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		ALLSYMSFLAGS=''; \
 | 
			
		||||
		NOALLSYMSFLAGS=''; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $${SHARE_FLAG} -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.svr5:
 | 
			
		||||
@@ -559,22 +408,13 @@ link_a.svr5:
 | 
			
		||||
		(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		ALLSYMSFLAGS=''; \
 | 
			
		||||
		NOALLSYMSFLAGS=''; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $${SHARE_FLAG} -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A_UNPACKED)
 | 
			
		||||
link_app.svr5:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	@${DETECT_GNU_LD} && $(DO_GNU_APP); \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
link_o.irix:
 | 
			
		||||
@@ -584,13 +424,11 @@ link_o.irix:
 | 
			
		||||
		$(CALC_VERSIONS); \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		MINUSWL=""; \
 | 
			
		||||
		($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
 | 
			
		||||
		ALLSYMSFLAGS="$${MINUSWL}-all"; \
 | 
			
		||||
		NOALLSYMSFLAGS="$${MINUSWL}-none"; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,-B,symbolic"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.irix:
 | 
			
		||||
@@ -600,24 +438,15 @@ link_a.irix:
 | 
			
		||||
		$(CALC_VERSIONS); \
 | 
			
		||||
		SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
		SHLIB_SUFFIX=; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		MINUSWL=""; \
 | 
			
		||||
		($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
 | 
			
		||||
		ALLSYMSFLAGS="$${MINUSWL}-all"; \
 | 
			
		||||
		NOALLSYMSFLAGS="$${MINUSWL}-none"; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
 | 
			
		||||
		SHAREDCMD='$(CC)'; \
 | 
			
		||||
		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,-B,symbolic"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_SO_A)
 | 
			
		||||
link_app.irix:
 | 
			
		||||
	@ if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(DO_GNU_APP); \
 | 
			
		||||
	else \
 | 
			
		||||
		LDCMD=$(CC);\
 | 
			
		||||
		LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
 | 
			
		||||
		LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
		APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	@LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
# 32-bit PA-RISC HP-UX embeds the -L pathname of libs we link with, so
 | 
			
		||||
@@ -632,15 +461,14 @@ link_o.hpux:
 | 
			
		||||
	@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
 | 
			
		||||
	$(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).sl; \
 | 
			
		||||
	expr $(PLATFORM) : '.*ia64' > /dev/null && SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	expr "$(CFLAGS)" : '.*DSO_DLFCN' > /dev/null && SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS='-Wl,-Fl'; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
 | 
			
		||||
	SHAREDCMD=$(CC); \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+cdp,../:,+cdp,./:"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	rm -f $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX || :; \
 | 
			
		||||
	$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 | 
			
		||||
link_a.hpux:
 | 
			
		||||
	@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
 | 
			
		||||
@@ -648,79 +476,60 @@ link_a.hpux:
 | 
			
		||||
	SHLIB=lib$(LIBNAME).sl; \
 | 
			
		||||
	expr $(PLATFORM) : '.*ia64' > /dev/null && SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS='-Wl,-Fl'; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+cdp,../:,+cdp,./:"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	rm -f $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX || :; \
 | 
			
		||||
	$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 | 
			
		||||
link_app.hpux:
 | 
			
		||||
	@if ${DETECT_GNU_LD}; then $(DO_GNU_APP); else \
 | 
			
		||||
	LDCMD=$(CC);\
 | 
			
		||||
	LDFLAGS="$(CFLAGS) -Wl,+s,+cdp,../:,+cdp,./:,+b,$(LIBRPATH)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
link_o.aix:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	OBJECT_MODE=`expr x$(SHARED_LDFLAGS) : 'x\-[a-z]\([0-9]*\)'`; \
 | 
			
		||||
	OBJECT_MODE=`expr x$(SHARED_LDFLAGS) : 'x\-[a-z]*\(64\)'` || :; \
 | 
			
		||||
	OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS='-bnogc'; \
 | 
			
		||||
	ALLSYMSFLAGS=''; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	SHAREDFLAGS='$(CFLAGS) -G -bE:lib$(LIBNAME).exp -bM:SRE -blibpath:$(LIBRPATH)'; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	$(LINK_SO_O); rm -rf lib$(LIBNAME).exp
 | 
			
		||||
	SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-G,-bexpall,-bnolibpath,-bM:SRE'; \
 | 
			
		||||
	$(LINK_SO_O);
 | 
			
		||||
link_a.aix:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	OBJECT_MODE=`expr x$(SHARED_LDFLAGS) : 'x\-[a-z]\([0-9]*\)'`; \
 | 
			
		||||
	OBJECT_MODE=`expr x$(SHARED_LDFLAGS) : 'x\-[a-z]*\(64\)'` || : ; \
 | 
			
		||||
	OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS='-bnogc'; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	SHAREDFLAGS='$(CFLAGS) -G -bE:lib$(LIBNAME).exp -bM:SRE -blibpath:$(LIBRPATH)'; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-G,-bexpall,-bnolibpath,-bM:SRE'; \
 | 
			
		||||
	$(LINK_SO_A_VIA_O)
 | 
			
		||||
link_app.aix:
 | 
			
		||||
	LDCMD=$(CC);\
 | 
			
		||||
	LDFLAGS="$(CFLAGS) -blibpath:$(LIBRPATH)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"
 | 
			
		||||
	LDFLAGS="$(CFLAGS) -Wl,-brtl,-blibpath:$(LIBRPATH):$${LIBPATH:-/usr/lib:/lib}"; \
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
link_o.reliantunix:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS=; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	SHAREDFLAGS='$(CFLAGS) -G'; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	$(LINK_SO_O)
 | 
			
		||||
link_a.reliantunix:
 | 
			
		||||
	@ $(CALC_VERSIONS); \
 | 
			
		||||
	SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	SHLIB_SUFFIX=; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	ALLSYMSFLAGS=; \
 | 
			
		||||
	NOALLSYMSFLAGS=''; \
 | 
			
		||||
	SHAREDFLAGS='$(CFLAGS) -G'; \
 | 
			
		||||
	SHAREDCMD='$(CC)'; \
 | 
			
		||||
	$(LINK_SO_A_UNPACKED)
 | 
			
		||||
link_app.reliantunix:
 | 
			
		||||
	LDCMD=$(CC);\
 | 
			
		||||
	LDFLAGS="$(CFLAGS)"; \
 | 
			
		||||
	LIBDEPS="$(LIBDEPS)"; \
 | 
			
		||||
	APPNAME="$(APPNAME)"
 | 
			
		||||
	$(LINK_APP)
 | 
			
		||||
 | 
			
		||||
# Targets to build symbolic links when needed
 | 
			
		||||
@@ -740,7 +549,7 @@ symlink.hpux:
 | 
			
		||||
	expr $(PLATFORM) : '.*ia64' > /dev/null && SHLIB=lib$(LIBNAME).so; \
 | 
			
		||||
	$(SYMLINK_SO)
 | 
			
		||||
# The following lines means those specific architectures do no symlinks
 | 
			
		||||
symlink.cygwin symlib.alpha-osf1 symlink.tru64 symlink.tru64-rpath:
 | 
			
		||||
symlink.cygwin symlink.alpha-osf1 symlink.tru64 symlink.tru64-rpath:
 | 
			
		||||
 | 
			
		||||
# Compatibility targets
 | 
			
		||||
link_o.bsd-gcc-shared link_o.linux-shared link_o.gnu-shared: link_o.gnu
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										144
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										144
									
								
								NEWS
									
									
									
									
									
								
							@@ -5,6 +5,150 @@
 | 
			
		||||
  This file gives a brief overview of the major changes between each OpenSSL
 | 
			
		||||
  release. For more details please read the CHANGES file.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g:
 | 
			
		||||
 | 
			
		||||
      o Fixes for bugs introduced with 0.9.8f.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f:
 | 
			
		||||
 | 
			
		||||
      o Add gcc 4.2 support.
 | 
			
		||||
      o Add support for AES and SSE2 assembly lanugauge optimization
 | 
			
		||||
        for VC++ build.
 | 
			
		||||
      o Support for RFC4507bis and server name extensions if explicitly 
 | 
			
		||||
        selected at compile time.
 | 
			
		||||
      o DTLS improvements.
 | 
			
		||||
      o RFC4507bis support.
 | 
			
		||||
      o TLS Extensions support.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e:
 | 
			
		||||
 | 
			
		||||
      o Various ciphersuite selection fixes.
 | 
			
		||||
      o RFC3779 support.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d:
 | 
			
		||||
 | 
			
		||||
      o Introduce limits to prevent malicious key DoS  (CVE-2006-2940)
 | 
			
		||||
      o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
 | 
			
		||||
      o Changes to ciphersuite selection algorithm
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c:
 | 
			
		||||
 | 
			
		||||
      o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
 | 
			
		||||
      o New cipher Camellia
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b:
 | 
			
		||||
 | 
			
		||||
      o Cipher string fixes.
 | 
			
		||||
      o Fixes for VC++ 2005.
 | 
			
		||||
      o Updated ECC cipher suite support.
 | 
			
		||||
      o New functions EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free().
 | 
			
		||||
      o Zlib compression usage fixes.
 | 
			
		||||
      o Built in dynamic engine compilation support on Win32.
 | 
			
		||||
      o Fixes auto dynamic engine loading in Win32.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a:
 | 
			
		||||
 | 
			
		||||
      o Fix potential SSL 2.0 rollback, CVE-2005-2969
 | 
			
		||||
      o Extended Windows CE support
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8:
 | 
			
		||||
 | 
			
		||||
      o Major work on the BIGNUM library for higher efficiency and to
 | 
			
		||||
        make operations more streamlined and less contradictory.  This
 | 
			
		||||
        is the result of a major audit of the BIGNUM library.
 | 
			
		||||
      o Addition of BIGNUM functions for fields GF(2^m) and NIST
 | 
			
		||||
        curves, to support the Elliptic Crypto functions.
 | 
			
		||||
      o Major work on Elliptic Crypto; ECDH and ECDSA added, including
 | 
			
		||||
        the use through EVP, X509 and ENGINE.
 | 
			
		||||
      o New ASN.1 mini-compiler that's usable through the OpenSSL
 | 
			
		||||
        configuration file.
 | 
			
		||||
      o Added support for ASN.1 indefinite length constructed encoding.
 | 
			
		||||
      o New PKCS#12 'medium level' API to manipulate PKCS#12 files.
 | 
			
		||||
      o Complete rework of shared library construction and linking
 | 
			
		||||
        programs with shared or static libraries, through a separate
 | 
			
		||||
        Makefile.shared.
 | 
			
		||||
      o Rework of the passing of parameters from one Makefile to another.
 | 
			
		||||
      o Changed ENGINE framework to load dynamic engine modules
 | 
			
		||||
        automatically from specifically given directories.
 | 
			
		||||
      o New structure and ASN.1 functions for CertificatePair.
 | 
			
		||||
      o Changed the ZLIB compression method to be stateful.
 | 
			
		||||
      o Changed the key-generation and primality testing "progress"
 | 
			
		||||
        mechanism to take a structure that contains the ticker
 | 
			
		||||
        function and an argument.
 | 
			
		||||
      o New engine module: GMP (performs private key exponentiation).
 | 
			
		||||
      o New engine module: VIA PadLOck ACE extension in VIA C3
 | 
			
		||||
        Nehemiah processors.
 | 
			
		||||
      o Added support for IPv6 addresses in certificate extensions.
 | 
			
		||||
        See RFC 1884, section 2.2.
 | 
			
		||||
      o Added support for certificate policy mappings, policy
 | 
			
		||||
        constraints and name constraints.
 | 
			
		||||
      o Added support for multi-valued AVAs in the OpenSSL
 | 
			
		||||
        configuration file.
 | 
			
		||||
      o Added support for multiple certificates with the same subject
 | 
			
		||||
        in the 'openssl ca' index file.
 | 
			
		||||
      o Make it possible to create self-signed certificates using
 | 
			
		||||
        'openssl ca -selfsign'.
 | 
			
		||||
      o Make it possible to generate a serial number file with
 | 
			
		||||
        'openssl ca -create_serial'.
 | 
			
		||||
      o New binary search functions with extended functionality.
 | 
			
		||||
      o New BUF functions.
 | 
			
		||||
      o New STORE structure and library to provide an interface to all
 | 
			
		||||
        sorts of data repositories.  Supports storage of public and
 | 
			
		||||
        private keys, certificates, CRLs, numbers and arbitrary blobs.
 | 
			
		||||
	This library is unfortunately unfinished and unused withing
 | 
			
		||||
	OpenSSL.
 | 
			
		||||
      o New control functions for the error stack.
 | 
			
		||||
      o Changed the PKCS#7 library to support one-pass S/MIME
 | 
			
		||||
        processing.
 | 
			
		||||
      o Added the possibility to compile without old deprecated
 | 
			
		||||
        functionality with the OPENSSL_NO_DEPRECATED macro or the
 | 
			
		||||
        'no-deprecated' argument to the config and Configure scripts.
 | 
			
		||||
      o Constification of all ASN.1 conversion functions, and other
 | 
			
		||||
        affected functions.
 | 
			
		||||
      o Improved platform support for PowerPC.
 | 
			
		||||
      o New FIPS 180-2 algorithms (SHA-224, -256, -384 and -512).
 | 
			
		||||
      o New X509_VERIFY_PARAM structure to support parametrisation
 | 
			
		||||
        of X.509 path validation.
 | 
			
		||||
      o Major overhaul of RC4 performance on Intel P4, IA-64 and
 | 
			
		||||
        AMD64.
 | 
			
		||||
      o Changed the Configure script to have some algorithms disabled
 | 
			
		||||
        by default.  Those can be explicitely enabled with the new
 | 
			
		||||
        argument form 'enable-xxx'.
 | 
			
		||||
      o Change the default digest in 'openssl' commands from MD5 to
 | 
			
		||||
        SHA-1.
 | 
			
		||||
      o Added support for DTLS.
 | 
			
		||||
      o New BIGNUM blinding.
 | 
			
		||||
      o Added support for the RSA-PSS encryption scheme
 | 
			
		||||
      o Added support for the RSA X.931 padding.
 | 
			
		||||
      o Added support for BSD sockets on NetWare.
 | 
			
		||||
      o Added support for files larger than 2GB.
 | 
			
		||||
      o Added initial support for Win64.
 | 
			
		||||
      o Added alternate pkg-config files.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l:
 | 
			
		||||
 | 
			
		||||
      o Introduce limits to prevent malicious key DoS  (CVE-2006-2940)
 | 
			
		||||
      o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k:
 | 
			
		||||
 | 
			
		||||
      o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j:
 | 
			
		||||
 | 
			
		||||
      o Visual C++ 2005 fixes.
 | 
			
		||||
      o Update Windows build system for FIPS.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i:
 | 
			
		||||
 | 
			
		||||
      o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h:
 | 
			
		||||
 | 
			
		||||
      o Fix SSL 2.0 Rollback, CVE-2005-2969
 | 
			
		||||
      o Allow use of fixed-length exponent on DSA signing
 | 
			
		||||
      o Default fixed-window RSA, DSA, DH private-key operations
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g:
 | 
			
		||||
 | 
			
		||||
      o More compilation issues fixed.
 | 
			
		||||
 
 | 
			
		||||
@@ -6,14 +6,16 @@ rem
 | 
			
		||||
rem   usage:
 | 
			
		||||
rem      build [target] [debug opts] [assembly opts] [configure opts]
 | 
			
		||||
rem
 | 
			
		||||
rem      target        - "netware-clib" - CLib NetWare build
 | 
			
		||||
rem                    - "netware-libc" - LibC NKS NetWare build
 | 
			
		||||
rem      target        - "netware-clib" - CLib NetWare build (WinSock Sockets)
 | 
			
		||||
rem                    - "netware-clib-bsdsock" - CLib NetWare build (BSD Sockets)
 | 
			
		||||
rem                    - "netware-libc" - LibC NetWare build (WinSock Sockets)
 | 
			
		||||
rem                    - "netware-libc-bsdsock" - LibC NetWare build (BSD Sockets)
 | 
			
		||||
rem 
 | 
			
		||||
rem      debug opts    - "debug"  - build debug
 | 
			
		||||
rem
 | 
			
		||||
rem      assembly opts - "nw-mwasm" - use Metrowerks assembler
 | 
			
		||||
rem      "nw-nasm"  - use NASM assembler
 | 
			
		||||
rem      "no-asm"   - don't use assembly
 | 
			
		||||
rem                    - "nw-nasm"  - use NASM assembler
 | 
			
		||||
rem                    - "no-asm"   - don't use assembly
 | 
			
		||||
rem
 | 
			
		||||
rem      configure opts- all unrecognized arguments are passed to the
 | 
			
		||||
rem                       perl configure script
 | 
			
		||||
@@ -70,12 +72,16 @@ if "%1" == "nw-nasm"  set NO_ASM=
 | 
			
		||||
if "%1" == "nw-nasm"  set ARG_PROCESSED=YES
 | 
			
		||||
if "%1" == "nw-mwasm" set ASM_MODE=nw-mwasm
 | 
			
		||||
if "%1" == "nw-mwasm" set ASSEMBLER=Metrowerks
 | 
			
		||||
if "%1" == "nw-mwasm"  set NO_ASM=
 | 
			
		||||
if "%1" == "nw-mwasm" set NO_ASM=
 | 
			
		||||
if "%1" == "nw-mwasm" set ARG_PROCESSED=YES
 | 
			
		||||
if "%1" == "netware-clib" set BLD_TARGET=netware-clib
 | 
			
		||||
if "%1" == "netware-clib" set ARG_PROCESSED=YES
 | 
			
		||||
if "%1" == "netware-clib-bsdsock" set BLD_TARGET=netware-clib-bsdsock
 | 
			
		||||
if "%1" == "netware-clib-bsdsock" set ARG_PROCESSED=YES
 | 
			
		||||
if "%1" == "netware-libc" set BLD_TARGET=netware-libc
 | 
			
		||||
if "%1" == "netware-libc" set ARG_PROCESSED=YES
 | 
			
		||||
if "%1" == "netware-libc-bsdsock" set BLD_TARGET=netware-libc-bsdsock
 | 
			
		||||
if "%1" == "netware-libc-bsdsock" set ARG_PROCESSED=YES
 | 
			
		||||
 | 
			
		||||
rem   If we didn't recognize the argument, consider it an option for config
 | 
			
		||||
if "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1
 | 
			
		||||
@@ -91,7 +97,9 @@ if "%BLD_TARGET%" == "no_target" goto no_target
 | 
			
		||||
rem build the nlm make file name which includes target and debug info
 | 
			
		||||
set NLM_MAKE=
 | 
			
		||||
if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clib
 | 
			
		||||
if "%BLD_TARGET%" == "netware-clib-bsdsock" set NLM_MAKE=netware\nlm_clib_bsdsock
 | 
			
		||||
if "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libc
 | 
			
		||||
if "%BLD_TARGET%" == "netware-libc-bsdsock" set NLM_MAKE=netware\nlm_libc_bsdsock
 | 
			
		||||
if "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.mak
 | 
			
		||||
if "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.mak
 | 
			
		||||
 | 
			
		||||
@@ -106,7 +114,14 @@ echo Generating x86 for %ASSEMBLER% assembler
 | 
			
		||||
 | 
			
		||||
echo Bignum
 | 
			
		||||
cd crypto\bn\asm
 | 
			
		||||
perl x86.pl %ASM_MODE% > bn-nw.asm
 | 
			
		||||
rem perl x86.pl %ASM_MODE% > bn-nw.asm
 | 
			
		||||
perl bn-586.pl %ASM_MODE% > bn-nw.asm
 | 
			
		||||
perl co-586.pl %ASM_MODE% > co-nw.asm
 | 
			
		||||
cd ..\..\..
 | 
			
		||||
 | 
			
		||||
echo AES
 | 
			
		||||
cd crypto\aes\asm
 | 
			
		||||
perl aes-586.pl %ASM_MODE% > a-nw.asm
 | 
			
		||||
cd ..\..\..
 | 
			
		||||
 | 
			
		||||
echo DES
 | 
			
		||||
@@ -156,6 +171,11 @@ cd crypto\rc5\asm
 | 
			
		||||
perl rc5-586.pl %ASM_MODE% > r5-nw.asm
 | 
			
		||||
cd ..\..\..
 | 
			
		||||
 | 
			
		||||
echo CPUID
 | 
			
		||||
cd crypto
 | 
			
		||||
perl x86cpuid.pl %ASM_MODE% > x86cpuid-nw.asm
 | 
			
		||||
cd ..\
 | 
			
		||||
 | 
			
		||||
rem ===============================================================
 | 
			
		||||
rem
 | 
			
		||||
:do_config
 | 
			
		||||
@@ -172,8 +192,10 @@ echo mk1mf.pl options: %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET%
 | 
			
		||||
echo .
 | 
			
		||||
perl util\mk1mf.pl %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET% >%NLM_MAKE%
 | 
			
		||||
 | 
			
		||||
make -f %NLM_MAKE% vclean
 | 
			
		||||
echo .
 | 
			
		||||
echo The makefile "%NLM_MAKE%" has been created use your maketool to
 | 
			
		||||
echo build (ex: gmake -f %NLM_MAKE%)
 | 
			
		||||
echo build (ex: make -f %NLM_MAKE%)
 | 
			
		||||
goto end
 | 
			
		||||
 | 
			
		||||
rem ===============================================================
 | 
			
		||||
@@ -184,8 +206,10 @@ echo .  No build target specified!!!
 | 
			
		||||
echo .
 | 
			
		||||
echo .  usage: build [target] [debug opts] [assembly opts] [configure opts]
 | 
			
		||||
echo .
 | 
			
		||||
echo .     target        - "netware-clib" - CLib NetWare build
 | 
			
		||||
echo .                   - "netware-libc" - LibC NKS NetWare build
 | 
			
		||||
echo .     target        - "netware-clib" - CLib NetWare build (WinSock Sockets)
 | 
			
		||||
echo .                   - "netware-clib-bsdsock" - CLib NetWare build (BSD Sockets)
 | 
			
		||||
echo .                   - "netware-libc" - LibC NetWare build (WinSock Sockets)
 | 
			
		||||
echo .                   - "netware-libc-bsdsock" - LibC NetWare build (BSD Sockets)
 | 
			
		||||
echo .
 | 
			
		||||
echo .     debug opts    - "debug"  - build debug
 | 
			
		||||
echo .
 | 
			
		||||
 
 | 
			
		||||
@@ -73,6 +73,7 @@ copy %loc%\test\testsid.pem   %2\openssl\test\
 | 
			
		||||
copy %loc%\test\testx509.pem  %2\openssl\test\
 | 
			
		||||
copy %loc%\test\v3-cert1.pem  %2\openssl\test\
 | 
			
		||||
copy %loc%\test\v3-cert2.pem  %2\openssl\test\
 | 
			
		||||
copy %loc%\crypto\evp\evptests.txt %2\openssl\test\
 | 
			
		||||
 | 
			
		||||
rem   copy the apps directory stuff
 | 
			
		||||
copy %loc%\apps\client.pem    %2\openssl\apps\
 | 
			
		||||
 
 | 
			
		||||
@@ -34,16 +34,21 @@ sub main()
 | 
			
		||||
   # delete all the output files in the output directory
 | 
			
		||||
   unlink <$output_path\\*.*>;
 | 
			
		||||
 | 
			
		||||
   # open the main log file 
 | 
			
		||||
   # open the main log file
 | 
			
		||||
   open(OUT, ">$log_file") || die "unable to open $log_file\n";
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
   print( OUT "========================================================\n");
 | 
			
		||||
   my $outFile = "$output_path\\version.out";
 | 
			
		||||
   system("openssl2 version (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_output("CHECKING FOR OPENSSL VERSION:", $outFile);
 | 
			
		||||
 | 
			
		||||
   algorithm_tests();
 | 
			
		||||
   encryption_tests();
 | 
			
		||||
   evp_tests();
 | 
			
		||||
   pem_tests();
 | 
			
		||||
   verify_tests();
 | 
			
		||||
   ssl_tests();
 | 
			
		||||
   ca_tests();
 | 
			
		||||
   ssl_tests();
 | 
			
		||||
 | 
			
		||||
   close(OUT);
 | 
			
		||||
 | 
			
		||||
@@ -56,9 +61,10 @@ sub algorithm_tests
 | 
			
		||||
{
 | 
			
		||||
   my $i;
 | 
			
		||||
   my $outFile;
 | 
			
		||||
   my @tests = ( rsa_test, destest, ideatest, bftest, shatest, sha1test,
 | 
			
		||||
                 md5test, dsatest, md2test, mdc2test, rc2test, rc4test, randtest,
 | 
			
		||||
                 dhtest, exptest );
 | 
			
		||||
   my @tests = ( rsa_test, destest, ideatest, bftest, bntest, shatest, sha1test,
 | 
			
		||||
                 sha256t, sha512t, dsatest, md2test, md4test, md5test, mdc2test,
 | 
			
		||||
                 rc2test, rc4test, rc5test, randtest, rmdtest, dhtest, ecdhtest,
 | 
			
		||||
                 ecdsatest, ectest, exptest, casttest, hmactest );
 | 
			
		||||
 | 
			
		||||
   print( "\nRUNNING CRYPTO ALGORITHM TESTS:\n\n");
 | 
			
		||||
 | 
			
		||||
@@ -67,10 +73,17 @@ sub algorithm_tests
 | 
			
		||||
 | 
			
		||||
   foreach $i (@tests)
 | 
			
		||||
   {
 | 
			
		||||
      $outFile = "$output_path\\$i.out";
 | 
			
		||||
      system("$i > $outFile");
 | 
			
		||||
      log_desc("Test: $i\.nlm:");
 | 
			
		||||
      log_output("", $outFile );
 | 
			
		||||
      if (-e "$base_path\\$i.nlm")
 | 
			
		||||
      {
 | 
			
		||||
         $outFile = "$output_path\\$i.out";
 | 
			
		||||
         system("$i (CLIB_OPT)/>$outFile");
 | 
			
		||||
         log_desc("Test: $i\.nlm:");
 | 
			
		||||
         log_output("", $outFile );
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
         log_desc("Test: $i\.nlm: file not found");
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -102,24 +115,24 @@ sub encryption_tests
 | 
			
		||||
 | 
			
		||||
      # do encryption
 | 
			
		||||
      $outFile = "$output_path\\enc.out";
 | 
			
		||||
      system("openssl2 $i -e -bufsize 113 -k test -in $input -out $cipher > $outFile" );
 | 
			
		||||
      system("openssl2 $i -e -bufsize 113 -k test -in $input -out $cipher (CLIB_OPT)/>$outFile" );
 | 
			
		||||
      log_output("Encrypting: $input --> $cipher", $outFile);
 | 
			
		||||
 | 
			
		||||
      # do decryption
 | 
			
		||||
      $outFile = "$output_path\\dec.out";
 | 
			
		||||
      system("openssl2 $i -d -bufsize 157 -k test -in $cipher -out $clear > $outFile");
 | 
			
		||||
      system("openssl2 $i -d -bufsize 157 -k test -in $cipher -out $clear (CLIB_OPT)/>$outFile");
 | 
			
		||||
      log_output("Decrypting: $cipher --> $clear", $outFile);
 | 
			
		||||
 | 
			
		||||
      # compare files
 | 
			
		||||
      $x = compare_files( $input, $clear, 1);
 | 
			
		||||
      if ( $x == 0 )
 | 
			
		||||
      {
 | 
			
		||||
         print( "SUCCESS - files match: $input, $clear\n");
 | 
			
		||||
         print( "\rSUCCESS - files match: $input, $clear\n");
 | 
			
		||||
         print( OUT "SUCCESS - files match: $input, $clear\n");
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
         print( "ERROR: files don't match\n");
 | 
			
		||||
         print( "\rERROR: files don't match\n");
 | 
			
		||||
         print( OUT "ERROR: files don't match\n");
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -129,24 +142,24 @@ sub encryption_tests
 | 
			
		||||
 | 
			
		||||
      # do encryption B64
 | 
			
		||||
      $outFile = "$output_path\\B64enc.out";
 | 
			
		||||
      system("openssl2 $i -a -e -bufsize 113 -k test -in $input -out $cipher > $outFile");
 | 
			
		||||
      system("openssl2 $i -a -e -bufsize 113 -k test -in $input -out $cipher (CLIB_OPT)/>$outFile");
 | 
			
		||||
      log_output("Encrypting(B64): $cipher --> $clear", $outFile);
 | 
			
		||||
 | 
			
		||||
      # do decryption B64
 | 
			
		||||
      $outFile = "$output_path\\B64dec.out";
 | 
			
		||||
      system("openssl2 $i -a -d -bufsize 157 -k test -in $cipher -out $clear > $outFile");
 | 
			
		||||
      system("openssl2 $i -a -d -bufsize 157 -k test -in $cipher -out $clear (CLIB_OPT)/>$outFile");
 | 
			
		||||
      log_output("Decrypting(B64): $cipher --> $clear", $outFile);
 | 
			
		||||
 | 
			
		||||
      # compare files
 | 
			
		||||
      $x = compare_files( $input, $clear, 1);
 | 
			
		||||
      if ( $x == 0 )
 | 
			
		||||
      {
 | 
			
		||||
         print( "SUCCESS - files match: $input, $clear\n");
 | 
			
		||||
         print( "\rSUCCESS - files match: $input, $clear\n");
 | 
			
		||||
         print( OUT "SUCCESS - files match: $input, $clear\n");
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
         print( "ERROR: files don't match\n");
 | 
			
		||||
         print( "\rERROR: files don't match\n");
 | 
			
		||||
         print( OUT "ERROR: files don't match\n");
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -192,24 +205,24 @@ sub pem_tests
 | 
			
		||||
 | 
			
		||||
      if ($i ne "req" )
 | 
			
		||||
      {
 | 
			
		||||
         system("openssl2 $i -in $input -out $tmp_out > $outFile");
 | 
			
		||||
         system("openssl2 $i -in $input -out $tmp_out (CLIB_OPT)/>$outFile");
 | 
			
		||||
         log_output( "openssl2 $i -in $input -out $tmp_out", $outFile);
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
         system("openssl2 $i -in $input -out $tmp_out -config $OpenSSL_config > $outFile");
 | 
			
		||||
         system("openssl2 $i -in $input -out $tmp_out -config $OpenSSL_config (CLIB_OPT)/>$outFile");
 | 
			
		||||
         log_output( "openssl2 $i -in $input -out $tmp_out -config $OpenSSL_config", $outFile );
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      $x = compare_files( $input, $tmp_out);
 | 
			
		||||
      if ( $x == 0 )
 | 
			
		||||
      {
 | 
			
		||||
         print( "SUCCESS - files match: $input, $tmp_out\n");
 | 
			
		||||
         print( "\rSUCCESS - files match: $input, $tmp_out\n");
 | 
			
		||||
         print( OUT "SUCCESS - files match: $input, $tmp_out\n");
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
         print( "ERROR: files don't match\n");
 | 
			
		||||
         print( "\rERROR: files don't match\n");
 | 
			
		||||
         print( OUT "ERROR: files don't match\n");
 | 
			
		||||
      }
 | 
			
		||||
      do_wait();
 | 
			
		||||
@@ -224,7 +237,8 @@ sub verify_tests
 | 
			
		||||
   my $i;
 | 
			
		||||
   my $outFile = "$output_path\\verify.out";
 | 
			
		||||
 | 
			
		||||
   my @cert_files = <$cert_path\\*.pem>;
 | 
			
		||||
   $cert_path =~ s/\\/\//g;
 | 
			
		||||
   my @cert_files = <$cert_path/*.pem>;
 | 
			
		||||
 | 
			
		||||
   print( "\nRUNNING VERIFY TESTS:\n\n");
 | 
			
		||||
 | 
			
		||||
@@ -235,7 +249,7 @@ sub verify_tests
 | 
			
		||||
 | 
			
		||||
   foreach $i (@cert_files)
 | 
			
		||||
   {
 | 
			
		||||
      system("openssl2 verify -CAfile $tmp_cert $i >$outFile");
 | 
			
		||||
      system("openssl2 verify -CAfile $tmp_cert $i (CLIB_OPT)/>$outFile");
 | 
			
		||||
      log_desc("Verifying cert: $i");
 | 
			
		||||
      log_output("openssl2 verify -CAfile $tmp_cert $i", $outFile);
 | 
			
		||||
   }
 | 
			
		||||
@@ -246,113 +260,115 @@ sub verify_tests
 | 
			
		||||
sub ssl_tests
 | 
			
		||||
{
 | 
			
		||||
   my $outFile = "$output_path\\ssl_tst.out";
 | 
			
		||||
   my($CAcert) = "$output_path\\certCA.ss";
 | 
			
		||||
   my($Ukey)   = "$output_path\\keyU.ss";
 | 
			
		||||
   my($Ucert)  = "$output_path\\certU.ss";
 | 
			
		||||
   my($ssltest)= "ssltest -key $Ukey -cert $Ucert -c_key $Ukey -c_cert $Ucert -CAfile $CAcert";
 | 
			
		||||
 | 
			
		||||
   print( "\nRUNNING SSL TESTS:\n\n");
 | 
			
		||||
 | 
			
		||||
   print( OUT "\n========================================================\n");
 | 
			
		||||
   print( OUT "SSL TESTS:\n\n");
 | 
			
		||||
 | 
			
		||||
   make_tmp_cert_file();
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl2 >$outFile");
 | 
			
		||||
   system("ssltest -ssl2 (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2:");
 | 
			
		||||
   log_output("ssltest -ssl2", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -ssl2 -server_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 with server authentication:");
 | 
			
		||||
   log_output("ssltest -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -ssl2 -server_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -ssl2 -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 with client authentication:");
 | 
			
		||||
   log_output("ssltest -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -ssl2 -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -ssl2 -server_auth -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 with both client and server authentication:");
 | 
			
		||||
   log_output("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -ssl2 -server_auth -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl3 >$outFile");
 | 
			
		||||
   system("ssltest -ssl3 (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3:");
 | 
			
		||||
   log_output("ssltest -ssl3", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -ssl3 -server_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 with server authentication:");
 | 
			
		||||
   log_output("ssltest -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -ssl3 -server_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -ssl3 -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 with client authentication:");
 | 
			
		||||
   log_output("ssltest -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -ssl3 -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -ssl3 -server_auth -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 with both client and server authentication:");
 | 
			
		||||
   log_output("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -ssl3 -server_auth -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest >$outFile");
 | 
			
		||||
   system("ssltest (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3:");
 | 
			
		||||
   log_output("ssltest", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -server_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -server_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with server authentication:");
 | 
			
		||||
   log_output("ssltest -server_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -server_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with client authentication:");
 | 
			
		||||
   log_output("ssltest -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -client_auth ", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -server_auth -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -server_auth -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with both client and server authentication:");
 | 
			
		||||
   log_output("ssltest -server_auth -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -server_auth -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl2 >$outFile");
 | 
			
		||||
   system("ssltest -bio_pair -ssl2 (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl2", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -dhe1024dsa -v >$outFile");
 | 
			
		||||
   system("ssltest -bio_pair -dhe1024dsa -v (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with 1024 bit DHE via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -dhe1024dsa -v", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -ssl2 -server_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 with server authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -ssl2 -server_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -ssl2 -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 with client authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -ssl2 -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -ssl2 -server_auth -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2 with both client and server authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -ssl2 -server_auth -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl3 >$outFile");
 | 
			
		||||
   system("ssltest -bio_pair -ssl3 (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl3", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -ssl3 -server_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 with server authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -ssl3 -server_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -ssl3 -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 with client authentication  via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -ssl3 -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -ssl3 -server_auth -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv3 with both client and server authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -ssl3 -server_auth -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair >$outFile");
 | 
			
		||||
   system("ssltest -bio_pair (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -server_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -server_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with server authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -server_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -server_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with client authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -client_auth", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert >$outFile");
 | 
			
		||||
   system("$ssltest -bio_pair -server_auth -client_auth (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Testing sslv2/sslv3 with both client and server authentication via BIO pair:");
 | 
			
		||||
   log_output("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert", $outFile);
 | 
			
		||||
   log_output("$ssltest -bio_pair -server_auth -client_auth", $outFile);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -380,43 +396,43 @@ sub ca_tests
 | 
			
		||||
   print( OUT "\n========================================================\n");
 | 
			
		||||
   print( OUT "CA TESTS:\n");
 | 
			
		||||
 | 
			
		||||
   system("openssl2 req -config $CAconf -out $CAreq -keyout $CAkey -new >$outFile");
 | 
			
		||||
   system("openssl2 req -config $CAconf -out $CAreq -keyout $CAkey -new (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Make a certificate request using req:");
 | 
			
		||||
   log_output("openssl2 req -config $CAconf -out $CAreq -keyout $CAkey -new", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 x509 -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >$outFile");
 | 
			
		||||
   system("openssl2 x509 -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Convert the certificate request into a self signed certificate using x509:");
 | 
			
		||||
   log_output("openssl2 x509 -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 x509 -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >$outFile");
 | 
			
		||||
   system("openssl2 x509 -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Convert a certificate into a certificate request using 'x509':");
 | 
			
		||||
   log_output("openssl2 x509 -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 req -config $OpenSSL_config -verify -in $CAreq -noout >$outFile");
 | 
			
		||||
   system("openssl2 req -config $OpenSSL_config -verify -in $CAreq -noout (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_output("openssl2 req -config $OpenSSL_config -verify -in $CAreq -noout", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 req -config $OpenSSL_config -verify -in $CAreq2 -noout >$outFile");
 | 
			
		||||
   system("openssl2 req -config $OpenSSL_config -verify -in $CAreq2 -noout (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_output( "openssl2 req -config $OpenSSL_config -verify -in $CAreq2 -noout", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 verify -CAfile $CAcert $CAcert >$outFile");
 | 
			
		||||
   system("openssl2 verify -CAfile $CAcert $CAcert (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_output("openssl2 verify -CAfile $CAcert $CAcert", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 req -config $Uconf -out $Ureq -keyout $Ukey -new >$outFile");
 | 
			
		||||
   system("openssl2 req -config $Uconf -out $Ureq -keyout $Ukey -new (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Make another certificate request using req:");
 | 
			
		||||
   log_output("openssl2 req -config $Uconf -out $Ureq -keyout $Ukey -new", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 x509 -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -CAserial $CAserial >$outFile");
 | 
			
		||||
   system("openssl2 x509 -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -CAserial $CAserial (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Sign certificate request with the just created CA via x509:");
 | 
			
		||||
   log_output("openssl2 x509 -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -CAserial $CAserial", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 verify -CAfile $CAcert $Ucert >$outFile");
 | 
			
		||||
   system("openssl2 verify -CAfile $CAcert $Ucert (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_output("openssl2 verify -CAfile $CAcert $Ucert", $outFile);
 | 
			
		||||
 | 
			
		||||
   system("openssl2 x509 -subject -issuer -startdate -enddate -noout -in $Ucert >$outFile");
 | 
			
		||||
   system("openssl2 x509 -subject -issuer -startdate -enddate -noout -in $Ucert (CLIB_OPT)/>$outFile");
 | 
			
		||||
   log_desc("Certificate details");
 | 
			
		||||
   log_output("openssl2 x509 -subject -issuer -startdate -enddate -noout -in $Ucert", $outFile);
 | 
			
		||||
 | 
			
		||||
   print(OUT "-- \n");
 | 
			
		||||
   print(OUT "--\n");
 | 
			
		||||
   print(OUT "The generated CA certificate is $CAcert\n");
 | 
			
		||||
   print(OUT "The generated CA private key is $CAkey\n");
 | 
			
		||||
   print(OUT "The current CA signing serial number is in $CAserial\n");
 | 
			
		||||
@@ -426,6 +442,29 @@ sub ca_tests
 | 
			
		||||
   print(OUT "--\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
############################################################################
 | 
			
		||||
sub evp_tests
 | 
			
		||||
{
 | 
			
		||||
   my $i = 'evp_test';
 | 
			
		||||
 | 
			
		||||
   print( "\nRUNNING EVP TESTS:\n\n");
 | 
			
		||||
 | 
			
		||||
   print( OUT "\n========================================================\n");
 | 
			
		||||
   print( OUT "EVP TESTS:\n\n");
 | 
			
		||||
 | 
			
		||||
   if (-e "$base_path\\$i.nlm")
 | 
			
		||||
   {
 | 
			
		||||
       my $outFile = "$output_path\\$i.out";
 | 
			
		||||
       system("$i $test_path\\evptests.txt (CLIB_OPT)/>$outFile");
 | 
			
		||||
       log_desc("Test: $i\.nlm:");
 | 
			
		||||
       log_output("", $outFile );
 | 
			
		||||
   }
 | 
			
		||||
   else
 | 
			
		||||
   {
 | 
			
		||||
       log_desc("Test: $i\.nlm: file not found");
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
############################################################################
 | 
			
		||||
sub log_output( $ $ )
 | 
			
		||||
{
 | 
			
		||||
@@ -436,7 +475,7 @@ sub log_output( $ $ )
 | 
			
		||||
 | 
			
		||||
   if ($desc)
 | 
			
		||||
   {
 | 
			
		||||
      print("$desc\n");
 | 
			
		||||
      print("\r$desc\n");
 | 
			
		||||
      print(OUT "$desc\n");
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -448,8 +487,8 @@ sub log_output( $ $ )
 | 
			
		||||
      # copy test output to log file
 | 
			
		||||
   open(IN, "<$file");
 | 
			
		||||
   while (<IN>)
 | 
			
		||||
   { 
 | 
			
		||||
      print(OUT $_); 
 | 
			
		||||
   {
 | 
			
		||||
      print(OUT $_);
 | 
			
		||||
      if ( $_ =~ /ERROR/ )
 | 
			
		||||
      {
 | 
			
		||||
         $error = 1;
 | 
			
		||||
@@ -476,13 +515,13 @@ sub log_output( $ $ )
 | 
			
		||||
      $key = getc;
 | 
			
		||||
      print("\n");
 | 
			
		||||
   }
 | 
			
		||||
      
 | 
			
		||||
      # Several of the testing scripts run a loop loading the 
 | 
			
		||||
 | 
			
		||||
      # Several of the testing scripts run a loop loading the
 | 
			
		||||
      # same NLM with different options.
 | 
			
		||||
      # On slow NetWare machines there appears to be some delay in the 
 | 
			
		||||
      # On slow NetWare machines there appears to be some delay in the
 | 
			
		||||
      # OS actually unloading the test nlms and the OS complains about.
 | 
			
		||||
      # the NLM already being loaded.  This additional pause is to 
 | 
			
		||||
      # to help provide a little more time for unloading before trying to 
 | 
			
		||||
      # the NLM already being loaded.  This additional pause is to
 | 
			
		||||
      # to help provide a little more time for unloading before trying to
 | 
			
		||||
      # load again.
 | 
			
		||||
   sleep(1);
 | 
			
		||||
}
 | 
			
		||||
@@ -553,7 +592,7 @@ sub do_wait()
 | 
			
		||||
############################################################################
 | 
			
		||||
sub make_tmp_cert_file()
 | 
			
		||||
{
 | 
			
		||||
   my @cert_files = <$cert_path\\*.pem>;
 | 
			
		||||
   my @cert_files = <$cert_path/*.pem>;
 | 
			
		||||
 | 
			
		||||
      # delete the file if it already exists
 | 
			
		||||
   unlink($tmp_cert);
 | 
			
		||||
@@ -561,7 +600,7 @@ sub make_tmp_cert_file()
 | 
			
		||||
   open( TMP_CERT, ">$tmp_cert") || die "\nunable to open $tmp_cert\n";
 | 
			
		||||
 | 
			
		||||
   print("building temporary cert file\n");
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
   # create a temporary cert file that contains all the certs
 | 
			
		||||
   foreach $i (@cert_files)
 | 
			
		||||
   {
 | 
			
		||||
 
 | 
			
		||||
@@ -16,75 +16,97 @@ if "a%1" == "a" goto usage
 | 
			
		||||
               
 | 
			
		||||
set LIBC_BUILD=
 | 
			
		||||
set CLIB_BUILD=
 | 
			
		||||
set GNUC=
 | 
			
		||||
 | 
			
		||||
if "%1" == "netware-clib" set CLIB_BUILD=Y
 | 
			
		||||
if "%1" == "netware-clib" set LIBC_BUILD=
 | 
			
		||||
 | 
			
		||||
if "%1" == "netware-libc"  set LIBC_BUILD=Y
 | 
			
		||||
if "%1" == "netware-libc"  set CLIB_BUILD=
 | 
			
		||||
if "%1" == "netware-libc" set LIBC_BUILD=Y
 | 
			
		||||
if "%1" == "netware-libc" set CLIB_BUILD=
 | 
			
		||||
 | 
			
		||||
if "%2" == "gnuc" set GNUC=Y
 | 
			
		||||
if "%2" == "codewarrior" set GNUC=
 | 
			
		||||
 | 
			
		||||
rem   Location of tools (compiler, linker, etc)
 | 
			
		||||
set TOOLS=d:\i_drive\tools
 | 
			
		||||
if "%NDKBASE%" == "" set NDKBASE=c:\Novell
 | 
			
		||||
 | 
			
		||||
rem   If Perl for Win32 is not already in your path, add it here
 | 
			
		||||
set PERL_PATH=
 | 
			
		||||
 | 
			
		||||
rem   Define path to the Metrowerks command line tools
 | 
			
		||||
rem   or GNU Crosscompiler gcc / nlmconv
 | 
			
		||||
rem   ( compiler, assembler, linker)
 | 
			
		||||
set METROWERKS_PATH=%TOOLS%\codewar\pdk_21\tools\command line tools
 | 
			
		||||
rem set METROWERKS_PATH=%TOOLS%\codewar\PDK_40\Other Metrowerks Tools\Command Line Tools
 | 
			
		||||
if "%GNUC%" == "Y" set COMPILER_PATH=c:\usr\i586-netware\bin;c:\usr\bin
 | 
			
		||||
if "%GNUC%" == "" set COMPILER_PATH=c:\prg\cwcmdl40
 | 
			
		||||
 | 
			
		||||
rem   If using gnu make define path to utility
 | 
			
		||||
set GNU_MAKE_PATH=%TOOLS%\gnu
 | 
			
		||||
rem set GNU_MAKE_PATH=%NDKBASE%\gnu
 | 
			
		||||
set GNU_MAKE_PATH=c:\prg\tools
 | 
			
		||||
 | 
			
		||||
rem   If using ms nmake define path to nmake
 | 
			
		||||
set MS_NMAKE_PATH=%TOOLS%\msvc\600\bin
 | 
			
		||||
rem set MS_NMAKE_PATH=%NDKBASE%\msvc\600\bin
 | 
			
		||||
 | 
			
		||||
rem   If using NASM assembler define path
 | 
			
		||||
set NASM_PATH=%TOOLS%\nasm
 | 
			
		||||
rem set NASM_PATH=%NDKBASE%\nasm
 | 
			
		||||
set NASM_PATH=c:\prg\tools
 | 
			
		||||
 | 
			
		||||
rem   Update path to include tool paths
 | 
			
		||||
set path=%path%;%METROWERKS_PATH%
 | 
			
		||||
set path=%path%;%COMPILER_PATH%
 | 
			
		||||
if not "%GNU_MAKE_PATH%" == "" set path=%path%;%GNU_MAKE_PATH%
 | 
			
		||||
if not "%MS_NMAKE_PATH%" == "" set path=%path%;%MS_NMAKE_PATH%
 | 
			
		||||
if not "%NASM_PATH%"     == "" set path=%path%;%NASM_PATH%
 | 
			
		||||
if not "%PERL_PATH%"     == "" set path=%path%;%PERL_PATH%
 | 
			
		||||
 | 
			
		||||
rem   Set MWCIncludes to location of Novell NDK includes
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" set MWCIncludes=%TOOLS%\ndk\libc\include;%TOOLS%\ndk\libc\include\winsock;.\engines
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set MWCIncludes=%TOOLS%\ndk\nwsdk\include\nlm;.\engines
 | 
			
		||||
set include=
 | 
			
		||||
rem   Set INCLUDES to location of Novell NDK includes
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" set INCLUDE=%NDKBASE%\ndk\libc\include;%NDKBASE%\ndk\libc\include\winsock
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set INCLUDE=%NDKBASE%\ndk\nwsdk\include\nlm;%NDKBASE%\ws295sdk\include
 | 
			
		||||
 | 
			
		||||
rem   Set Imports to location of Novell NDK import files
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" set IMPORTS=%TOOLS%\ndk\libc\imports
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set IMPORTS=%TOOLS%\ndk\nwsdk\imports
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" set IMPORTS=%NDKBASE%\ndk\libc\imports
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set IMPORTS=%NDKBASE%\ndk\nwsdk\imports
 | 
			
		||||
 | 
			
		||||
rem   Set PRELUDE to the absolute path of the prelude object to link with in
 | 
			
		||||
rem   the Metrowerks NetWare PDK - NOTE: for Clib builds "clibpre.o" is 
 | 
			
		||||
rem   recommended, for LibC NKS builds libcpre.o must be used
 | 
			
		||||
if "%GNUC%" == "Y" goto gnuc
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.o
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.o
 | 
			
		||||
rem if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.o
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\prelude.o
 | 
			
		||||
echo using MetroWerks CodeWarrior 
 | 
			
		||||
goto info
 | 
			
		||||
 | 
			
		||||
:gnuc
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.gcc.o
 | 
			
		||||
rem if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.gcc.o
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\prelude.gcc.o
 | 
			
		||||
echo using GNU GCC Compiler 
 | 
			
		||||
 | 
			
		||||
:info
 | 
			
		||||
echo.
 | 
			
		||||
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" echo Enviroment configured for LibC build
 | 
			
		||||
if "%LIBC_BUILD%" == "Y" echo use "netware\build.bat netware-libc ..." 
 | 
			
		||||
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" echo Enviroment configured for CLib build
 | 
			
		||||
if "%CLIB_BUILD%" == "Y" echo use "netware\build.bat netware-clib ..." 
 | 
			
		||||
 | 
			
		||||
goto end
 | 
			
		||||
 | 
			
		||||
:usage
 | 
			
		||||
rem ===============================================================
 | 
			
		||||
echo .
 | 
			
		||||
echo . No target build specified!
 | 
			
		||||
echo .
 | 
			
		||||
echo . usage: set_env [target]
 | 
			
		||||
echo .
 | 
			
		||||
echo .   target      - "netware-clib" - Clib build
 | 
			
		||||
echo .               - "netware-libc" - LibC build
 | 
			
		||||
echo .
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
echo.
 | 
			
		||||
echo No target build specified!
 | 
			
		||||
echo.
 | 
			
		||||
echo usage: set_env [target] [compiler]
 | 
			
		||||
echo.
 | 
			
		||||
echo target      - "netware-clib" - Clib build
 | 
			
		||||
echo             - "netware-libc" - LibC build
 | 
			
		||||
echo.
 | 
			
		||||
echo compiler    - "gnuc"         - GNU GCC Compiler
 | 
			
		||||
echo             - "codewarrior"  - MetroWerks CodeWarrior (default)
 | 
			
		||||
echo.
 | 
			
		||||
 | 
			
		||||
:end
 | 
			
		||||
echo.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										93
									
								
								PROBLEMS
									
									
									
									
									
								
							
							
						
						
									
										93
									
								
								PROBLEMS
									
									
									
									
									
								
							@@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries.  This
 | 
			
		||||
means that -L switches won't matter unless OpenSSL is built with shared
 | 
			
		||||
library support.
 | 
			
		||||
 | 
			
		||||
The workaround may be to change the following lines in apps/Makefile.ssl and
 | 
			
		||||
test/Makefile.ssl:
 | 
			
		||||
The workaround may be to change the following lines in apps/Makefile and
 | 
			
		||||
test/Makefile:
 | 
			
		||||
 | 
			
		||||
  LIBCRYPTO=-L.. -lcrypto
 | 
			
		||||
  LIBSSL=-L.. -lssl
 | 
			
		||||
@@ -48,20 +48,34 @@ will interfere with each other and lead to test failure.
 | 
			
		||||
The solution is simple for now: don't run parallell make when testing.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Bugs in gcc 3.0 triggered
 | 
			
		||||
* Bugs in gcc triggered
 | 
			
		||||
 | 
			
		||||
According to a problem report, there are bugs in gcc 3.0 that are
 | 
			
		||||
triggered by some of the code in OpenSSL, more specifically in
 | 
			
		||||
PEM_get_EVP_CIPHER_INFO().  The triggering code is the following:
 | 
			
		||||
- According to a problem report, there are bugs in gcc 3.0 that are
 | 
			
		||||
  triggered by some of the code in OpenSSL, more specifically in
 | 
			
		||||
  PEM_get_EVP_CIPHER_INFO().  The triggering code is the following:
 | 
			
		||||
 | 
			
		||||
	header+=11;
 | 
			
		||||
	if (*header != '4') return(0); header++;
 | 
			
		||||
	if (*header != ',') return(0); header++;
 | 
			
		||||
 | 
			
		||||
What happens is that gcc might optimize a little too agressively, and
 | 
			
		||||
you end up with an extra incrementation when *header != '4'.
 | 
			
		||||
  What happens is that gcc might optimize a little too agressively, and
 | 
			
		||||
  you end up with an extra incrementation when *header != '4'.
 | 
			
		||||
 | 
			
		||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
 | 
			
		||||
  We recommend that you upgrade gcc to as high a 3.x version as you can.
 | 
			
		||||
 | 
			
		||||
- According to multiple problem reports, some of our message digest
 | 
			
		||||
  implementations trigger bug[s] in code optimizer in gcc 3.3 for sparc64
 | 
			
		||||
  and gcc 2.96 for ppc. Former fails to complete RIPEMD160 test, while
 | 
			
		||||
  latter - SHA one.
 | 
			
		||||
 | 
			
		||||
  The recomendation is to upgrade your compiler. This naturally applies to
 | 
			
		||||
  other similar cases.
 | 
			
		||||
 | 
			
		||||
- There is a subtle Solaris x86-specific gcc run-time environment bug, which
 | 
			
		||||
  "falls between" OpenSSL [0.9.8 and later], Solaris ld and GCC. The bug
 | 
			
		||||
  manifests itself as Segmentation Fault upon early application start-up.
 | 
			
		||||
  The problem can be worked around by patching the environment according to
 | 
			
		||||
  http://www.openssl.org/~appro/values.c.
 | 
			
		||||
 | 
			
		||||
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
 | 
			
		||||
 | 
			
		||||
@@ -120,3 +134,64 @@ Any information helping to solve this issue would be deeply
 | 
			
		||||
appreciated.
 | 
			
		||||
 | 
			
		||||
NOTE: building non-shared doesn't come with this problem.
 | 
			
		||||
 | 
			
		||||
* ULTRIX build fails with shell errors, such as "bad substitution"
 | 
			
		||||
  and "test: argument expected"
 | 
			
		||||
 | 
			
		||||
The problem is caused by ULTRIX /bin/sh supporting only original
 | 
			
		||||
Bourne shell syntax/semantics, and the trouble is that the vast
 | 
			
		||||
majority is so accustomed to more modern syntax, that very few
 | 
			
		||||
people [if any] would recognize the ancient syntax even as valid.
 | 
			
		||||
This inevitably results in non-trivial scripts breaking on ULTRIX,
 | 
			
		||||
and OpenSSL isn't an exclusion. Fortunately there is workaround,
 | 
			
		||||
hire /bin/ksh to do the job /bin/sh fails to do.
 | 
			
		||||
 | 
			
		||||
1. Trick make(1) to use /bin/ksh by setting up following environ-
 | 
			
		||||
   ment variables *prior* you execute ./Configure and make:
 | 
			
		||||
 | 
			
		||||
	PROG_ENV=POSIX
 | 
			
		||||
	MAKESHELL=/bin/ksh
 | 
			
		||||
	export PROG_ENV MAKESHELL
 | 
			
		||||
 | 
			
		||||
   or if your shell is csh-compatible:
 | 
			
		||||
 | 
			
		||||
	setenv PROG_ENV POSIX
 | 
			
		||||
	setenv MAKESHELL /bin/ksh
 | 
			
		||||
 | 
			
		||||
2. Trick /bin/sh to use alternative expression evaluator. Create
 | 
			
		||||
   following 'test' script for example in /tmp:
 | 
			
		||||
 | 
			
		||||
	#!/bin/ksh
 | 
			
		||||
	${0##*/} "$@"
 | 
			
		||||
 | 
			
		||||
   Then 'chmod a+x /tmp/test; ln /tmp/test /tmp/[' and *prepend*
 | 
			
		||||
   your $PATH with chosen location, e.g. PATH=/tmp:$PATH. Alter-
 | 
			
		||||
   natively just replace system /bin/test and /bin/[ with the
 | 
			
		||||
   above script.
 | 
			
		||||
 | 
			
		||||
* hpux64-ia64-cc fails blowfish test.
 | 
			
		||||
 | 
			
		||||
Compiler bug, presumably at particular patch level. It should be noted
 | 
			
		||||
that same compiler generates correct 32-bit code, a.k.a. hpux-ia64-cc
 | 
			
		||||
target. Drop optimization level to +O2 when compiling 64-bit bf_skey.o.
 | 
			
		||||
 | 
			
		||||
* no-engines generates errors.
 | 
			
		||||
 | 
			
		||||
Unfortunately, the 'no-engines' configuration option currently doesn't
 | 
			
		||||
work properly.  Use 'no-hw' and you'll will at least get no hardware
 | 
			
		||||
support.  We'll see how we fix that on OpenSSL versions past 0.9.8.
 | 
			
		||||
 | 
			
		||||
* 'make test' fails in BN_sqr [commonly with "error 139" denoting SIGSEGV]
 | 
			
		||||
  if elder GNU binutils were deployed to link shared libcrypto.so.
 | 
			
		||||
 | 
			
		||||
As subject suggests the failure is caused by a bug in elder binutils,
 | 
			
		||||
either as or ld, and was observed on FreeBSD and Linux. There are two
 | 
			
		||||
options. First is naturally to upgrade binutils, the second one - to
 | 
			
		||||
reconfigure with additional no-sse2 [or 386] option passed to ./config.
 | 
			
		||||
 | 
			
		||||
* If configured with ./config no-dso, toolkit still gets linked with -ldl,
 | 
			
		||||
  which most notably poses a problem when linking with dietlibc.
 | 
			
		||||
 | 
			
		||||
We don't have framework to associate -ldl with no-dso, therefore the only
 | 
			
		||||
way is to edit Makefile right after ./config no-dso and remove -ldl from
 | 
			
		||||
EX_LIBS line.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								README
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
 | 
			
		||||
 OpenSSL 0.9.8-dev XX xxx XXXX
 | 
			
		||||
 OpenSSL 0.9.8h
 | 
			
		||||
 | 
			
		||||
 Copyright (c) 1998-2005 The OpenSSL Project
 | 
			
		||||
 Copyright (c) 1998-2008 The OpenSSL Project
 | 
			
		||||
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 | 
			
		||||
 All rights reserved.
 | 
			
		||||
 | 
			
		||||
@@ -36,12 +36,13 @@
 | 
			
		||||
     actually logically part of it. It includes routines for the following:
 | 
			
		||||
 | 
			
		||||
     Ciphers
 | 
			
		||||
        libdes - EAY's libdes DES encryption package which has been floating
 | 
			
		||||
                 around the net for a few years.  It includes 15
 | 
			
		||||
                 'modes/variations' of DES (1, 2 and 3 key versions of ecb,
 | 
			
		||||
                 cbc, cfb and ofb; pcbc and a more general form of cfb and
 | 
			
		||||
                 ofb) including desx in cbc mode, a fast crypt(3), and
 | 
			
		||||
                 routines to read passwords from the keyboard.
 | 
			
		||||
        libdes - EAY's libdes DES encryption package which was floating
 | 
			
		||||
                 around the net for a few years, and was then relicensed by
 | 
			
		||||
                 him as part of SSLeay.  It includes 15 'modes/variations'
 | 
			
		||||
                 of DES (1, 2 and 3 key versions of ecb, cbc, cfb and ofb;
 | 
			
		||||
                 pcbc and a more general form of cfb and ofb) including desx
 | 
			
		||||
                 in cbc mode, a fast crypt(3), and routines to read
 | 
			
		||||
                 passwords from the keyboard.
 | 
			
		||||
        RC4 encryption,
 | 
			
		||||
        RC2 encryption      - 4 different modes, ecb, cbc, cfb and ofb.
 | 
			
		||||
        Blowfish encryption - 4 different modes, ecb, cbc, cfb and ofb.
 | 
			
		||||
@@ -113,6 +114,10 @@
 | 
			
		||||
 | 
			
		||||
 The MDC2 algorithm is patented by IBM.
 | 
			
		||||
 | 
			
		||||
 NTT and Mitsubishi have patents and pending patents on the Camellia
 | 
			
		||||
 algorithm, but allow use at no charge without requiring an explicit
 | 
			
		||||
 licensing agreement: http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html
 | 
			
		||||
 | 
			
		||||
 INSTALLATION
 | 
			
		||||
 ------------
 | 
			
		||||
 | 
			
		||||
@@ -156,7 +161,7 @@
 | 
			
		||||
    - Stack Traceback (if the application dumps core)
 | 
			
		||||
 | 
			
		||||
 Report the bug to the OpenSSL project via the Request Tracker
 | 
			
		||||
 (http://www.openssl.org/support/rt2.html) by mail to:
 | 
			
		||||
 (http://www.openssl.org/support/rt.html) by mail to:
 | 
			
		||||
 | 
			
		||||
    openssl-bugs@openssl.org
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										30
									
								
								STATUS
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								STATUS
									
									
									
									
									
								
							@@ -1,10 +1,25 @@
 | 
			
		||||
 | 
			
		||||
  OpenSSL STATUS                           Last modified at
 | 
			
		||||
  ______________                           $Date: 2005/04/25 21:42:14 $
 | 
			
		||||
  ______________                           $Date: 2008/05/28 07:37:13 $
 | 
			
		||||
 | 
			
		||||
  DEVELOPMENT STATE
 | 
			
		||||
 | 
			
		||||
    o  OpenSSL 0.9.8:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.9:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.8h: Released on May       28th, 2008
 | 
			
		||||
    o  OpenSSL 0.9.8g: Released on October   19th, 2007
 | 
			
		||||
    o  OpenSSL 0.9.8f: Released on October   11th, 2007 
 | 
			
		||||
    o  OpenSSL 0.9.8e: Released on February  23rd, 2007
 | 
			
		||||
    o  OpenSSL 0.9.8d: Released on September 28th, 2006
 | 
			
		||||
    o  OpenSSL 0.9.8c: Released on September  5th, 2006
 | 
			
		||||
    o  OpenSSL 0.9.8b: Released on May        4th, 2006
 | 
			
		||||
    o  OpenSSL 0.9.8a: Released on October   11th, 2005
 | 
			
		||||
    o  OpenSSL 0.9.8:  Released on July       5th, 2005
 | 
			
		||||
    o  OpenSSL 0.9.7m: Released on February  23rd, 2007
 | 
			
		||||
    o  OpenSSL 0.9.7l: Released on September 28th, 2006
 | 
			
		||||
    o  OpenSSL 0.9.7k: Released on September  5th, 2006
 | 
			
		||||
    o  OpenSSL 0.9.7j: Released on May        4th, 2006
 | 
			
		||||
    o  OpenSSL 0.9.7i: Released on October   14th, 2005
 | 
			
		||||
    o  OpenSSL 0.9.7h: Released on October   11th, 2005
 | 
			
		||||
    o  OpenSSL 0.9.7g: Released on April     11th, 2005
 | 
			
		||||
    o  OpenSSL 0.9.7f: Released on March     22nd, 2005
 | 
			
		||||
    o  OpenSSL 0.9.7e: Released on October   25th, 2004
 | 
			
		||||
@@ -35,10 +50,11 @@
 | 
			
		||||
    o  OpenSSL 0.9.2b: Released on March     22th, 1999
 | 
			
		||||
    o  OpenSSL 0.9.1c: Released on December  23th, 1998
 | 
			
		||||
 | 
			
		||||
  [See also http://www.openssl.org/support/rt2.html]
 | 
			
		||||
  [See also http://www.openssl.org/support/rt.html]
 | 
			
		||||
 | 
			
		||||
  RELEASE SHOWSTOPPERS
 | 
			
		||||
 | 
			
		||||
    o The Makefiles fail with some SysV makes.
 | 
			
		||||
    o 
 | 
			
		||||
 | 
			
		||||
  AVAILABLE PATCHES
 | 
			
		||||
@@ -55,16 +71,8 @@
 | 
			
		||||
	Private key, certificate and CRL API and implementation.
 | 
			
		||||
	Developing and bugfixing PKCS#7 (S/MIME code).
 | 
			
		||||
        Various X509 issues: character sets, certificate request extensions.
 | 
			
		||||
    o Geoff and Richard are currently working on:
 | 
			
		||||
	ENGINE (the new code that gives hardware support among others).
 | 
			
		||||
    o Richard is currently working on:
 | 
			
		||||
	UI (User Interface)
 | 
			
		||||
	UTIL (a new set of library functions to support some higher level
 | 
			
		||||
	      functionality that is currently missing).
 | 
			
		||||
	Shared library support for VMS.
 | 
			
		||||
	Kerberos 5 authentication (Heimdal)
 | 
			
		||||
	Constification
 | 
			
		||||
	Compression
 | 
			
		||||
	Attribute Certificate support
 | 
			
		||||
	Certificate Pair support
 | 
			
		||||
	Storage Engines (primarly an LDAP storage engine)
 | 
			
		||||
 
 | 
			
		||||
@@ -68,19 +68,19 @@ foreach (@ARGV) {
 | 
			
		||||
	    exit 0;
 | 
			
		||||
	} elsif (/^-newcert$/) {
 | 
			
		||||
	    # create a certificate
 | 
			
		||||
	    system ("$REQ -new -x509 -keyout newreq.pem -out newreq.pem $DAYS");
 | 
			
		||||
	    system ("$REQ -new -x509 -keyout newkey.pem -out newcert.pem $DAYS");
 | 
			
		||||
	    $RET=$?;
 | 
			
		||||
	    print "Certificate (and private key) is in newreq.pem\n"
 | 
			
		||||
	    print "Certificate is in newcert.pem, private key is in newkey.pem\n"
 | 
			
		||||
	} elsif (/^-newreq$/) {
 | 
			
		||||
	    # create a certificate request
 | 
			
		||||
	    system ("$REQ -new -keyout newreq.pem -out newreq.pem $DAYS");
 | 
			
		||||
	    system ("$REQ -new -keyout newkey.pem -out newreq.pem $DAYS");
 | 
			
		||||
	    $RET=$?;
 | 
			
		||||
	    print "Request (and private key) is in newreq.pem\n";
 | 
			
		||||
	    print "Request is in newreq.pem, private key is in newkey.pem\n";
 | 
			
		||||
	} elsif (/^-newreq-nodes$/) {
 | 
			
		||||
	    # create a certificate request
 | 
			
		||||
	    system ("$REQ -new -nodes -keyout newreq.pem -out newreq.pem $DAYS");
 | 
			
		||||
	    system ("$REQ -new -nodes -keyout newkey.pem -out newreq.pem $DAYS");
 | 
			
		||||
	    $RET=$?;
 | 
			
		||||
	    print "Request (and private key) is in newreq.pem\n";
 | 
			
		||||
	    print "Request is in newreq.pem, private key is in newkey.pem\n";
 | 
			
		||||
	} elsif (/^-newca$/) {
 | 
			
		||||
		# if explicitly asked for or it doesn't exist then setup the
 | 
			
		||||
		# directory structure that Eric likes to manage things 
 | 
			
		||||
@@ -94,6 +94,9 @@ foreach (@ARGV) {
 | 
			
		||||
		mkdir "${CATOP}/private", $DIRMODE;
 | 
			
		||||
		open OUT, ">${CATOP}/index.txt";
 | 
			
		||||
		close OUT;
 | 
			
		||||
		open OUT, ">${CATOP}/crlnumber";
 | 
			
		||||
		print OUT "01\n";
 | 
			
		||||
		close OUT;
 | 
			
		||||
	    }
 | 
			
		||||
	    if ( ! -f "${CATOP}/private/$CAKEY" ) {
 | 
			
		||||
		print "CA certificate filename (or enter to create)\n";
 | 
			
		||||
@@ -113,6 +116,7 @@ foreach (@ARGV) {
 | 
			
		||||
		    system ("$CA -create_serial " .
 | 
			
		||||
			"-out ${CATOP}/$CACERT $CADAYS -batch " . 
 | 
			
		||||
			"-keyfile ${CATOP}/private/$CAKEY -selfsign " .
 | 
			
		||||
			"-extensions v3_ca " .
 | 
			
		||||
			"-infiles ${CATOP}/$CAREQ ");
 | 
			
		||||
		    $RET=$?;
 | 
			
		||||
		}
 | 
			
		||||
@@ -120,10 +124,11 @@ foreach (@ARGV) {
 | 
			
		||||
	} elsif (/^-pkcs12$/) {
 | 
			
		||||
	    my $cname = $ARGV[1];
 | 
			
		||||
	    $cname = "My Certificate" unless defined $cname;
 | 
			
		||||
	    system ("$PKCS12 -in newcert.pem -inkey newreq.pem " .
 | 
			
		||||
	    system ("$PKCS12 -in newcert.pem -inkey newkey.pem " .
 | 
			
		||||
			"-certfile ${CATOP}/$CACERT -out newcert.p12 " .
 | 
			
		||||
			"-export -name \"$cname\"");
 | 
			
		||||
	    $RET=$?;
 | 
			
		||||
	    print "PKCS #12 file is in newcert.p12\n";
 | 
			
		||||
	    exit $RET;
 | 
			
		||||
	} elsif (/^-xsign$/) {
 | 
			
		||||
	    system ("$CA -policy policy_anything -infiles newreq.pem");
 | 
			
		||||
 
 | 
			
		||||
@@ -53,15 +53,15 @@ case $i in
 | 
			
		||||
    ;;
 | 
			
		||||
-newcert) 
 | 
			
		||||
    # create a certificate
 | 
			
		||||
    $REQ -new -x509 -keyout newreq.pem -out newreq.pem $DAYS
 | 
			
		||||
    $REQ -new -x509 -keyout newkey.pem -out newcert.pem $DAYS
 | 
			
		||||
    RET=$?
 | 
			
		||||
    echo "Certificate (and private key) is in newreq.pem"
 | 
			
		||||
    echo "Certificate is in newcert.pem, private key is in newkey.pem"
 | 
			
		||||
    ;;
 | 
			
		||||
-newreq) 
 | 
			
		||||
    # create a certificate request
 | 
			
		||||
    $REQ -new -keyout newreq.pem -out newreq.pem $DAYS
 | 
			
		||||
    $REQ -new -keyout newkey.pem -out newreq.pem $DAYS
 | 
			
		||||
    RET=$?
 | 
			
		||||
    echo "Request (and private key) is in newreq.pem"
 | 
			
		||||
    echo "Request is in newreq.pem, private key is in newkey.pem"
 | 
			
		||||
    ;;
 | 
			
		||||
-newca)     
 | 
			
		||||
    # if explicitly asked for or it doesn't exist then setup the directory
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										870
									
								
								apps/Makefile
									
									
									
									
									
								
							
							
						
						
									
										870
									
								
								apps/Makefile
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										28
									
								
								apps/apps.c
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								apps/apps.c
									
									
									
									
									
								
							@@ -125,7 +125,9 @@
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
#include <openssl/engine.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#include <openssl/rsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
 | 
			
		||||
#define NON_MAIN
 | 
			
		||||
@@ -374,10 +376,17 @@ int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
 | 
			
		||||
		/* The start of something good :-) */
 | 
			
		||||
		if (num >= arg->count)
 | 
			
		||||
			{
 | 
			
		||||
			arg->count+=20;
 | 
			
		||||
			arg->data=(char **)OPENSSL_realloc(arg->data,
 | 
			
		||||
				sizeof(char *)*arg->count);
 | 
			
		||||
			if (argc == 0) return(0);
 | 
			
		||||
			char **tmp_p;
 | 
			
		||||
			int tlen = arg->count + 20;
 | 
			
		||||
			tmp_p = (char **)OPENSSL_realloc(arg->data,
 | 
			
		||||
				sizeof(char *)*tlen);
 | 
			
		||||
			if (tmp_p == NULL)
 | 
			
		||||
				return 0;
 | 
			
		||||
			arg->data  = tmp_p;
 | 
			
		||||
			arg->count = tlen;
 | 
			
		||||
			/* initialize newly allocated data */
 | 
			
		||||
			for (i = num; i < arg->count; i++)
 | 
			
		||||
				arg->data[i] = NULL;
 | 
			
		||||
			}
 | 
			
		||||
		arg->data[num++]=p;
 | 
			
		||||
 | 
			
		||||
@@ -1604,8 +1613,9 @@ int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix)
 | 
			
		||||
		{
 | 
			
		||||
		if (errno != ENOENT 
 | 
			
		||||
#ifdef ENOTDIR
 | 
			
		||||
			&& errno != ENOTDIR)
 | 
			
		||||
			&& errno != ENOTDIR
 | 
			
		||||
#endif
 | 
			
		||||
		   )
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
@@ -1893,8 +1903,9 @@ int rotate_index(const char *dbfile, const char *new_suffix, const char *old_suf
 | 
			
		||||
		{
 | 
			
		||||
		if (errno != ENOENT 
 | 
			
		||||
#ifdef ENOTDIR
 | 
			
		||||
			&& errno != ENOTDIR)
 | 
			
		||||
			&& errno != ENOTDIR
 | 
			
		||||
#endif
 | 
			
		||||
		   )
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
@@ -1929,8 +1940,9 @@ int rotate_index(const char *dbfile, const char *new_suffix, const char *old_suf
 | 
			
		||||
		{
 | 
			
		||||
		if (errno != ENOENT 
 | 
			
		||||
#ifdef ENOTDIR
 | 
			
		||||
			&& errno != ENOTDIR)
 | 
			
		||||
			&& errno != ENOTDIR
 | 
			
		||||
#endif
 | 
			
		||||
		   )
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
@@ -1998,7 +2010,7 @@ int parse_yesno(const char *str, int def)
 | 
			
		||||
		case 'y': /* yes */
 | 
			
		||||
		case 'Y': /* YES */
 | 
			
		||||
		case '1': /* 1 */
 | 
			
		||||
			ret = 0;
 | 
			
		||||
			ret = 1;
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			ret = def;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								apps/apps.h
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								apps/apps.h
									
									
									
									
									
								
							@@ -122,6 +122,9 @@
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
#include <openssl/engine.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_OCSP
 | 
			
		||||
#include <openssl/ocsp.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <openssl/ossl_typ.h>
 | 
			
		||||
 | 
			
		||||
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
 | 
			
		||||
@@ -228,6 +231,12 @@ extern BIO *bio_err;
 | 
			
		||||
#  endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYSNAME_WIN32
 | 
			
		||||
#  define openssl_fdset(a,b) FD_SET((unsigned int)a, b)
 | 
			
		||||
#else
 | 
			
		||||
#  define openssl_fdset(a,b) FD_SET(a, b)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct args_st
 | 
			
		||||
	{
 | 
			
		||||
	char **data;
 | 
			
		||||
@@ -275,6 +284,12 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
 | 
			
		||||
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_OCSP
 | 
			
		||||
OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req,
 | 
			
		||||
			char *host, char *path, char *port, int use_ssl,
 | 
			
		||||
			int req_timeout);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int load_config(BIO *err, CONF *cnf);
 | 
			
		||||
char *make_config_name(void);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -196,7 +196,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
bad:
 | 
			
		||||
		BIO_printf(bio_err,"%s [options] <infile\n",prog);
 | 
			
		||||
		BIO_printf(bio_err,"where options are\n");
 | 
			
		||||
		BIO_printf(bio_err," -inform arg   input format - one of DER TXT PEM\n");
 | 
			
		||||
		BIO_printf(bio_err," -inform arg   input format - one of DER PEM\n");
 | 
			
		||||
		BIO_printf(bio_err," -in arg       input file\n");
 | 
			
		||||
		BIO_printf(bio_err," -out arg      output file (output format is always DER\n");
 | 
			
		||||
		BIO_printf(bio_err," -noout arg    don't produce any output\n");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										67
									
								
								apps/ca.c
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								apps/ca.c
									
									
									
									
									
								
							@@ -105,6 +105,9 @@
 | 
			
		||||
 | 
			
		||||
#define ENV_DEFAULT_CA		"default_ca"
 | 
			
		||||
 | 
			
		||||
#define STRING_MASK	"string_mask"
 | 
			
		||||
#define UTF8_IN			"utf8"
 | 
			
		||||
 | 
			
		||||
#define ENV_DIR			"dir"
 | 
			
		||||
#define ENV_CERTS		"certs"
 | 
			
		||||
#define ENV_CRL_DIR		"crl_dir"
 | 
			
		||||
@@ -174,6 +177,7 @@ static const char *ca_usage[]={
 | 
			
		||||
" -msie_hack      - msie modifications to handle all those universal strings\n",
 | 
			
		||||
" -revoke file    - Revoke a certificate (given in file)\n",
 | 
			
		||||
" -subj arg       - Use arg instead of request's subject\n",
 | 
			
		||||
" -utf8           - input characters are UTF8 (default ASCII)\n",
 | 
			
		||||
" -multivalue-rdn - enable support for multivalued RDNs\n",
 | 
			
		||||
" -extensions ..  - Extension section (override value in config file)\n",
 | 
			
		||||
" -extfile file   - Configuration file with X509v3 extentions to add\n",
 | 
			
		||||
@@ -195,27 +199,27 @@ extern int EF_ALIGNMENT;
 | 
			
		||||
static void lookup_fail(const char *name, const char *tag);
 | 
			
		||||
static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
 | 
			
		||||
		   const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,CA_DB *db,
 | 
			
		||||
		   BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate,
 | 
			
		||||
		   BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn, char *startdate,
 | 
			
		||||
		   char *enddate, long days, int batch, char *ext_sect, CONF *conf,
 | 
			
		||||
		   int verbose, unsigned long certopt, unsigned long nameopt,
 | 
			
		||||
		   int default_op, int ext_copy, int selfsign);
 | 
			
		||||
static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
 | 
			
		||||
			const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
 | 
			
		||||
			CA_DB *db, BIGNUM *serial, char *subj, int multirdn, int email_dn,
 | 
			
		||||
			CA_DB *db, BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn,
 | 
			
		||||
			char *startdate, char *enddate, long days, int batch,
 | 
			
		||||
			char *ext_sect, CONF *conf,int verbose, unsigned long certopt,
 | 
			
		||||
			unsigned long nameopt, int default_op, int ext_copy,
 | 
			
		||||
			ENGINE *e);
 | 
			
		||||
static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
 | 
			
		||||
			 const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
 | 
			
		||||
			 CA_DB *db, BIGNUM *serial,char *subj, int multirdn, int email_dn,
 | 
			
		||||
			 CA_DB *db, BIGNUM *serial,char *subj,unsigned long chtype, int multirdn, int email_dn,
 | 
			
		||||
			 char *startdate, char *enddate, long days, char *ext_sect,
 | 
			
		||||
			 CONF *conf, int verbose, unsigned long certopt, 
 | 
			
		||||
			 unsigned long nameopt, int default_op, int ext_copy);
 | 
			
		||||
static int fix_data(int nid, int *type);
 | 
			
		||||
static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
 | 
			
		||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
 | 
			
		||||
	STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj, int multirdn,
 | 
			
		||||
	STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj,unsigned long chtype, int multirdn,
 | 
			
		||||
	int email_dn, char *startdate, char *enddate, long days, int batch,
 | 
			
		||||
       	int verbose, X509_REQ *req, char *ext_sect, CONF *conf,
 | 
			
		||||
	unsigned long certopt, unsigned long nameopt, int default_op,
 | 
			
		||||
@@ -275,6 +279,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	char *extensions=NULL;
 | 
			
		||||
	char *extfile=NULL;
 | 
			
		||||
	char *subj=NULL;
 | 
			
		||||
	unsigned long chtype = MBSTRING_ASC;
 | 
			
		||||
	int multirdn = 0;
 | 
			
		||||
	char *tmp_email_dn=NULL;
 | 
			
		||||
	char *crl_ext=NULL;
 | 
			
		||||
@@ -356,6 +361,8 @@ EF_ALIGNMENT=0;
 | 
			
		||||
			subj= *(++argv);
 | 
			
		||||
			/* preserve=1; */
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-utf8") == 0)
 | 
			
		||||
			chtype = MBSTRING_UTF8;
 | 
			
		||||
		else if (strcmp(*argv,"-create_serial") == 0)
 | 
			
		||||
			create_ser = 1;
 | 
			
		||||
		else if (strcmp(*argv,"-multivalue-rdn") == 0)
 | 
			
		||||
@@ -645,6 +652,23 @@ bad:
 | 
			
		||||
		ERR_clear_error();
 | 
			
		||||
	app_RAND_load_file(randfile, bio_err, 0);
 | 
			
		||||
 | 
			
		||||
	f = NCONF_get_string(conf, section, STRING_MASK);
 | 
			
		||||
	if (!f)
 | 
			
		||||
		ERR_clear_error();
 | 
			
		||||
 | 
			
		||||
	if(f && !ASN1_STRING_set_default_mask_asc(f)) {
 | 
			
		||||
		BIO_printf(bio_err, "Invalid global string mask setting %s\n", f);
 | 
			
		||||
		goto err;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (chtype != MBSTRING_UTF8){
 | 
			
		||||
		f = NCONF_get_string(conf, section, UTF8_IN);
 | 
			
		||||
		if (!f)
 | 
			
		||||
			ERR_clear_error();
 | 
			
		||||
		else if (!strcmp(f, "yes"))
 | 
			
		||||
			chtype = MBSTRING_UTF8;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	db_attr.unique_subject = 1;
 | 
			
		||||
	p = NCONF_get_string(conf, section, ENV_UNIQUE_SUBJECT);
 | 
			
		||||
	if (p)
 | 
			
		||||
@@ -945,7 +969,6 @@ bad:
 | 
			
		||||
			if (verbose) BIO_printf(bio_err,
 | 
			
		||||
				"Done. %d entries marked as expired\n",i); 
 | 
			
		||||
	      		}
 | 
			
		||||
			goto err;
 | 
			
		||||
	  	}
 | 
			
		||||
 | 
			
		||||
 	/*****************************************************************/
 | 
			
		||||
@@ -1135,7 +1158,7 @@ bad:
 | 
			
		||||
			{
 | 
			
		||||
			total++;
 | 
			
		||||
			j=certify_spkac(&x,spkac_file,pkey,x509,dgst,attribs,db,
 | 
			
		||||
				serial,subj,multirdn,email_dn,startdate,enddate,days,extensions,
 | 
			
		||||
				serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,extensions,
 | 
			
		||||
				conf,verbose,certopt,nameopt,default_op,ext_copy);
 | 
			
		||||
			if (j < 0) goto err;
 | 
			
		||||
			if (j > 0)
 | 
			
		||||
@@ -1159,7 +1182,7 @@ bad:
 | 
			
		||||
			{
 | 
			
		||||
			total++;
 | 
			
		||||
			j=certify_cert(&x,ss_cert_file,pkey,x509,dgst,attribs,
 | 
			
		||||
				db,serial,subj,multirdn,email_dn,startdate,enddate,days,batch,
 | 
			
		||||
				db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,batch,
 | 
			
		||||
				extensions,conf,verbose, certopt, nameopt,
 | 
			
		||||
				default_op, ext_copy, e);
 | 
			
		||||
			if (j < 0) goto err;
 | 
			
		||||
@@ -1179,7 +1202,7 @@ bad:
 | 
			
		||||
			{
 | 
			
		||||
			total++;
 | 
			
		||||
			j=certify(&x,infile,pkey,x509p,dgst,attribs,db,
 | 
			
		||||
				serial,subj,multirdn,email_dn,startdate,enddate,days,batch,
 | 
			
		||||
				serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,batch,
 | 
			
		||||
				extensions,conf,verbose, certopt, nameopt,
 | 
			
		||||
				default_op, ext_copy, selfsign);
 | 
			
		||||
			if (j < 0) goto err;
 | 
			
		||||
@@ -1199,7 +1222,7 @@ bad:
 | 
			
		||||
			{
 | 
			
		||||
			total++;
 | 
			
		||||
			j=certify(&x,argv[i],pkey,x509p,dgst,attribs,db,
 | 
			
		||||
				serial,subj,multirdn,email_dn,startdate,enddate,days,batch,
 | 
			
		||||
				serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,batch,
 | 
			
		||||
				extensions,conf,verbose, certopt, nameopt,
 | 
			
		||||
				default_op, ext_copy, selfsign);
 | 
			
		||||
			if (j < 0) goto err;
 | 
			
		||||
@@ -1497,6 +1520,7 @@ err:
 | 
			
		||||
	if (x509) X509_free(x509);
 | 
			
		||||
	X509_CRL_free(crl);
 | 
			
		||||
	NCONF_free(conf);
 | 
			
		||||
	NCONF_free(extconf);
 | 
			
		||||
	OBJ_cleanup();
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
@@ -1509,7 +1533,7 @@ static void lookup_fail(const char *name, const char *tag)
 | 
			
		||||
 | 
			
		||||
static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
 | 
			
		||||
	     const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
 | 
			
		||||
	     BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate, char *enddate,
 | 
			
		||||
	     BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn, char *startdate, char *enddate,
 | 
			
		||||
	     long days, int batch, char *ext_sect, CONF *lconf, int verbose,
 | 
			
		||||
	     unsigned long certopt, unsigned long nameopt, int default_op,
 | 
			
		||||
	     int ext_copy, int selfsign)
 | 
			
		||||
@@ -1565,7 +1589,7 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
 | 
			
		||||
	else
 | 
			
		||||
		BIO_printf(bio_err,"Signature ok\n");
 | 
			
		||||
 | 
			
		||||
	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj, multirdn, email_dn,
 | 
			
		||||
	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn, email_dn,
 | 
			
		||||
		startdate,enddate,days,batch,verbose,req,ext_sect,lconf,
 | 
			
		||||
		certopt, nameopt, default_op, ext_copy, selfsign);
 | 
			
		||||
 | 
			
		||||
@@ -1577,7 +1601,7 @@ err:
 | 
			
		||||
 | 
			
		||||
static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
 | 
			
		||||
	     const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
 | 
			
		||||
	     BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate, char *enddate,
 | 
			
		||||
	     BIGNUM *serial, char *subj, unsigned long chtype, int multirdn, int email_dn, char *startdate, char *enddate,
 | 
			
		||||
	     long days, int batch, char *ext_sect, CONF *lconf, int verbose,
 | 
			
		||||
	     unsigned long certopt, unsigned long nameopt, int default_op,
 | 
			
		||||
	     int ext_copy, ENGINE *e)
 | 
			
		||||
@@ -1619,7 +1643,7 @@ static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
 | 
			
		||||
	if ((rreq=X509_to_X509_REQ(req,NULL,EVP_md5())) == NULL)
 | 
			
		||||
		goto err;
 | 
			
		||||
 | 
			
		||||
	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,multirdn,email_dn,startdate,enddate,
 | 
			
		||||
	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
 | 
			
		||||
		days,batch,verbose,rreq,ext_sect,lconf, certopt, nameopt, default_op,
 | 
			
		||||
		ext_copy, 0);
 | 
			
		||||
 | 
			
		||||
@@ -1631,7 +1655,7 @@ err:
 | 
			
		||||
 | 
			
		||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
 | 
			
		||||
	     STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj,
 | 
			
		||||
	     int multirdn,
 | 
			
		||||
	     unsigned long chtype, int multirdn,
 | 
			
		||||
	     int email_dn, char *startdate, char *enddate, long days, int batch,
 | 
			
		||||
	     int verbose, X509_REQ *req, char *ext_sect, CONF *lconf,
 | 
			
		||||
	     unsigned long certopt, unsigned long nameopt, int default_op,
 | 
			
		||||
@@ -1664,7 +1688,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
 | 
			
		||||
 | 
			
		||||
	if (subj)
 | 
			
		||||
		{
 | 
			
		||||
		X509_NAME *n = parse_name(subj, MBSTRING_ASC, multirdn);
 | 
			
		||||
		X509_NAME *n = parse_name(subj, chtype, multirdn);
 | 
			
		||||
 | 
			
		||||
		if (!n)
 | 
			
		||||
			{
 | 
			
		||||
@@ -2201,7 +2225,7 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext)
 | 
			
		||||
 | 
			
		||||
static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
 | 
			
		||||
	     const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
 | 
			
		||||
	     BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate, char *enddate,
 | 
			
		||||
	     BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn, char *startdate, char *enddate,
 | 
			
		||||
	     long days, char *ext_sect, CONF *lconf, int verbose, unsigned long certopt,
 | 
			
		||||
	     unsigned long nameopt, int default_op, int ext_copy)
 | 
			
		||||
	{
 | 
			
		||||
@@ -2342,7 +2366,7 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
 | 
			
		||||
 | 
			
		||||
	X509_REQ_set_pubkey(req,pktmp);
 | 
			
		||||
	EVP_PKEY_free(pktmp);
 | 
			
		||||
	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,multirdn,email_dn,startdate,enddate,
 | 
			
		||||
	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
 | 
			
		||||
		   days,1,verbose,req,ext_sect,lconf, certopt, nameopt, default_op,
 | 
			
		||||
			ext_copy, 0);
 | 
			
		||||
err:
 | 
			
		||||
@@ -2858,13 +2882,22 @@ int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str)
 | 
			
		||||
	p=(char *)str->data;
 | 
			
		||||
	for (j=str->length; j>0; j--)
 | 
			
		||||
		{
 | 
			
		||||
#ifdef CHARSET_EBCDIC
 | 
			
		||||
		if ((*p >= 0x20) && (*p <= 0x7e))
 | 
			
		||||
			BIO_printf(bp,"%c",os_toebcdic[*p]);
 | 
			
		||||
#else
 | 
			
		||||
		if ((*p >= ' ') && (*p <= '~'))
 | 
			
		||||
			BIO_printf(bp,"%c",*p);
 | 
			
		||||
#endif
 | 
			
		||||
		else if (*p & 0x80)
 | 
			
		||||
			BIO_printf(bp,"\\0x%02X",*p);
 | 
			
		||||
		else if ((unsigned char)*p == 0xf7)
 | 
			
		||||
			BIO_printf(bp,"^?");
 | 
			
		||||
#ifdef CHARSET_EBCDIC
 | 
			
		||||
		else	BIO_printf(bp,"^%c",os_toebcdic[*p+0x40]);
 | 
			
		||||
#else
 | 
			
		||||
		else	BIO_printf(bp,"^%c",*p+'@');
 | 
			
		||||
#endif
 | 
			
		||||
		p++;
 | 
			
		||||
		}
 | 
			
		||||
	BIO_printf(bp,"'\n");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1347
									
								
								apps/cms.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1347
									
								
								apps/cms.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										73
									
								
								apps/dgst.c
									
									
									
									
									
								
							
							
						
						
									
										73
									
								
								apps/dgst.c
									
									
									
									
									
								
							@@ -66,6 +66,7 @@
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/hmac.h>
 | 
			
		||||
 | 
			
		||||
#undef BUFSIZE
 | 
			
		||||
#define BUFSIZE	1024*8
 | 
			
		||||
@@ -75,7 +76,7 @@
 | 
			
		||||
 | 
			
		||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
	  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
			
		||||
	  const char *file);
 | 
			
		||||
	  const char *file,BIO *bmd,const char *hmac_key);
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
@@ -104,6 +105,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	char *hmac_key=NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -188,6 +190,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			out_bin = 1;
 | 
			
		||||
		else if (strcmp(*argv,"-d") == 0)
 | 
			
		||||
			debug=1;
 | 
			
		||||
		else if (!strcmp(*argv,"-fips-fingerprint"))
 | 
			
		||||
			hmac_key = "etaonrishdlcupfm";
 | 
			
		||||
		else if (!strcmp(*argv,"-hmac"))
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				break;
 | 
			
		||||
			hmac_key=*++argv;
 | 
			
		||||
			}
 | 
			
		||||
		else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
 | 
			
		||||
			md=m;
 | 
			
		||||
		else
 | 
			
		||||
@@ -219,33 +229,38 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		BIO_printf(bio_err,"-keyform arg    key file format (PEM or ENGINE)\n");
 | 
			
		||||
		BIO_printf(bio_err,"-signature file signature to verify\n");
 | 
			
		||||
		BIO_printf(bio_err,"-binary         output in binary form\n");
 | 
			
		||||
		BIO_printf(bio_err,"-hmac key       create hashed MAC with key\n");
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm (default)\n",
 | 
			
		||||
			LN_md5,LN_md5);
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_md4,LN_md4);
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_md2,LN_md2);
 | 
			
		||||
#ifndef OPENSSL_NO_SHA
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_sha1,LN_sha1);
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_sha,LN_sha);
 | 
			
		||||
#ifndef OPENSSL_NO_SHA256
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_sha224,LN_sha224);
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_sha256,LN_sha256);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA512
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_sha384,LN_sha384);
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_sha512,LN_sha512);
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_mdc2,LN_mdc2);
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
 | 
			
		||||
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
 | 
			
		||||
			LN_ripemd160,LN_ripemd160);
 | 
			
		||||
		err=1;
 | 
			
		||||
		goto end;
 | 
			
		||||
@@ -261,7 +276,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_callback(in,BIO_debug_callback);
 | 
			
		||||
		/* needed for windows 3.1 */
 | 
			
		||||
		BIO_set_callback_arg(in,bio_err);
 | 
			
		||||
		BIO_set_callback_arg(in,(char *)bio_err);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(!app_passwd(bio_err, passargin, NULL, &passin, NULL))
 | 
			
		||||
@@ -358,7 +373,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
			
		||||
		err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
 | 
			
		||||
			  siglen,"","(stdin)");
 | 
			
		||||
			  siglen,"","(stdin)",bmd,hmac_key);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
@@ -376,14 +391,15 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				}
 | 
			
		||||
			if(!out_bin)
 | 
			
		||||
				{
 | 
			
		||||
				size_t len = strlen(name)+strlen(argv[i])+5;
 | 
			
		||||
				size_t len = strlen(name)+strlen(argv[i])+(hmac_key ? 5 : 0)+5;
 | 
			
		||||
				tmp=tofree=OPENSSL_malloc(len);
 | 
			
		||||
				BIO_snprintf(tmp,len,"%s(%s)= ",name,argv[i]);
 | 
			
		||||
				BIO_snprintf(tmp,len,"%s%s(%s)= ",
 | 
			
		||||
							 hmac_key ? "HMAC-" : "",name,argv[i]);
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				tmp="";
 | 
			
		||||
			r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
 | 
			
		||||
				siglen,tmp,argv[i]);
 | 
			
		||||
				siglen,tmp,argv[i],bmd,hmac_key);
 | 
			
		||||
			if(r)
 | 
			
		||||
			    err=r;
 | 
			
		||||
			if(tofree)
 | 
			
		||||
@@ -410,11 +426,23 @@ end:
 | 
			
		||||
 | 
			
		||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
	  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
			
		||||
	  const char *file)
 | 
			
		||||
	  const char *file,BIO *bmd,const char *hmac_key)
 | 
			
		||||
	{
 | 
			
		||||
	int len;
 | 
			
		||||
	unsigned int len;
 | 
			
		||||
	int i;
 | 
			
		||||
	EVP_MD_CTX *md_ctx;
 | 
			
		||||
	HMAC_CTX hmac_ctx;
 | 
			
		||||
 | 
			
		||||
	if (hmac_key)
 | 
			
		||||
		{
 | 
			
		||||
		EVP_MD *md;
 | 
			
		||||
 | 
			
		||||
		BIO_get_md(bmd,&md);
 | 
			
		||||
		HMAC_CTX_init(&hmac_ctx);
 | 
			
		||||
		HMAC_Init_ex(&hmac_ctx,hmac_key,strlen(hmac_key),md, NULL);
 | 
			
		||||
		BIO_get_md_ctx(bmd,&md_ctx);
 | 
			
		||||
		BIO_set_md_ctx(bmd,&hmac_ctx.md_ctx);
 | 
			
		||||
		}
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		i=BIO_read(bp,(char *)buf,BUFSIZE);
 | 
			
		||||
@@ -457,6 +485,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else if(hmac_key)
 | 
			
		||||
		{
 | 
			
		||||
		HMAC_Final(&hmac_ctx,buf,&len);
 | 
			
		||||
		HMAC_CTX_cleanup(&hmac_ctx);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		len=BIO_gets(bp,(char *)buf,BUFSIZE);
 | 
			
		||||
 | 
			
		||||
@@ -464,7 +497,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
	else 
 | 
			
		||||
		{
 | 
			
		||||
		BIO_write(out,title,strlen(title));
 | 
			
		||||
		for (i=0; i<len; i++)
 | 
			
		||||
		for (i=0; i<(int)len; i++)
 | 
			
		||||
			{
 | 
			
		||||
			if (sep && (i != 0))
 | 
			
		||||
				BIO_printf(out, ":");
 | 
			
		||||
@@ -472,6 +505,10 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
			}
 | 
			
		||||
		BIO_printf(out, "\n");
 | 
			
		||||
		}
 | 
			
		||||
	if (hmac_key)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_md_ctx(bmd,md_ctx);
 | 
			
		||||
		}
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>	/* for OPENSSL_NO_DH */
 | 
			
		||||
#ifndef OPENSSL_NO_DH
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -109,6 +109,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>	/* for OPENSSL_NO_DH */
 | 
			
		||||
#ifndef OPENSSL_NO_DH
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								apps/dsa.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/dsa.c
									
									
									
									
									
								
							@@ -56,6 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>	/* for OPENSSL_NO_DSA */
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
@@ -83,6 +84,10 @@
 | 
			
		||||
 * -aes128	- encrypt output if PEM format
 | 
			
		||||
 * -aes192	- encrypt output if PEM format
 | 
			
		||||
 * -aes256	- encrypt output if PEM format
 | 
			
		||||
 * -camellia128 - encrypt output if PEM format
 | 
			
		||||
 * -camellia192 - encrypt output if PEM format
 | 
			
		||||
 * -camellia256 - encrypt output if PEM format
 | 
			
		||||
 * -seed        - encrypt output if PEM format
 | 
			
		||||
 * -text	- print a text version
 | 
			
		||||
 * -modulus	- print the DSA public key
 | 
			
		||||
 */
 | 
			
		||||
@@ -210,6 +215,13 @@ bad:
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		BIO_printf(bio_err," -camellia128, -camellia192, -camellia256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc camellia\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		BIO_printf(bio_err," -seed           encrypt PEM output with cbc seed\n");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err," -text           print the key in text\n");
 | 
			
		||||
		BIO_printf(bio_err," -noout          don't print key out\n");
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>	/* for OPENSSL_NO_DSA */
 | 
			
		||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
 | 
			
		||||
 * deprecated functions for openssl-internal code */
 | 
			
		||||
#ifdef OPENSSL_NO_DEPRECATED
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								apps/ec.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								apps/ec.c
									
									
									
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 * Written by Nils Larsch for the OpenSSL project.
 | 
			
		||||
 */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
@@ -56,6 +56,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
#ifndef OPENSSL_NO_EC
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
@@ -89,6 +90,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#endif
 | 
			
		||||
	int 	ret = 1;
 | 
			
		||||
	EC_KEY 	*eckey = NULL;
 | 
			
		||||
	const EC_GROUP *group;
 | 
			
		||||
	int 	i, badops = 0;
 | 
			
		||||
	const EVP_CIPHER *enc = NULL;
 | 
			
		||||
	BIO 	*in = NULL, *out = NULL;
 | 
			
		||||
@@ -242,7 +244,7 @@ bad:
 | 
			
		||||
				" the ec parameters are encoded\n");
 | 
			
		||||
		BIO_printf(bio_err, "                 in the asn1 der "
 | 
			
		||||
				"encoding\n");
 | 
			
		||||
		BIO_printf(bio_err, "                 possilbe values:"
 | 
			
		||||
		BIO_printf(bio_err, "                 possible values:"
 | 
			
		||||
				" named_curve (default)\n");
 | 
			
		||||
		BIO_printf(bio_err,"                                  "
 | 
			
		||||
				"explicit\n");
 | 
			
		||||
@@ -328,14 +330,13 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	group = EC_KEY_get0_group(eckey);
 | 
			
		||||
 | 
			
		||||
	if (new_form)
 | 
			
		||||
		{
 | 
			
		||||
		EC_GROUP_set_point_conversion_form(eckey->group, form);
 | 
			
		||||
		eckey->conv_form = form;
 | 
			
		||||
		}
 | 
			
		||||
		EC_KEY_set_conv_form(eckey, form);
 | 
			
		||||
 | 
			
		||||
	if (new_asn1_flag)
 | 
			
		||||
		EC_GROUP_set_asn1_flag(eckey->group, asn1_flag);
 | 
			
		||||
		EC_KEY_set_asn1_flag(eckey, asn1_flag);
 | 
			
		||||
 | 
			
		||||
	if (text) 
 | 
			
		||||
		if (!EC_KEY_print(out, eckey, 0))
 | 
			
		||||
@@ -346,13 +347,16 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
	if (noout) 
 | 
			
		||||
		{
 | 
			
		||||
		ret = 0;
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	BIO_printf(bio_err, "writing EC key\n");
 | 
			
		||||
	if (outformat == FORMAT_ASN1) 
 | 
			
		||||
		{
 | 
			
		||||
		if (param_out)
 | 
			
		||||
			i = i2d_ECPKParameters_bio(out, eckey->group);
 | 
			
		||||
			i = i2d_ECPKParameters_bio(out, group);
 | 
			
		||||
		else if (pubin || pubout) 
 | 
			
		||||
			i = i2d_EC_PUBKEY_bio(out, eckey);
 | 
			
		||||
		else 
 | 
			
		||||
@@ -361,7 +365,7 @@ bad:
 | 
			
		||||
	else if (outformat == FORMAT_PEM) 
 | 
			
		||||
		{
 | 
			
		||||
		if (param_out)
 | 
			
		||||
			i = PEM_write_bio_ECPKParameters(out, eckey->group);
 | 
			
		||||
			i = PEM_write_bio_ECPKParameters(out, group);
 | 
			
		||||
		else if (pubin || pubout)
 | 
			
		||||
			i = PEM_write_bio_EC_PUBKEY(out, eckey);
 | 
			
		||||
		else 
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@
 | 
			
		||||
 * Written by Nils Larsch for the OpenSSL project.
 | 
			
		||||
 */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
@@ -68,6 +68,8 @@
 | 
			
		||||
 * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
#ifndef OPENSSL_NO_EC
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
@@ -411,7 +413,7 @@ bad:
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		group = EC_GROUP_new_by_nid(nid);
 | 
			
		||||
		group = EC_GROUP_new_by_curve_name(nid);
 | 
			
		||||
		if (group == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "unable to create curve (%s)\n", 
 | 
			
		||||
@@ -647,11 +649,11 @@ bad:
 | 
			
		||||
 | 
			
		||||
		assert(need_rand);
 | 
			
		||||
 | 
			
		||||
		eckey->group = group;
 | 
			
		||||
		if (EC_KEY_set_group(eckey, group) == 0)
 | 
			
		||||
			goto end;
 | 
			
		||||
		
 | 
			
		||||
		if (!EC_KEY_generate_key(eckey))
 | 
			
		||||
			{
 | 
			
		||||
			eckey->group = NULL;
 | 
			
		||||
			EC_KEY_free(eckey);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
@@ -664,11 +666,9 @@ bad:
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "bad output format specified "
 | 
			
		||||
				"for outfile\n");
 | 
			
		||||
			eckey->group = NULL;
 | 
			
		||||
			EC_KEY_free(eckey);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		eckey->group = NULL;
 | 
			
		||||
		EC_KEY_free(eckey);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								apps/enc.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								apps/enc.c
									
									
									
									
									
								
							@@ -340,7 +340,7 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		/* It must be large enough for a base64 encoded line */
 | 
			
		||||
		if (n < 80) n=80;
 | 
			
		||||
		if (base64 && n < 80) n=80;
 | 
			
		||||
 | 
			
		||||
		bsize=(int)n;
 | 
			
		||||
		if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize);
 | 
			
		||||
@@ -365,12 +365,16 @@ bad:
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_callback(in,BIO_debug_callback);
 | 
			
		||||
		BIO_set_callback(out,BIO_debug_callback);
 | 
			
		||||
		BIO_set_callback_arg(in,bio_err);
 | 
			
		||||
		BIO_set_callback_arg(out,bio_err);
 | 
			
		||||
		BIO_set_callback_arg(in,(char *)bio_err);
 | 
			
		||||
		BIO_set_callback_arg(out,(char *)bio_err);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (inf == NULL)
 | 
			
		||||
	        {
 | 
			
		||||
		if (bufsize != NULL)
 | 
			
		||||
			setvbuf(stdin, (char *)NULL, _IONBF, 0);
 | 
			
		||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
			
		||||
	        }
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_read_filename(in,inf) <= 0)
 | 
			
		||||
@@ -421,6 +425,8 @@ bad:
 | 
			
		||||
	if (outf == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_fp(out,stdout,BIO_NOCLOSE);
 | 
			
		||||
		if (bufsize != NULL)
 | 
			
		||||
			setvbuf(stdout, (char *)NULL, _IONBF, 0);
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		{
 | 
			
		||||
		BIO *tmpbio = BIO_new(BIO_f_linebuffer());
 | 
			
		||||
@@ -447,7 +453,7 @@ bad:
 | 
			
		||||
		if (debug)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_set_callback(b64,BIO_debug_callback);
 | 
			
		||||
			BIO_set_callback_arg(b64,bio_err);
 | 
			
		||||
			BIO_set_callback_arg(b64,(char *)bio_err);
 | 
			
		||||
			}
 | 
			
		||||
		if (olb64)
 | 
			
		||||
			BIO_set_flags(b64,BIO_FLAGS_BASE64_NO_NL);
 | 
			
		||||
@@ -565,7 +571,7 @@ bad:
 | 
			
		||||
		if (debug)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_set_callback(benc,BIO_debug_callback);
 | 
			
		||||
			BIO_set_callback_arg(benc,bio_err);
 | 
			
		||||
			BIO_set_callback_arg(benc,(char *)bio_err);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (printkey)
 | 
			
		||||
 
 | 
			
		||||
@@ -394,11 +394,15 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		else if (strcmp(*argv,"-pre") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			argc--; argv++;
 | 
			
		||||
			if (argc == 0)
 | 
			
		||||
				goto skip_arg_loop;
 | 
			
		||||
			sk_push(pre_cmds,*argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-post") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			argc--; argv++;
 | 
			
		||||
			if (argc == 0)
 | 
			
		||||
				goto skip_arg_loop;
 | 
			
		||||
			sk_push(post_cmds,*argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if ((strncmp(*argv,"-h",2) == 0) ||
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
 | 
			
		||||
 * deprecated functions for openssl-internal code */
 | 
			
		||||
#ifdef OPENSSL_NO_DEPRECATED
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>	/* for OPENSSL_NO_DSA */
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -139,6 +140,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		else if (strcmp(*argv,"-idea") == 0)
 | 
			
		||||
			enc=EVP_idea_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		else if (strcmp(*argv,"-seed") == 0)
 | 
			
		||||
			enc=EVP_seed_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		else if (strcmp(*argv,"-aes128") == 0)
 | 
			
		||||
			enc=EVP_aes_128_cbc();
 | 
			
		||||
@@ -146,6 +151,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			enc=EVP_aes_192_cbc();
 | 
			
		||||
		else if (strcmp(*argv,"-aes256") == 0)
 | 
			
		||||
			enc=EVP_aes_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		else if (strcmp(*argv,"-camellia128") == 0)
 | 
			
		||||
			enc=EVP_camellia_128_cbc();
 | 
			
		||||
		else if (strcmp(*argv,"-camellia192") == 0)
 | 
			
		||||
			enc=EVP_camellia_192_cbc();
 | 
			
		||||
		else if (strcmp(*argv,"-camellia256") == 0)
 | 
			
		||||
			enc=EVP_camellia_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
		else if (**argv != '-' && dsaparams == NULL)
 | 
			
		||||
			{
 | 
			
		||||
@@ -169,10 +182,18 @@ bad:
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
		BIO_printf(bio_err," -idea     - encrypt the generated key with IDEA in cbc mode\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		BIO_printf(bio_err," -seed\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc seed\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		BIO_printf(bio_err," -camellia128, -camellia192, -camellia256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc camellia\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
 | 
			
		||||
 * deprecated functions for openssl-internal code */
 | 
			
		||||
#ifdef OPENSSL_NO_DEPRECATED
 | 
			
		||||
@@ -159,6 +160,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		else if (strcmp(*argv,"-idea") == 0)
 | 
			
		||||
			enc=EVP_idea_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		else if (strcmp(*argv,"-seed") == 0)
 | 
			
		||||
			enc=EVP_seed_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		else if (strcmp(*argv,"-aes128") == 0)
 | 
			
		||||
			enc=EVP_aes_128_cbc();
 | 
			
		||||
@@ -166,6 +171,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			enc=EVP_aes_192_cbc();
 | 
			
		||||
		else if (strcmp(*argv,"-aes256") == 0)
 | 
			
		||||
			enc=EVP_aes_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		else if (strcmp(*argv,"-camellia128") == 0)
 | 
			
		||||
			enc=EVP_camellia_128_cbc();
 | 
			
		||||
		else if (strcmp(*argv,"-camellia192") == 0)
 | 
			
		||||
			enc=EVP_camellia_192_cbc();
 | 
			
		||||
		else if (strcmp(*argv,"-camellia256") == 0)
 | 
			
		||||
			enc=EVP_camellia_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-passout") == 0)
 | 
			
		||||
			{
 | 
			
		||||
@@ -186,9 +199,17 @@ bad:
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
		BIO_printf(bio_err," -idea           encrypt the generated key with IDEA in cbc mode\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		BIO_printf(bio_err," -seed\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc seed\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		BIO_printf(bio_err," -camellia128, -camellia192, -camellia256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc camellia\n");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err," -out file       output the key to 'file\n");
 | 
			
		||||
		BIO_printf(bio_err," -passout arg    output file pass phrase source\n");
 | 
			
		||||
 
 | 
			
		||||
@@ -142,27 +142,10 @@ $ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
 | 
			
		||||
	      "RSA;RSAUTL;DSA;DSAPARAM;EC;ECPARAM;"+-
 | 
			
		||||
	      "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+-
 | 
			
		||||
	      "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+-
 | 
			
		||||
	      "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP;PRIME"
 | 
			
		||||
$ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,-
 | 
			
		||||
	       CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,-
 | 
			
		||||
	       RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,EC.OBJ,ECPARAM.OBJ,-
 | 
			
		||||
	       X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,-
 | 
			
		||||
	       S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,-
 | 
			
		||||
	       CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ,PRIME.OBJ
 | 
			
		||||
	      "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;CMS;RAND;ENGINE;OCSP;PRIME"
 | 
			
		||||
$ TCPIP_PROGRAMS = ",,"
 | 
			
		||||
$ IF COMPILER .EQS. "VAXC" THEN -
 | 
			
		||||
     TCPIP_PROGRAMS = ",OPENSSL,"
 | 
			
		||||
$!$ APP_FILES := VERIFY;ASN1PARS;REQ;DGST;DH;ENC;GENDH;ERRSTR;CA;-
 | 
			
		||||
$!	       PKCS7;CRL2P7;CRL;-
 | 
			
		||||
$!	       RSA;DSA;DSAPARAM;-
 | 
			
		||||
$!	       X509;GENRSA;GENDSA;-
 | 
			
		||||
$!	       S_SERVER,'OBJ_DIR'S_SOCKET.OBJ,'OBJ_DIR'S_CB.OBJ;-
 | 
			
		||||
$!	       S_CLIENT,'OBJ_DIR'S_SOCKET.OBJ,'OBJ_DIR'S_CB.OBJ;-
 | 
			
		||||
$!	       SPEED;-
 | 
			
		||||
$!	       S_TIME,'OBJ_DIR'S_CB.OBJ;VERSION;SESS_ID;CIPHERS;NSEQ
 | 
			
		||||
$!$ TCPIP_PROGRAMS = ",,"
 | 
			
		||||
$!$ IF COMPILER .EQS. "VAXC" THEN -
 | 
			
		||||
$!     TCPIP_PROGRAMS = ",S_SERVER,S_CLIENT,SESS_ID,CIPHERS,S_TIME,"
 | 
			
		||||
$!
 | 
			
		||||
$! Setup exceptional compilations
 | 
			
		||||
$!
 | 
			
		||||
@@ -650,7 +633,7 @@ $ CCDEFS = "MONOLITH"
 | 
			
		||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
 | 
			
		||||
$ CCEXTRAFLAGS = ""
 | 
			
		||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
 | 
			
		||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
 | 
			
		||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
 | 
			
		||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
 | 
			
		||||
	CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
 | 
			
		||||
$!
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										210
									
								
								apps/ocsp.c
									
									
									
									
									
								
							
							
						
						
									
										210
									
								
								apps/ocsp.c
									
									
									
									
									
								
							@@ -56,15 +56,14 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifndef OPENSSL_NO_OCSP
 | 
			
		||||
 | 
			
		||||
#define USE_SOCKETS
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/ocsp.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include "apps.h" /* needs to be included before the openssl headers! */
 | 
			
		||||
#include <openssl/e_os2.h>
 | 
			
		||||
#include <openssl/ssl.h>
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
 | 
			
		||||
/* Maximum leeway in validity period: default 5 minutes */
 | 
			
		||||
#define MAX_VALIDITY_PERIOD	(5 * 60)
 | 
			
		||||
@@ -86,6 +85,8 @@ static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser);
 | 
			
		||||
static BIO *init_responder(char *port);
 | 
			
		||||
static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port);
 | 
			
		||||
static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp);
 | 
			
		||||
static OCSP_RESPONSE *query_responder(BIO *err, BIO *cbio, char *path,
 | 
			
		||||
				OCSP_REQUEST *req, int req_timeout);
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG ocsp_main
 | 
			
		||||
@@ -112,11 +113,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	BIO *acbio = NULL, *cbio = NULL;
 | 
			
		||||
	BIO *derbio = NULL;
 | 
			
		||||
	BIO *out = NULL;
 | 
			
		||||
	int req_timeout = -1;
 | 
			
		||||
	int req_text = 0, resp_text = 0;
 | 
			
		||||
	long nsec = MAX_VALIDITY_PERIOD, maxage = -1;
 | 
			
		||||
	char *CAfile = NULL, *CApath = NULL;
 | 
			
		||||
	X509_STORE *store = NULL;
 | 
			
		||||
	SSL_CTX *ctx = NULL;
 | 
			
		||||
	STACK_OF(X509) *sign_other = NULL, *verify_other = NULL, *rother = NULL;
 | 
			
		||||
	char *sign_certfile = NULL, *verify_certfile = NULL, *rcertfile = NULL;
 | 
			
		||||
	unsigned long sign_flags = 0, verify_flags = 0, rflags = 0;
 | 
			
		||||
@@ -139,6 +140,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (!load_config(bio_err, NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
	SSL_load_error_strings();
 | 
			
		||||
	OpenSSL_add_ssl_algorithms();
 | 
			
		||||
	args = argv + 1;
 | 
			
		||||
	reqnames = sk_new_null();
 | 
			
		||||
	ids = sk_OCSP_CERTID_new_null();
 | 
			
		||||
@@ -153,6 +155,22 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				}
 | 
			
		||||
			else badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*args, "-timeout"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				req_timeout = atol(*args);
 | 
			
		||||
				if (req_timeout < 0)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,
 | 
			
		||||
						"Illegal timeout value %s\n",
 | 
			
		||||
						*args);
 | 
			
		||||
					badarg = 1;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			else badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*args, "-url"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
@@ -702,47 +720,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	else if (host)
 | 
			
		||||
		{
 | 
			
		||||
#ifndef OPENSSL_NO_SOCK
 | 
			
		||||
		cbio = BIO_new_connect(host);
 | 
			
		||||
		resp = process_responder(bio_err, req, host, path,
 | 
			
		||||
						port, use_ssl, req_timeout);
 | 
			
		||||
		if (!resp)
 | 
			
		||||
			goto end;
 | 
			
		||||
#else
 | 
			
		||||
		BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
#endif
 | 
			
		||||
		if (!cbio)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error creating connect BIO\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if (port) BIO_set_conn_port(cbio, port);
 | 
			
		||||
		if (use_ssl == 1)
 | 
			
		||||
			{
 | 
			
		||||
			BIO *sbio;
 | 
			
		||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
			ctx = SSL_CTX_new(SSLv23_client_method());
 | 
			
		||||
#elif !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
			ctx = SSL_CTX_new(SSLv3_client_method());
 | 
			
		||||
#elif !defined(OPENSSL_NO_SSL2)
 | 
			
		||||
			ctx = SSL_CTX_new(SSLv2_client_method());
 | 
			
		||||
#else
 | 
			
		||||
			BIO_printf(bio_err, "SSL is disabled\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
#endif
 | 
			
		||||
			SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
 | 
			
		||||
			sbio = BIO_new_ssl(ctx, 1);
 | 
			
		||||
			cbio = BIO_push(sbio, cbio);
 | 
			
		||||
			}
 | 
			
		||||
		if (BIO_do_connect(cbio) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error connecting BIO\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		resp = OCSP_sendreq_bio(cbio, path, req);
 | 
			
		||||
		BIO_free_all(cbio);
 | 
			
		||||
		cbio = NULL;
 | 
			
		||||
		if (!resp)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error querying OCSP responsder\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else if (respin)
 | 
			
		||||
		{
 | 
			
		||||
@@ -891,7 +876,6 @@ end:
 | 
			
		||||
		OPENSSL_free(host);
 | 
			
		||||
		OPENSSL_free(port);
 | 
			
		||||
		OPENSSL_free(path);
 | 
			
		||||
		SSL_CTX_free(ctx);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
@@ -1115,6 +1099,7 @@ static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser)
 | 
			
		||||
	char *itmp, *row[DB_NUMBER],**rrow;
 | 
			
		||||
	for (i = 0; i < DB_NUMBER; i++) row[i] = NULL;
 | 
			
		||||
	bn = ASN1_INTEGER_to_BN(ser,NULL);
 | 
			
		||||
	OPENSSL_assert(bn); /* FIXME: should report an error at this point and abort */
 | 
			
		||||
	if (BN_is_zero(bn))
 | 
			
		||||
		itmp = BUF_strdup("00");
 | 
			
		||||
	else
 | 
			
		||||
@@ -1221,8 +1206,141 @@ static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp)
 | 
			
		||||
		return 0;
 | 
			
		||||
	BIO_printf(cbio, http_resp, i2d_OCSP_RESPONSE(resp, NULL));
 | 
			
		||||
	i2d_OCSP_RESPONSE_bio(cbio, resp);
 | 
			
		||||
	BIO_flush(cbio);
 | 
			
		||||
	(void)BIO_flush(cbio);
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static OCSP_RESPONSE *query_responder(BIO *err, BIO *cbio, char *path,
 | 
			
		||||
				OCSP_REQUEST *req, int req_timeout)
 | 
			
		||||
	{
 | 
			
		||||
	int fd;
 | 
			
		||||
	int rv;
 | 
			
		||||
	OCSP_REQ_CTX *ctx = NULL;
 | 
			
		||||
	OCSP_RESPONSE *rsp = NULL;
 | 
			
		||||
	fd_set confds;
 | 
			
		||||
	struct timeval tv;
 | 
			
		||||
 | 
			
		||||
	if (req_timeout != -1)
 | 
			
		||||
		BIO_set_nbio(cbio, 1);
 | 
			
		||||
 | 
			
		||||
	rv = BIO_do_connect(cbio);
 | 
			
		||||
 | 
			
		||||
	if ((rv <= 0) && ((req_timeout == -1) || !BIO_should_retry(cbio)))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(err, "Error connecting BIO\n");
 | 
			
		||||
		return NULL;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (req_timeout == -1)
 | 
			
		||||
		return OCSP_sendreq_bio(cbio, path, req);
 | 
			
		||||
 | 
			
		||||
	if (BIO_get_fd(cbio, &fd) <= 0)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(err, "Can't get connection fd\n");
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (rv <= 0)
 | 
			
		||||
		{
 | 
			
		||||
		FD_ZERO(&confds);
 | 
			
		||||
		openssl_fdset(fd, &confds);
 | 
			
		||||
		tv.tv_usec = 0;
 | 
			
		||||
		tv.tv_sec = req_timeout;
 | 
			
		||||
		rv = select(fd + 1, NULL, (void *)&confds, NULL, &tv);
 | 
			
		||||
		if (rv == 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(err, "Timeout on connect\n");
 | 
			
		||||
			return NULL;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	ctx = OCSP_sendreq_new(cbio, path, req, -1);
 | 
			
		||||
	if (!ctx)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		rv = OCSP_sendreq_nbio(&rsp, ctx);
 | 
			
		||||
		if (rv != -1)
 | 
			
		||||
			break;
 | 
			
		||||
		FD_ZERO(&confds);
 | 
			
		||||
		openssl_fdset(fd, &confds);
 | 
			
		||||
		tv.tv_usec = 0;
 | 
			
		||||
		tv.tv_sec = req_timeout;
 | 
			
		||||
		if (BIO_should_read(cbio))
 | 
			
		||||
			rv = select(fd + 1, (void *)&confds, NULL, NULL, &tv);
 | 
			
		||||
		else if (BIO_should_write(cbio))
 | 
			
		||||
			rv = select(fd + 1, NULL, (void *)&confds, NULL, &tv);
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(err, "Unexpected retry condition\n");
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		if (rv == 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(err, "Timeout on request\n");
 | 
			
		||||
			break;
 | 
			
		||||
			}
 | 
			
		||||
		if (rv == -1)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(err, "Select error\n");
 | 
			
		||||
			break;
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
		}
 | 
			
		||||
	err:
 | 
			
		||||
	if (ctx)
 | 
			
		||||
		OCSP_REQ_CTX_free(ctx);
 | 
			
		||||
 | 
			
		||||
	return rsp;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req,
 | 
			
		||||
			char *host, char *path, char *port, int use_ssl,
 | 
			
		||||
			int req_timeout)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *cbio = NULL;
 | 
			
		||||
	SSL_CTX *ctx = NULL;
 | 
			
		||||
	OCSP_RESPONSE *resp = NULL;
 | 
			
		||||
	cbio = BIO_new_connect(host);
 | 
			
		||||
	if (!cbio)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err, "Error creating connect BIO\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
	if (port) BIO_set_conn_port(cbio, port);
 | 
			
		||||
	if (use_ssl == 1)
 | 
			
		||||
		{
 | 
			
		||||
		BIO *sbio;
 | 
			
		||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
		ctx = SSL_CTX_new(SSLv23_client_method());
 | 
			
		||||
#elif !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
		ctx = SSL_CTX_new(SSLv3_client_method());
 | 
			
		||||
#elif !defined(OPENSSL_NO_SSL2)
 | 
			
		||||
		ctx = SSL_CTX_new(SSLv2_client_method());
 | 
			
		||||
#else
 | 
			
		||||
		BIO_printf(err, "SSL is disabled\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
#endif
 | 
			
		||||
		if (ctx == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(err, "Error creating SSL context.\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
 | 
			
		||||
		sbio = BIO_new_ssl(ctx, 1);
 | 
			
		||||
		cbio = BIO_push(sbio, cbio);
 | 
			
		||||
		}
 | 
			
		||||
	resp = query_responder(err, cbio, path, req, req_timeout);
 | 
			
		||||
	if (!resp)
 | 
			
		||||
		BIO_printf(bio_err, "Error querying OCSP responsder\n");
 | 
			
		||||
	end:
 | 
			
		||||
	if (ctx)
 | 
			
		||||
		SSL_CTX_free(ctx);
 | 
			
		||||
	if (cbio)
 | 
			
		||||
		BIO_free_all(cbio);
 | 
			
		||||
	return resp;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -188,7 +188,7 @@ nsComment			= "OpenSSL Generated Certificate"
 | 
			
		||||
 | 
			
		||||
# PKIX recommendations harmless if included in all certificates.
 | 
			
		||||
subjectKeyIdentifier=hash
 | 
			
		||||
authorityKeyIdentifier=keyid,issuer:always
 | 
			
		||||
authorityKeyIdentifier=keyid,issuer
 | 
			
		||||
 | 
			
		||||
# This stuff is for subjectAltName and issuerAltname.
 | 
			
		||||
# Import the email address.
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
@@ -445,7 +445,11 @@ static int do_cmd(LHASH *prog, int argc, char *argv[])
 | 
			
		||||
		for (fp=functions; fp->name != NULL; fp++)
 | 
			
		||||
			{
 | 
			
		||||
			nl=0;
 | 
			
		||||
#ifdef OPENSSL_NO_CAMELLIA
 | 
			
		||||
			if (((i++) % 5) == 0)
 | 
			
		||||
#else
 | 
			
		||||
			if (((i++) % 4) == 0)
 | 
			
		||||
#endif
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"\n");
 | 
			
		||||
				nl=1;
 | 
			
		||||
@@ -466,7 +470,11 @@ static int do_cmd(LHASH *prog, int argc, char *argv[])
 | 
			
		||||
					BIO_printf(bio_err,"\nCipher commands (see the `enc' command for more details)\n");
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
#ifdef OPENSSL_NO_CAMELLIA
 | 
			
		||||
			BIO_printf(bio_err,"%-15s",fp->name);
 | 
			
		||||
#else
 | 
			
		||||
			BIO_printf(bio_err,"%-18s",fp->name);
 | 
			
		||||
#endif
 | 
			
		||||
			}
 | 
			
		||||
		BIO_printf(bio_err,"\n\n");
 | 
			
		||||
		ret=0;
 | 
			
		||||
 
 | 
			
		||||
@@ -188,7 +188,7 @@ nsComment			= "OpenSSL Generated Certificate"
 | 
			
		||||
 | 
			
		||||
# PKIX recommendations harmless if included in all certificates.
 | 
			
		||||
subjectKeyIdentifier=hash
 | 
			
		||||
authorityKeyIdentifier=keyid,issuer:always
 | 
			
		||||
authorityKeyIdentifier=keyid,issuer
 | 
			
		||||
 | 
			
		||||
# This stuff is for subjectAltName and issuerAltname.
 | 
			
		||||
# Import the email address.
 | 
			
		||||
 
 | 
			
		||||
@@ -474,7 +474,8 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p,
 | 
			
		||||
	if ((strlen(passwd) > pw_maxlen))
 | 
			
		||||
		{
 | 
			
		||||
		if (!quiet)
 | 
			
		||||
			BIO_printf(bio_err, "Warning: truncating password to %u characters\n", pw_maxlen);
 | 
			
		||||
			/* XXX: really we should know how to print a size_t, not cast it */
 | 
			
		||||
			BIO_printf(bio_err, "Warning: truncating password to %u characters\n", (unsigned)pw_maxlen);
 | 
			
		||||
		passwd[pw_maxlen] = 0;
 | 
			
		||||
		}
 | 
			
		||||
	assert(strlen(passwd) <= pw_maxlen);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,9 @@
 | 
			
		||||
/* pkcs12.c */
 | 
			
		||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
 | 
			
		||||
 | 
			
		||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
 | 
			
		||||
 * project.
 | 
			
		||||
 */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1999-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1999-2006 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
@@ -58,6 +56,9 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -152,14 +153,22 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
    			cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
 | 
			
		||||
		else if (!strcmp (*args, "-export")) export_cert = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-des")) enc=EVP_des_cbc();
 | 
			
		||||
		else if (!strcmp (*args, "-des3")) enc = EVP_des_ede3_cbc();
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
		else if (!strcmp (*args, "-idea")) enc=EVP_idea_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
		else if (!strcmp (*args, "-des3")) enc = EVP_des_ede3_cbc();
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		else if (!strcmp(*args, "-seed")) enc=EVP_seed_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		else if (!strcmp(*args,"-aes128")) enc=EVP_aes_128_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-aes192")) enc=EVP_aes_192_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-aes256")) enc=EVP_aes_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		else if (!strcmp(*args,"-camellia128")) enc=EVP_camellia_128_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-camellia192")) enc=EVP_camellia_192_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-camellia256")) enc=EVP_camellia_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
		else if (!strcmp (*args, "-noiter")) iter = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-maciter"))
 | 
			
		||||
@@ -174,7 +183,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				args++;
 | 
			
		||||
				if (!strcmp(*args, "NONE"))
 | 
			
		||||
					cert_pbe = -1;
 | 
			
		||||
				cert_pbe=OBJ_txt2nid(*args);
 | 
			
		||||
				else
 | 
			
		||||
					cert_pbe=OBJ_txt2nid(*args);
 | 
			
		||||
				if(cert_pbe == NID_undef) {
 | 
			
		||||
					BIO_printf(bio_err,
 | 
			
		||||
						 "Unknown PBE algorithm %s\n", *args);
 | 
			
		||||
@@ -299,9 +309,16 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
	BIO_printf (bio_err, "-idea         encrypt private keys with idea\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	BIO_printf (bio_err, "-seed         encrypt private keys with seed\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
	BIO_printf (bio_err, "-aes128, -aes192, -aes256\n");
 | 
			
		||||
	BIO_printf (bio_err, "              encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	BIO_printf (bio_err, "-camellia128, -camellia192, -camellia256\n");
 | 
			
		||||
	BIO_printf (bio_err, "              encrypt PEM output with cbc camellia\n");
 | 
			
		||||
#endif
 | 
			
		||||
	BIO_printf (bio_err, "-nodes        don't encrypt private keys\n");
 | 
			
		||||
	BIO_printf (bio_err, "-noiter       don't use encryption iteration\n");
 | 
			
		||||
@@ -460,7 +477,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
					X509_keyid_set1(ucert, NULL, 0);
 | 
			
		||||
					X509_alias_set1(ucert, NULL, 0);
 | 
			
		||||
					/* Remove from list */
 | 
			
		||||
					sk_X509_delete(certs, i);
 | 
			
		||||
					(void)sk_X509_delete(certs, i);
 | 
			
		||||
					break;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
@@ -525,8 +542,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		    X509_free(sk_X509_value(chain2, 0));
 | 
			
		||||
		    sk_X509_free(chain2);
 | 
			
		||||
		} else {
 | 
			
		||||
			BIO_printf (bio_err, "Error %s getting chain.\n",
 | 
			
		||||
			if (vret >= 0)
 | 
			
		||||
				BIO_printf (bio_err, "Error %s getting chain.\n",
 | 
			
		||||
					X509_verify_cert_error_string(vret));
 | 
			
		||||
			else
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
			goto export_end;
 | 
			
		||||
		}			
 | 
			
		||||
    	}
 | 
			
		||||
@@ -538,6 +558,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		catmp = (unsigned char *)sk_value(canames, i);
 | 
			
		||||
		X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (csp_name && key)
 | 
			
		||||
		EVP_PKEY_add1_attr_by_NID(key, NID_ms_csp_name,
 | 
			
		||||
				MBSTRING_ASC, (unsigned char *)csp_name, -1);
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
@@ -796,7 +820,7 @@ int get_cert_chain (X509 *cert, X509_STORE *store, STACK_OF(X509) **chain)
 | 
			
		||||
{
 | 
			
		||||
	X509_STORE_CTX store_ctx;
 | 
			
		||||
	STACK_OF(X509) *chn;
 | 
			
		||||
	int i;
 | 
			
		||||
	int i = 0;
 | 
			
		||||
 | 
			
		||||
	/* FIXME: Should really check the return status of X509_STORE_CTX_init
 | 
			
		||||
	 * for an error, but how that fits into the return value of this
 | 
			
		||||
@@ -804,13 +828,17 @@ int get_cert_chain (X509 *cert, X509_STORE *store, STACK_OF(X509) **chain)
 | 
			
		||||
	X509_STORE_CTX_init(&store_ctx, store, cert, NULL);
 | 
			
		||||
	if (X509_verify_cert(&store_ctx) <= 0) {
 | 
			
		||||
		i = X509_STORE_CTX_get_error (&store_ctx);
 | 
			
		||||
		if (i == 0)
 | 
			
		||||
			/* avoid returning 0 if X509_verify_cert() did not
 | 
			
		||||
			 * set an appropriate error value in the context */
 | 
			
		||||
			i = -1;
 | 
			
		||||
		chn = NULL;
 | 
			
		||||
		goto err;
 | 
			
		||||
	}
 | 
			
		||||
	chn =  X509_STORE_CTX_get1_chain(&store_ctx);
 | 
			
		||||
	i = 0;
 | 
			
		||||
	*chain = chn;
 | 
			
		||||
	} else
 | 
			
		||||
		chn = X509_STORE_CTX_get1_chain(&store_ctx);
 | 
			
		||||
err:
 | 
			
		||||
	X509_STORE_CTX_cleanup(&store_ctx);
 | 
			
		||||
	*chain = chn;
 | 
			
		||||
	
 | 
			
		||||
	return i;
 | 
			
		||||
}	
 | 
			
		||||
@@ -820,12 +848,14 @@ int alg_print (BIO *x, X509_ALGOR *alg)
 | 
			
		||||
	PBEPARAM *pbe;
 | 
			
		||||
	const unsigned char *p;
 | 
			
		||||
	p = alg->parameter->value.sequence->data;
 | 
			
		||||
	pbe = d2i_PBEPARAM (NULL, &p, alg->parameter->value.sequence->length);
 | 
			
		||||
	pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length);
 | 
			
		||||
	if (!pbe)
 | 
			
		||||
		return 1;
 | 
			
		||||
	BIO_printf (bio_err, "%s, Iteration %ld\n", 
 | 
			
		||||
		OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
 | 
			
		||||
		ASN1_INTEGER_get(pbe->iter));
 | 
			
		||||
	PBEPARAM_free (pbe);
 | 
			
		||||
	return 0;
 | 
			
		||||
	return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Load all certificates from a given file */
 | 
			
		||||
 
 | 
			
		||||
@@ -115,7 +115,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
    BN_print(bio_out,bn);
 | 
			
		||||
    BIO_printf(bio_out," is %sprime\n",
 | 
			
		||||
	       BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
 | 
			
		||||
	       BN_is_prime_ex(bn,checks,NULL,NULL) ? "" : "not ");
 | 
			
		||||
 | 
			
		||||
    BN_free(bn);
 | 
			
		||||
    BIO_free_all(bio_out);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										37
									
								
								apps/progs.h
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								apps/progs.h
									
									
									
									
									
								
							@@ -28,6 +28,7 @@ extern int speed_main(int argc,char *argv[]);
 | 
			
		||||
extern int s_time_main(int argc,char *argv[]);
 | 
			
		||||
extern int version_main(int argc,char *argv[]);
 | 
			
		||||
extern int pkcs7_main(int argc,char *argv[]);
 | 
			
		||||
extern int cms_main(int argc,char *argv[]);
 | 
			
		||||
extern int crl2pkcs7_main(int argc,char *argv[]);
 | 
			
		||||
extern int sess_id_main(int argc,char *argv[]);
 | 
			
		||||
extern int ciphers_main(int argc,char *argv[]);
 | 
			
		||||
@@ -109,6 +110,9 @@ FUNCTION functions[] = {
 | 
			
		||||
#endif
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"version",version_main},
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"pkcs7",pkcs7_main},
 | 
			
		||||
#ifndef OPENSSL_NO_CMS
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"cms",cms_main},
 | 
			
		||||
#endif
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"crl2pkcs7",crl2pkcs7_main},
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"sess_id",sess_id_main},
 | 
			
		||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
			
		||||
@@ -165,6 +169,24 @@ FUNCTION functions[] = {
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"aes-256-ecb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"camellia-128-cbc",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"camellia-128-ecb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"camellia-192-cbc",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"camellia-192-ecb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"camellia-256-cbc",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"camellia-256-ecb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"base64",enc_main},
 | 
			
		||||
#ifndef OPENSSL_NO_DES
 | 
			
		||||
@@ -179,6 +201,9 @@ FUNCTION functions[] = {
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"idea",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"seed",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC4
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"rc4",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
@@ -245,6 +270,18 @@ FUNCTION functions[] = {
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"idea-ofb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"seed-cbc",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"seed-ecb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"seed-cfb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"seed-ofb",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC2
 | 
			
		||||
	{FUNC_TYPE_CIPHER,"rc2-cbc",enc_main},
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -43,6 +43,8 @@ foreach (@ARGV)
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
 | 
			
		||||
	elsif ( ($_ =~ /^pkcs12$/))
 | 
			
		||||
		{ print "#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)\n${str}#endif\n"; }
 | 
			
		||||
	elsif ( ($_ =~ /^cms$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_CMS\n${str}#endif\n"; }
 | 
			
		||||
	else
 | 
			
		||||
		{ print $str; }
 | 
			
		||||
	}
 | 
			
		||||
@@ -57,14 +59,18 @@ foreach (
 | 
			
		||||
	"aes-128-cbc", "aes-128-ecb",
 | 
			
		||||
	"aes-192-cbc", "aes-192-ecb",
 | 
			
		||||
	"aes-256-cbc", "aes-256-ecb",
 | 
			
		||||
	"camellia-128-cbc", "camellia-128-ecb",
 | 
			
		||||
	"camellia-192-cbc", "camellia-192-ecb",
 | 
			
		||||
	"camellia-256-cbc", "camellia-256-ecb",
 | 
			
		||||
	"base64",
 | 
			
		||||
	"des", "des3", "desx", "idea", "rc4", "rc4-40",
 | 
			
		||||
	"des", "des3", "desx", "idea", "seed", "rc4", "rc4-40",
 | 
			
		||||
	"rc2", "bf", "cast", "rc5",
 | 
			
		||||
	"des-ecb", "des-ede",    "des-ede3",
 | 
			
		||||
	"des-cbc", "des-ede-cbc","des-ede3-cbc",
 | 
			
		||||
	"des-cfb", "des-ede-cfb","des-ede3-cfb",
 | 
			
		||||
	"des-ofb", "des-ede-ofb","des-ede3-ofb",
 | 
			
		||||
	"idea-cbc","idea-ecb",   "idea-cfb", "idea-ofb",
 | 
			
		||||
	"idea-cbc","idea-ecb",    "idea-cfb", "idea-ofb",
 | 
			
		||||
	"seed-cbc","seed-ecb",    "seed-cfb", "seed-ofb",
 | 
			
		||||
	"rc2-cbc", "rc2-ecb", "rc2-cfb","rc2-ofb", "rc2-64-cbc", "rc2-40-cbc",
 | 
			
		||||
	"bf-cbc",  "bf-ecb",     "bf-cfb",   "bf-ofb",
 | 
			
		||||
	"cast5-cbc","cast5-ecb", "cast5-cfb","cast5-ofb",
 | 
			
		||||
@@ -75,7 +81,9 @@ foreach (
 | 
			
		||||
	$t=sprintf("\t{FUNC_TYPE_CIPHER,\"%s\",enc_main},\n",$_);
 | 
			
		||||
	if    ($_ =~ /des/)  { $t="#ifndef OPENSSL_NO_DES\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /aes/)  { $t="#ifndef OPENSSL_NO_AES\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /camellia/)  { $t="#ifndef OPENSSL_NO_CAMELLIA\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /idea/) { $t="#ifndef OPENSSL_NO_IDEA\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /seed/) { $t="#ifndef OPENSSL_NO_SEED\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /rc4/)  { $t="#ifndef OPENSSL_NO_RC4\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /rc2/)  { $t="#ifndef OPENSSL_NO_RC2\n${t}#endif\n"; }
 | 
			
		||||
	elsif ($_ =~ /bf/)   { $t="#ifndef OPENSSL_NO_BF\n${t}#endif\n"; }
 | 
			
		||||
 
 | 
			
		||||
@@ -213,7 +213,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		BIO_write(out, buf, chunk);
 | 
			
		||||
		num -= chunk;
 | 
			
		||||
		}
 | 
			
		||||
	BIO_flush(out);
 | 
			
		||||
	(void)BIO_flush(out);
 | 
			
		||||
 | 
			
		||||
	app_RAND_write_file(NULL, bio_err);
 | 
			
		||||
	ret = 0;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										32
									
								
								apps/req.c
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								apps/req.c
									
									
									
									
									
								
							@@ -79,7 +79,13 @@
 | 
			
		||||
#include <openssl/x509v3.h>
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include "../crypto/cryptlib.h"
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#include <openssl/rsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define SECTION		"req"
 | 
			
		||||
 | 
			
		||||
@@ -344,6 +350,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				{
 | 
			
		||||
				X509 *xtmp=NULL;
 | 
			
		||||
				EVP_PKEY *dtmp;
 | 
			
		||||
				EC_GROUP *group;
 | 
			
		||||
 | 
			
		||||
				pkey_type=TYPE_EC;
 | 
			
		||||
				p+=3;
 | 
			
		||||
@@ -354,10 +361,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
					}
 | 
			
		||||
				if ((ec_params = EC_KEY_new()) == NULL)
 | 
			
		||||
					goto end;
 | 
			
		||||
				if ((ec_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL)
 | 
			
		||||
				group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL);
 | 
			
		||||
				if (group == NULL)
 | 
			
		||||
					{
 | 
			
		||||
					if (ec_params)
 | 
			
		||||
						EC_KEY_free(ec_params);
 | 
			
		||||
					EC_KEY_free(ec_params);
 | 
			
		||||
					ERR_clear_error();
 | 
			
		||||
					(void)BIO_reset(in);
 | 
			
		||||
					if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
 | 
			
		||||
@@ -369,7 +376,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
					if ((dtmp=X509_get_pubkey(xtmp))==NULL)
 | 
			
		||||
						goto end;
 | 
			
		||||
					if (dtmp->type == EVP_PKEY_EC)
 | 
			
		||||
						ec_params = ECParameters_dup(dtmp->pkey.eckey);
 | 
			
		||||
						ec_params = EC_KEY_dup(dtmp->pkey.ec);
 | 
			
		||||
					EVP_PKEY_free(dtmp);
 | 
			
		||||
					X509_free(xtmp);
 | 
			
		||||
					if (ec_params == NULL)
 | 
			
		||||
@@ -378,12 +385,16 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
						goto end;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				else
 | 
			
		||||
					{
 | 
			
		||||
					if (EC_KEY_set_group(ec_params, group) == 0)
 | 
			
		||||
						goto end;
 | 
			
		||||
					EC_GROUP_free(group);
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				BIO_free(in);
 | 
			
		||||
				in=NULL;
 | 
			
		||||
				
 | 
			
		||||
				newkey = EC_GROUP_get_degree(ec_params->group);
 | 
			
		||||
 | 
			
		||||
				newkey = EC_GROUP_get_degree(EC_KEY_get0_group(ec_params));
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
#endif
 | 
			
		||||
@@ -708,8 +719,7 @@ bad:
 | 
			
		||||
			   message */
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || 
 | 
			
		||||
			EVP_PKEY_type(pkey->type) == EVP_PKEY_EC)
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
 | 
			
		||||
			if (randfile == NULL)
 | 
			
		||||
@@ -720,7 +730,9 @@ bad:
 | 
			
		||||
 | 
			
		||||
	if (newreq && (pkey == NULL))
 | 
			
		||||
		{
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
		BN_GENCB cb;
 | 
			
		||||
#endif
 | 
			
		||||
		char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
 | 
			
		||||
		if (randfile == NULL)
 | 
			
		||||
			ERR_clear_error();
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								apps/rsa.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/rsa.c
									
									
									
									
									
								
							@@ -56,6 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
@@ -80,9 +81,13 @@
 | 
			
		||||
 * -des		- encrypt output if PEM format with DES in cbc mode
 | 
			
		||||
 * -des3	- encrypt output if PEM format
 | 
			
		||||
 * -idea	- encrypt output if PEM format
 | 
			
		||||
 * -seed	- encrypt output if PEM format
 | 
			
		||||
 * -aes128	- encrypt output if PEM format
 | 
			
		||||
 * -aes192	- encrypt output if PEM format
 | 
			
		||||
 * -aes256	- encrypt output if PEM format
 | 
			
		||||
 * -camellia128 - encrypt output if PEM format
 | 
			
		||||
 * -camellia192 - encrypt output if PEM format
 | 
			
		||||
 * -camellia256 - encrypt output if PEM format
 | 
			
		||||
 * -text	- print a text version
 | 
			
		||||
 * -modulus	- print the RSA key modulus
 | 
			
		||||
 * -check	- verify key consistency
 | 
			
		||||
@@ -207,9 +212,16 @@ bad:
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
		BIO_printf(bio_err," -idea           encrypt PEM output with cbc idea\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		BIO_printf(bio_err," -seed           encrypt PEM output with cbc seed\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		BIO_printf(bio_err," -camellia128, -camellia192, -camellia256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc camellia\n");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err," -text           print the key in text\n");
 | 
			
		||||
		BIO_printf(bio_err," -noout          don't print key out\n");
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <openssl/opensslconf.h>
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
@@ -118,24 +119,36 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	while(argc >= 1)
 | 
			
		||||
	{
 | 
			
		||||
		if (!strcmp(*argv,"-in")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
                        infile= *(++argv);
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			else
 | 
			
		||||
				infile= *(++argv);
 | 
			
		||||
		} else if (!strcmp(*argv,"-out")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			else
 | 
			
		||||
				outfile= *(++argv);
 | 
			
		||||
		} else if(!strcmp(*argv, "-inkey")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			keyfile = *(++argv);
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			else
 | 
			
		||||
				keyfile = *(++argv);
 | 
			
		||||
		} else if (!strcmp(*argv,"-passin")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			passargin= *(++argv);
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			else
 | 
			
		||||
				passargin= *(++argv);
 | 
			
		||||
		} else if (strcmp(*argv,"-keyform") == 0) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			keyform=str2fmt(*(++argv));
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			else
 | 
			
		||||
				keyform=str2fmt(*(++argv));
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		} else if(!strcmp(*argv, "-engine")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			engine = *(++argv);
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			else
 | 
			
		||||
				engine = *(++argv);
 | 
			
		||||
#endif
 | 
			
		||||
		} else if(!strcmp(*argv, "-pubin")) {
 | 
			
		||||
			key_type = KEY_PUBKEY;
 | 
			
		||||
@@ -148,6 +161,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		else if(!strcmp(*argv, "-oaep")) pad = RSA_PKCS1_OAEP_PADDING;
 | 
			
		||||
		else if(!strcmp(*argv, "-ssl")) pad = RSA_SSLV23_PADDING;
 | 
			
		||||
		else if(!strcmp(*argv, "-pkcs")) pad = RSA_PKCS1_PADDING;
 | 
			
		||||
		else if(!strcmp(*argv, "-x931")) pad = RSA_X931_PADDING;
 | 
			
		||||
		else if(!strcmp(*argv, "-sign")) {
 | 
			
		||||
			rsa_mode = RSA_SIGN;
 | 
			
		||||
			need_priv = 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -167,4 +167,7 @@ long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
 | 
			
		||||
#ifdef HEADER_SSL_H
 | 
			
		||||
void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret);
 | 
			
		||||
void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
 | 
			
		||||
void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
 | 
			
		||||
					unsigned char *data, int len,
 | 
			
		||||
					void *arg);
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										61
									
								
								apps/s_cb.c
									
									
									
									
									
								
							
							
						
						
									
										61
									
								
								apps/s_cb.c
									
									
									
									
									
								
							@@ -573,5 +573,64 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
 | 
			
		||||
			BIO_printf(bio, " ...");
 | 
			
		||||
		BIO_printf(bio, "\n");
 | 
			
		||||
		}
 | 
			
		||||
	BIO_flush(bio);
 | 
			
		||||
	(void)BIO_flush(bio);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
 | 
			
		||||
					unsigned char *data, int len,
 | 
			
		||||
					void *arg)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *bio = arg;
 | 
			
		||||
	char *extname;
 | 
			
		||||
 | 
			
		||||
	switch(type)
 | 
			
		||||
		{
 | 
			
		||||
		case TLSEXT_TYPE_server_name:
 | 
			
		||||
		extname = "server name";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_max_fragment_length:
 | 
			
		||||
		extname = "max fragment length";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_client_certificate_url:
 | 
			
		||||
		extname = "client certificate URL";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_trusted_ca_keys:
 | 
			
		||||
		extname = "trusted CA keys";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_truncated_hmac:
 | 
			
		||||
		extname = "truncated HMAC";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_status_request:
 | 
			
		||||
		extname = "status request";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_elliptic_curves:
 | 
			
		||||
		extname = "elliptic curves";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_ec_point_formats:
 | 
			
		||||
		extname = "EC point formats";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case TLSEXT_TYPE_session_ticket:
 | 
			
		||||
		extname = "server ticket";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		default:
 | 
			
		||||
		extname = "unknown";
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
	
 | 
			
		||||
	BIO_printf(bio, "TLS %s extension \"%s\" (id=%d), len=%d\n",
 | 
			
		||||
			client_server ? "server": "client",
 | 
			
		||||
			extname, type, len);
 | 
			
		||||
	BIO_dump(bio, (char *)data, len);
 | 
			
		||||
	(void)BIO_flush(bio);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										299
									
								
								apps/s_client.c
									
									
									
									
									
								
							
							
						
						
									
										299
									
								
								apps/s_client.c
									
									
									
									
									
								
							@@ -134,6 +134,7 @@ typedef unsigned int u_int;
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/rand.h>
 | 
			
		||||
#include <openssl/ocsp.h>
 | 
			
		||||
#include "s_apps.h"
 | 
			
		||||
#include "timeouts.h"
 | 
			
		||||
 | 
			
		||||
@@ -171,11 +172,18 @@ static int c_nbio=0;
 | 
			
		||||
#endif
 | 
			
		||||
static int c_Pause=0;
 | 
			
		||||
static int c_debug=0;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
static int c_tlsextdebug=0;
 | 
			
		||||
static int c_status_req=0;
 | 
			
		||||
#endif
 | 
			
		||||
static int c_msg=0;
 | 
			
		||||
static int c_showcerts=0;
 | 
			
		||||
 | 
			
		||||
static void sc_usage(void);
 | 
			
		||||
static void print_stuff(BIO *berr,SSL *con,int full);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
static int ocsp_resp_cb(SSL *s, void *arg);
 | 
			
		||||
#endif
 | 
			
		||||
static BIO *bio_c_out=NULL;
 | 
			
		||||
static int c_quiet=0;
 | 
			
		||||
static int c_ign_eof=0;
 | 
			
		||||
@@ -188,7 +196,7 @@ static void sc_usage(void)
 | 
			
		||||
	BIO_printf(bio_err," -port port     - use -connect instead\n");
 | 
			
		||||
	BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR);
 | 
			
		||||
 | 
			
		||||
	BIO_printf(bio_err," -verify arg   - turn on peer certificate verification\n");
 | 
			
		||||
	BIO_printf(bio_err," -verify depth - turn on peer certificate verification\n");
 | 
			
		||||
	BIO_printf(bio_err," -cert arg     - certificate file to use, PEM format assumed\n");
 | 
			
		||||
	BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n");
 | 
			
		||||
	BIO_printf(bio_err," -key arg      - Private key file to use, in cert file if\n");
 | 
			
		||||
@@ -226,14 +234,51 @@ static void sc_usage(void)
 | 
			
		||||
	BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 for those protocols that support it, where\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 'prot' defines which one to assume.  Currently,\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 only \"smtp\" and \"pop3\" are supported.\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 only \"smtp\", \"pop3\", \"imap\", and \"ftp\" are supported.\n");
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 | 
			
		||||
#endif
 | 
			
		||||
	BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
			
		||||
 | 
			
		||||
	BIO_printf(bio_err," -sess_out arg - file to write SSL session to\n");
 | 
			
		||||
	BIO_printf(bio_err," -sess_in arg  - file to read SSL session from\n");
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	BIO_printf(bio_err," -servername host  - Set TLS extension servername in ClientHello\n");
 | 
			
		||||
	BIO_printf(bio_err," -tlsextdebug      - hex dump of all TLS extensions received\n");
 | 
			
		||||
	BIO_printf(bio_err," -status           - request certificate status from server\n");
 | 
			
		||||
	BIO_printf(bio_err," -no_ticket        - disable use of RFC4507bis session tickets\n");
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
 | 
			
		||||
/* This is a context that we pass to callbacks */
 | 
			
		||||
typedef struct tlsextctx_st {
 | 
			
		||||
   BIO * biodebug;
 | 
			
		||||
   int ack;
 | 
			
		||||
} tlsextctx;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
 | 
			
		||||
	{
 | 
			
		||||
	tlsextctx * p = (tlsextctx *) arg;
 | 
			
		||||
	const char * hn= SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
 | 
			
		||||
	if (SSL_get_servername_type(s) != -1) 
 | 
			
		||||
 	        p->ack = !SSL_session_reused(s) && hn != NULL;
 | 
			
		||||
	else 
 | 
			
		||||
		BIO_printf(bio_err,"Can't use SSL_get_servername\n");
 | 
			
		||||
	
 | 
			
		||||
	return SSL_TLSEXT_ERR_OK;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
enum
 | 
			
		||||
{
 | 
			
		||||
	PROTO_OFF	= 0,
 | 
			
		||||
	PROTO_SMTP,
 | 
			
		||||
	PROTO_POP3,
 | 
			
		||||
	PROTO_IMAP,
 | 
			
		||||
	PROTO_FTP
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
@@ -260,12 +305,16 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
 | 
			
		||||
	SSL_CTX *ctx=NULL;
 | 
			
		||||
	int ret=1,in_init=1,i,nbio_test=0;
 | 
			
		||||
	int starttls_proto = 0;
 | 
			
		||||
	int starttls_proto = PROTO_OFF;
 | 
			
		||||
	int prexit = 0, vflags = 0;
 | 
			
		||||
	SSL_METHOD *meth=NULL;
 | 
			
		||||
#ifdef sock_type
 | 
			
		||||
#undef sock_type
 | 
			
		||||
#endif
 | 
			
		||||
	int sock_type=SOCK_STREAM;
 | 
			
		||||
	BIO *sbio;
 | 
			
		||||
	char *inrand=NULL;
 | 
			
		||||
	int mbuf_len=0;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine_id=NULL;
 | 
			
		||||
	ENGINE *e=NULL;
 | 
			
		||||
@@ -274,6 +323,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	struct timeval tv;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	char *servername = NULL; 
 | 
			
		||||
        tlsextctx tlsextcbp = 
 | 
			
		||||
        {NULL,0};
 | 
			
		||||
#endif
 | 
			
		||||
	char *sess_in = NULL;
 | 
			
		||||
	char *sess_out = NULL;
 | 
			
		||||
	struct sockaddr peer;
 | 
			
		||||
	int peerlen = sizeof(peer);
 | 
			
		||||
	int enable_timeouts = 0 ;
 | 
			
		||||
@@ -348,6 +404,16 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			cert_file= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if	(strcmp(*argv,"-sess_out") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			sess_out = *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if	(strcmp(*argv,"-sess_in") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			sess_in = *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if	(strcmp(*argv,"-certform") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
@@ -372,6 +438,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			c_Pause=1;
 | 
			
		||||
		else if	(strcmp(*argv,"-debug") == 0)
 | 
			
		||||
			c_debug=1;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		else if	(strcmp(*argv,"-tlsextdebug") == 0)
 | 
			
		||||
			c_tlsextdebug=1;
 | 
			
		||||
		else if	(strcmp(*argv,"-status") == 0)
 | 
			
		||||
			c_status_req=1;
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef WATT32
 | 
			
		||||
		else if (strcmp(*argv,"-wdebug") == 0)
 | 
			
		||||
			dbug_init();
 | 
			
		||||
@@ -447,6 +519,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			off|=SSL_OP_NO_SSLv3;
 | 
			
		||||
		else if (strcmp(*argv,"-no_ssl2") == 0)
 | 
			
		||||
			off|=SSL_OP_NO_SSLv2;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		else if	(strcmp(*argv,"-no_ticket") == 0)
 | 
			
		||||
			{ off|=SSL_OP_NO_TICKET; }
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-serverpref") == 0)
 | 
			
		||||
			off|=SSL_OP_CIPHER_SERVER_PREFERENCE;
 | 
			
		||||
		else if	(strcmp(*argv,"-cipher") == 0)
 | 
			
		||||
@@ -463,9 +539,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			++argv;
 | 
			
		||||
			if (strcmp(*argv,"smtp") == 0)
 | 
			
		||||
				starttls_proto = 1;
 | 
			
		||||
				starttls_proto = PROTO_SMTP;
 | 
			
		||||
			else if (strcmp(*argv,"pop3") == 0)
 | 
			
		||||
				starttls_proto = 2;
 | 
			
		||||
				starttls_proto = PROTO_POP3;
 | 
			
		||||
			else if (strcmp(*argv,"imap") == 0)
 | 
			
		||||
				starttls_proto = PROTO_IMAP;
 | 
			
		||||
			else if (strcmp(*argv,"ftp") == 0)
 | 
			
		||||
				starttls_proto = PROTO_FTP;
 | 
			
		||||
			else
 | 
			
		||||
				goto bad;
 | 
			
		||||
			}
 | 
			
		||||
@@ -481,6 +561,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			inrand= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		else if (strcmp(*argv,"-servername") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			servername= *(++argv);
 | 
			
		||||
			/* meth=TLSv1_client_method(); */
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
			
		||||
@@ -604,8 +692,51 @@ bad:
 | 
			
		||||
 | 
			
		||||
	store = SSL_CTX_get_cert_store(ctx);
 | 
			
		||||
	X509_STORE_set_flags(store, vflags);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (servername != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		tlsextcbp.biodebug = bio_err;
 | 
			
		||||
		SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_cb);
 | 
			
		||||
		SSL_CTX_set_tlsext_servername_arg(ctx, &tlsextcbp);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	con=SSL_new(ctx);
 | 
			
		||||
	if (sess_in)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_SESSION *sess;
 | 
			
		||||
		BIO *stmp = BIO_new_file(sess_in, "r");
 | 
			
		||||
		if (!stmp)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Can't open session file %s\n",
 | 
			
		||||
						sess_in);
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		sess = PEM_read_bio_SSL_SESSION(stmp, NULL, 0, NULL);
 | 
			
		||||
		BIO_free(stmp);
 | 
			
		||||
		if (!sess)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Can't open session file %s\n",
 | 
			
		||||
						sess_in);
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		SSL_set_session(con, sess);
 | 
			
		||||
		SSL_SESSION_free(sess);
 | 
			
		||||
		}
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (servername != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		if (!SSL_set_tlsext_host_name(con,servername))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"Unable to set TLS servername extension.\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_KRB5
 | 
			
		||||
	if (con  &&  (con->kssl_ctx = kssl_ctx_new()) != NULL)
 | 
			
		||||
                {
 | 
			
		||||
@@ -651,7 +782,7 @@ re_start:
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		BIO_ctrl_set_connected(sbio, 1, &peer);
 | 
			
		||||
		(void)BIO_ctrl_set_connected(sbio, 1, &peer);
 | 
			
		||||
 | 
			
		||||
		if ( enable_timeouts)
 | 
			
		||||
			{
 | 
			
		||||
@@ -690,13 +821,37 @@ re_start:
 | 
			
		||||
		{
 | 
			
		||||
		con->debug=1;
 | 
			
		||||
		BIO_set_callback(sbio,bio_dump_callback);
 | 
			
		||||
		BIO_set_callback_arg(sbio,bio_c_out);
 | 
			
		||||
		BIO_set_callback_arg(sbio,(char *)bio_c_out);
 | 
			
		||||
		}
 | 
			
		||||
	if (c_msg)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_set_msg_callback(con, msg_cb);
 | 
			
		||||
		SSL_set_msg_callback_arg(con, bio_c_out);
 | 
			
		||||
		}
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (c_tlsextdebug)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_set_tlsext_debug_callback(con, tlsext_cb);
 | 
			
		||||
		SSL_set_tlsext_debug_arg(con, bio_c_out);
 | 
			
		||||
		}
 | 
			
		||||
	if (c_status_req)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_set_tlsext_status_type(con, TLSEXT_STATUSTYPE_ocsp);
 | 
			
		||||
		SSL_CTX_set_tlsext_status_cb(ctx, ocsp_resp_cb);
 | 
			
		||||
		SSL_CTX_set_tlsext_status_arg(ctx, bio_c_out);
 | 
			
		||||
#if 0
 | 
			
		||||
{
 | 
			
		||||
STACK_OF(OCSP_RESPID) *ids = sk_OCSP_RESPID_new_null();
 | 
			
		||||
OCSP_RESPID *id = OCSP_RESPID_new();
 | 
			
		||||
id->value.byKey = ASN1_OCTET_STRING_new();
 | 
			
		||||
id->type = V_OCSP_RESPID_KEY;
 | 
			
		||||
ASN1_STRING_set(id->value.byKey, "Hello World", -1);
 | 
			
		||||
sk_OCSP_RESPID_push(ids, id);
 | 
			
		||||
SSL_set_tlsext_status_ids(con, ids);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	SSL_set_bio(con,sbio,sbio);
 | 
			
		||||
	SSL_set_connect_state(con);
 | 
			
		||||
@@ -716,18 +871,93 @@ re_start:
 | 
			
		||||
	sbuf_off=0;
 | 
			
		||||
 | 
			
		||||
	/* This is an ugly hack that does a lot of assumptions */
 | 
			
		||||
	if (starttls_proto == 1)
 | 
			
		||||
	/* We do have to handle multi-line responses which may come
 | 
			
		||||
 	   in a single packet or not. We therefore have to use
 | 
			
		||||
	   BIO_gets() which does need a buffering BIO. So during
 | 
			
		||||
	   the initial chitchat we do push a buffering BIO into the
 | 
			
		||||
	   chain that is removed again later on to not disturb the
 | 
			
		||||
	   rest of the s_client operation. */
 | 
			
		||||
	if (starttls_proto == PROTO_SMTP)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_read(sbio,mbuf,BUFSIZZ);
 | 
			
		||||
		int foundit=0;
 | 
			
		||||
		BIO *fbio = BIO_new(BIO_f_buffer());
 | 
			
		||||
		BIO_push(fbio, sbio);
 | 
			
		||||
		/* wait for multi-line response to end from SMTP */
 | 
			
		||||
		do
 | 
			
		||||
			{
 | 
			
		||||
			mbuf_len = BIO_gets(fbio,mbuf,BUFSIZZ);
 | 
			
		||||
			}
 | 
			
		||||
		while (mbuf_len>3 && mbuf[3]=='-');
 | 
			
		||||
		/* STARTTLS command requires EHLO... */
 | 
			
		||||
		BIO_printf(fbio,"EHLO openssl.client.net\r\n");
 | 
			
		||||
		(void)BIO_flush(fbio);
 | 
			
		||||
		/* wait for multi-line response to end EHLO SMTP response */
 | 
			
		||||
		do
 | 
			
		||||
			{
 | 
			
		||||
			mbuf_len = BIO_gets(fbio,mbuf,BUFSIZZ);
 | 
			
		||||
			if (strstr(mbuf,"STARTTLS"))
 | 
			
		||||
				foundit=1;
 | 
			
		||||
			}
 | 
			
		||||
		while (mbuf_len>3 && mbuf[3]=='-');
 | 
			
		||||
		(void)BIO_flush(fbio);
 | 
			
		||||
		BIO_pop(fbio);
 | 
			
		||||
		BIO_free(fbio);
 | 
			
		||||
		if (!foundit)
 | 
			
		||||
			BIO_printf(bio_err,
 | 
			
		||||
				   "didn't found starttls in server response,"
 | 
			
		||||
				   " try anyway...\n");
 | 
			
		||||
		BIO_printf(sbio,"STARTTLS\r\n");
 | 
			
		||||
		BIO_read(sbio,sbuf,BUFSIZZ);
 | 
			
		||||
		}
 | 
			
		||||
	if (starttls_proto == 2)
 | 
			
		||||
	else if (starttls_proto == PROTO_POP3)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_read(sbio,mbuf,BUFSIZZ);
 | 
			
		||||
		BIO_printf(sbio,"STLS\r\n");
 | 
			
		||||
		BIO_read(sbio,sbuf,BUFSIZZ);
 | 
			
		||||
		}
 | 
			
		||||
	else if (starttls_proto == PROTO_IMAP)
 | 
			
		||||
		{
 | 
			
		||||
		int foundit=0;
 | 
			
		||||
		BIO *fbio = BIO_new(BIO_f_buffer());
 | 
			
		||||
		BIO_push(fbio, sbio);
 | 
			
		||||
		BIO_gets(fbio,mbuf,BUFSIZZ);
 | 
			
		||||
		/* STARTTLS command requires CAPABILITY... */
 | 
			
		||||
		BIO_printf(fbio,". CAPABILITY\r\n");
 | 
			
		||||
		(void)BIO_flush(fbio);
 | 
			
		||||
		/* wait for multi-line CAPABILITY response */
 | 
			
		||||
		do
 | 
			
		||||
			{
 | 
			
		||||
			mbuf_len = BIO_gets(fbio,mbuf,BUFSIZZ);
 | 
			
		||||
			if (strstr(mbuf,"STARTTLS"))
 | 
			
		||||
				foundit=1;
 | 
			
		||||
			}
 | 
			
		||||
		while (mbuf_len>3 && mbuf[0]!='.');
 | 
			
		||||
		(void)BIO_flush(fbio);
 | 
			
		||||
		BIO_pop(fbio);
 | 
			
		||||
		BIO_free(fbio);
 | 
			
		||||
		if (!foundit)
 | 
			
		||||
			BIO_printf(bio_err,
 | 
			
		||||
				   "didn't found STARTTLS in server response,"
 | 
			
		||||
				   " try anyway...\n");
 | 
			
		||||
		BIO_printf(sbio,". STARTTLS\r\n");
 | 
			
		||||
		BIO_read(sbio,sbuf,BUFSIZZ);
 | 
			
		||||
		}
 | 
			
		||||
	else if (starttls_proto == PROTO_FTP)
 | 
			
		||||
		{
 | 
			
		||||
		BIO *fbio = BIO_new(BIO_f_buffer());
 | 
			
		||||
		BIO_push(fbio, sbio);
 | 
			
		||||
		/* wait for multi-line response to end from FTP */
 | 
			
		||||
		do
 | 
			
		||||
			{
 | 
			
		||||
			mbuf_len = BIO_gets(fbio,mbuf,BUFSIZZ);
 | 
			
		||||
			}
 | 
			
		||||
		while (mbuf_len>3 && mbuf[3]=='-');
 | 
			
		||||
		(void)BIO_flush(fbio);
 | 
			
		||||
		BIO_pop(fbio);
 | 
			
		||||
		BIO_free(fbio);
 | 
			
		||||
		BIO_printf(sbio,"AUTH TLS\r\n");
 | 
			
		||||
		BIO_read(sbio,sbuf,BUFSIZZ);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
@@ -745,6 +975,17 @@ re_start:
 | 
			
		||||
			if (in_init)
 | 
			
		||||
				{
 | 
			
		||||
				in_init=0;
 | 
			
		||||
				if (sess_out)
 | 
			
		||||
					{
 | 
			
		||||
					BIO *stmp = BIO_new_file(sess_out, "w");
 | 
			
		||||
					if (stmp)
 | 
			
		||||
						{
 | 
			
		||||
						PEM_write_bio_SSL_SESSION(stmp, SSL_get_session(con));
 | 
			
		||||
						BIO_free(stmp);
 | 
			
		||||
						}
 | 
			
		||||
					else 
 | 
			
		||||
						BIO_printf(bio_err, "Error writing session file %s\n", sess_out);
 | 
			
		||||
					}
 | 
			
		||||
				print_stuff(bio_c_out,con,full_log);
 | 
			
		||||
				if (full_log > 0) full_log--;
 | 
			
		||||
 | 
			
		||||
@@ -752,7 +993,7 @@ re_start:
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,"%s",mbuf);
 | 
			
		||||
					/* We don't need to know any more */
 | 
			
		||||
					starttls_proto = 0;
 | 
			
		||||
					starttls_proto = PROTO_OFF;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				if (reconnect)
 | 
			
		||||
@@ -1093,7 +1334,9 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
	SSL_CIPHER *c;
 | 
			
		||||
	X509_NAME *xn;
 | 
			
		||||
	int j,i;
 | 
			
		||||
#ifndef OPENSSL_NO_COMP
 | 
			
		||||
	const COMP_METHOD *comp, *expansion;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (full)
 | 
			
		||||
		{
 | 
			
		||||
@@ -1196,17 +1439,47 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
							 EVP_PKEY_bits(pktmp));
 | 
			
		||||
		EVP_PKEY_free(pktmp);
 | 
			
		||||
	}
 | 
			
		||||
#ifndef OPENSSL_NO_COMP
 | 
			
		||||
	comp=SSL_get_current_compression(s);
 | 
			
		||||
	expansion=SSL_get_current_expansion(s);
 | 
			
		||||
	BIO_printf(bio,"Compression: %s\n",
 | 
			
		||||
		comp ? SSL_COMP_get_name(comp) : "NONE");
 | 
			
		||||
	BIO_printf(bio,"Expansion: %s\n",
 | 
			
		||||
		expansion ? SSL_COMP_get_name(expansion) : "NONE");
 | 
			
		||||
#endif
 | 
			
		||||
	SSL_SESSION_print(bio,SSL_get_session(s));
 | 
			
		||||
	BIO_printf(bio,"---\n");
 | 
			
		||||
	if (peer != NULL)
 | 
			
		||||
		X509_free(peer);
 | 
			
		||||
	/* flush, or debugging output gets mixed with http response */
 | 
			
		||||
	BIO_flush(bio);
 | 
			
		||||
	(void)BIO_flush(bio);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
 | 
			
		||||
static int ocsp_resp_cb(SSL *s, void *arg)
 | 
			
		||||
	{
 | 
			
		||||
	const unsigned char *p;
 | 
			
		||||
	int len;
 | 
			
		||||
	OCSP_RESPONSE *rsp;
 | 
			
		||||
	len = SSL_get_tlsext_status_ocsp_resp(s, &p);
 | 
			
		||||
	BIO_puts(arg, "OCSP response: ");
 | 
			
		||||
	if (!p)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(arg, "no response sent\n");
 | 
			
		||||
		return 1;
 | 
			
		||||
		}
 | 
			
		||||
	rsp = d2i_OCSP_RESPONSE(NULL, &p, len);
 | 
			
		||||
	if (!rsp)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(arg, "response parse error\n");
 | 
			
		||||
		BIO_dump_indent(arg, (char *)p, len, 4);
 | 
			
		||||
		return 0;
 | 
			
		||||
		}
 | 
			
		||||
	BIO_puts(arg, "\n======================================\n");
 | 
			
		||||
	OCSP_RESPONSE_print(arg, rsp, 0);
 | 
			
		||||
	BIO_puts(arg, "======================================\n");
 | 
			
		||||
	OCSP_RESPONSE_free(rsp);
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
#endif  /* ndef OPENSSL_NO_TLSEXT */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										540
									
								
								apps/s_server.c
									
									
									
									
									
								
							
							
						
						
									
										540
									
								
								apps/s_server.c
									
									
									
									
									
								
							@@ -153,6 +153,13 @@ typedef unsigned int u_int;
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/ssl.h>
 | 
			
		||||
#include <openssl/rand.h>
 | 
			
		||||
#include <openssl/ocsp.h>
 | 
			
		||||
#ifndef OPENSSL_NO_DH
 | 
			
		||||
#include <openssl/dh.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#include <openssl/rsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include "s_apps.h"
 | 
			
		||||
#include "timeouts.h"
 | 
			
		||||
 | 
			
		||||
@@ -232,6 +239,9 @@ static int bufsize=BUFSIZZ;
 | 
			
		||||
static int accept_socket= -1;
 | 
			
		||||
 | 
			
		||||
#define TEST_CERT	"server.pem"
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
#define TEST_CERT2	"server2.pem"
 | 
			
		||||
#endif
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG		s_server_main
 | 
			
		||||
 | 
			
		||||
@@ -241,6 +251,9 @@ static char *cipher=NULL;
 | 
			
		||||
static int s_server_verify=SSL_VERIFY_NONE;
 | 
			
		||||
static int s_server_session_id_context = 1; /* anything will do */
 | 
			
		||||
static const char *s_cert_file=TEST_CERT,*s_key_file=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
static const char *s_cert_file2=TEST_CERT2,*s_key_file2=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
static char *s_dcert_file=NULL,*s_dkey_file=NULL;
 | 
			
		||||
#ifdef FIONBIO
 | 
			
		||||
static int s_nbio=0;
 | 
			
		||||
@@ -248,10 +261,18 @@ static int s_nbio=0;
 | 
			
		||||
static int s_nbio_test=0;
 | 
			
		||||
int s_crlf=0;
 | 
			
		||||
static SSL_CTX *ctx=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
static SSL_CTX *ctx2=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
static int www=0;
 | 
			
		||||
 | 
			
		||||
static BIO *bio_s_out=NULL;
 | 
			
		||||
static int s_debug=0;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
static int s_tlsextdebug=0;
 | 
			
		||||
static int s_tlsextstatus=0;
 | 
			
		||||
static int cert_status_cb(SSL *s, void *arg);
 | 
			
		||||
#endif
 | 
			
		||||
static int s_msg=0;
 | 
			
		||||
static int s_quiet=0;
 | 
			
		||||
 | 
			
		||||
@@ -262,6 +283,9 @@ static char *engine_id=NULL;
 | 
			
		||||
static const char *session_id_prefix=NULL;
 | 
			
		||||
 | 
			
		||||
static int enable_timeouts = 0;
 | 
			
		||||
#ifdef mtu
 | 
			
		||||
#undef mtu
 | 
			
		||||
#endif
 | 
			
		||||
static long mtu;
 | 
			
		||||
static int cert_chain = 0;
 | 
			
		||||
 | 
			
		||||
@@ -276,6 +300,11 @@ static void s_server_init(void)
 | 
			
		||||
	s_dkey_file=NULL;
 | 
			
		||||
	s_cert_file=TEST_CERT;
 | 
			
		||||
	s_key_file=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	s_cert_file2=TEST_CERT2;
 | 
			
		||||
	s_key_file2=NULL;
 | 
			
		||||
	ctx2=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef FIONBIO
 | 
			
		||||
	s_nbio=0;
 | 
			
		||||
#endif
 | 
			
		||||
@@ -304,6 +333,11 @@ static void sv_usage(void)
 | 
			
		||||
	BIO_printf(bio_err," -Verify arg   - turn on peer certificate verification, must have a cert.\n");
 | 
			
		||||
	BIO_printf(bio_err," -cert arg     - certificate file to use\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 (default is %s)\n",TEST_CERT);
 | 
			
		||||
	BIO_printf(bio_err," -crl_check    - check the peer certificate has not been revoked by its CA.\n" \
 | 
			
		||||
	                   "                 The CRL(s) are appended to the certificate file\n");
 | 
			
		||||
	BIO_printf(bio_err," -crl_check_all - check the peer certificate has not been revoked by its CA\n" \
 | 
			
		||||
	                   "                 or any other CRL in the CA chain. CRL(s) are appened to the\n" \
 | 
			
		||||
	                   "                 the certificate file.\n");
 | 
			
		||||
	BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n");
 | 
			
		||||
	BIO_printf(bio_err," -key arg      - Private Key file to use, in cert file if\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 not specified (default is %s)\n",TEST_CERT);
 | 
			
		||||
@@ -362,6 +396,16 @@ static void sv_usage(void)
 | 
			
		||||
#endif
 | 
			
		||||
	BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
 | 
			
		||||
	BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	BIO_printf(bio_err," -servername host - servername for HostName TLS extension\n");
 | 
			
		||||
	BIO_printf(bio_err," -servername_fatal - on mismatch send fatal alert (default warning alert)\n");
 | 
			
		||||
	BIO_printf(bio_err," -cert2 arg    - certificate file to use for servername\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 (default is %s)\n",TEST_CERT2);
 | 
			
		||||
	BIO_printf(bio_err," -key2 arg     - Private Key file to use for servername, in cert file if\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 not specified (default is %s)\n",TEST_CERT2);
 | 
			
		||||
	BIO_printf(bio_err," -tlsextdebug  - hex dump of all TLS extensions received\n");
 | 
			
		||||
	BIO_printf(bio_err," -no_ticket    - disable use of RFC4507bis session tickets\n");
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int local_argc=0;
 | 
			
		||||
@@ -517,6 +561,185 @@ static int ebcdic_puts(BIO *bp, const char *str)
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
 | 
			
		||||
/* This is a context that we pass to callbacks */
 | 
			
		||||
typedef struct tlsextctx_st {
 | 
			
		||||
   char * servername;
 | 
			
		||||
   BIO * biodebug;
 | 
			
		||||
   int extension_error;
 | 
			
		||||
} tlsextctx;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
 | 
			
		||||
	{
 | 
			
		||||
	tlsextctx * p = (tlsextctx *) arg;
 | 
			
		||||
	const char * servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
 | 
			
		||||
        if (servername && p->biodebug) 
 | 
			
		||||
		BIO_printf(p->biodebug,"Hostname in TLS extension: \"%s\"\n",servername);
 | 
			
		||||
        
 | 
			
		||||
	if (!p->servername)
 | 
			
		||||
		return SSL_TLSEXT_ERR_NOACK;
 | 
			
		||||
	
 | 
			
		||||
	if (servername)
 | 
			
		||||
		{
 | 
			
		||||
    		if (strcmp(servername,p->servername)) 
 | 
			
		||||
			return p->extension_error;
 | 
			
		||||
		if (ctx2)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(p->biodebug,"Swiching server context.\n");
 | 
			
		||||
			SSL_set_SSL_CTX(s,ctx2);
 | 
			
		||||
			}     
 | 
			
		||||
		}
 | 
			
		||||
	return SSL_TLSEXT_ERR_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Structure passed to cert status callback */
 | 
			
		||||
 | 
			
		||||
typedef struct tlsextstatusctx_st {
 | 
			
		||||
   /* Default responder to use */
 | 
			
		||||
   char *host, *path, *port;
 | 
			
		||||
   int use_ssl;
 | 
			
		||||
   int timeout;
 | 
			
		||||
   BIO *err;
 | 
			
		||||
   int verbose;
 | 
			
		||||
} tlsextstatusctx;
 | 
			
		||||
 | 
			
		||||
static tlsextstatusctx tlscstatp = {NULL, NULL, NULL, 0, -1, NULL, 0};
 | 
			
		||||
 | 
			
		||||
/* Certificate Status callback. This is called when a client includes a
 | 
			
		||||
 * certificate status request extension.
 | 
			
		||||
 *
 | 
			
		||||
 * This is a simplified version. It examines certificates each time and
 | 
			
		||||
 * makes one OCSP responder query for each request.
 | 
			
		||||
 *
 | 
			
		||||
 * A full version would store details such as the OCSP certificate IDs and
 | 
			
		||||
 * minimise the number of OCSP responses by caching them until they were
 | 
			
		||||
 * considered "expired".
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static int cert_status_cb(SSL *s, void *arg)
 | 
			
		||||
	{
 | 
			
		||||
	tlsextstatusctx *srctx = arg;
 | 
			
		||||
	BIO *err = srctx->err;
 | 
			
		||||
	char *host, *port, *path;
 | 
			
		||||
	int use_ssl;
 | 
			
		||||
	unsigned char *rspder = NULL;
 | 
			
		||||
	int rspderlen;
 | 
			
		||||
	STACK *aia = NULL;
 | 
			
		||||
	X509 *x = NULL;
 | 
			
		||||
	X509_STORE_CTX inctx;
 | 
			
		||||
	X509_OBJECT obj;
 | 
			
		||||
	OCSP_REQUEST *req = NULL;
 | 
			
		||||
	OCSP_RESPONSE *resp = NULL;
 | 
			
		||||
	OCSP_CERTID *id = NULL;
 | 
			
		||||
	STACK_OF(X509_EXTENSION) *exts;
 | 
			
		||||
	int ret = SSL_TLSEXT_ERR_NOACK;
 | 
			
		||||
	int i;
 | 
			
		||||
#if 0
 | 
			
		||||
STACK_OF(OCSP_RESPID) *ids;
 | 
			
		||||
SSL_get_tlsext_status_ids(s, &ids);
 | 
			
		||||
BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids));
 | 
			
		||||
#endif
 | 
			
		||||
	if (srctx->verbose)
 | 
			
		||||
		BIO_puts(err, "cert_status: callback called\n");
 | 
			
		||||
	/* Build up OCSP query from server certificate */
 | 
			
		||||
	x = SSL_get_certificate(s);
 | 
			
		||||
	aia = X509_get1_ocsp(x);
 | 
			
		||||
	if (aia)
 | 
			
		||||
		{
 | 
			
		||||
		if (!OCSP_parse_url(sk_value(aia, 0),
 | 
			
		||||
			&host, &port, &path, &use_ssl))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(err, "cert_status: can't parse AIA URL\n");
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		if (srctx->verbose)
 | 
			
		||||
			BIO_printf(err, "cert_status: AIA URL: %s\n",
 | 
			
		||||
					sk_value(aia, 0));
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		if (!srctx->host)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(srctx->err, "cert_status: no AIA and no default responder URL\n");
 | 
			
		||||
			goto done;
 | 
			
		||||
			}
 | 
			
		||||
		host = srctx->host;
 | 
			
		||||
		path = srctx->path;
 | 
			
		||||
		port = srctx->port;
 | 
			
		||||
		use_ssl = srctx->use_ssl;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
	if (!X509_STORE_CTX_init(&inctx,
 | 
			
		||||
				SSL_CTX_get_cert_store(SSL_get_SSL_CTX(s)),
 | 
			
		||||
				NULL, NULL))
 | 
			
		||||
		goto err;
 | 
			
		||||
	if (X509_STORE_get_by_subject(&inctx,X509_LU_X509,
 | 
			
		||||
				X509_get_issuer_name(x),&obj) <= 0)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(err, "cert_status: Can't retrieve issuer certificate.\n");
 | 
			
		||||
		X509_STORE_CTX_cleanup(&inctx);
 | 
			
		||||
		goto done;
 | 
			
		||||
		}
 | 
			
		||||
	req = OCSP_REQUEST_new();
 | 
			
		||||
	if (!req)
 | 
			
		||||
		goto err;
 | 
			
		||||
	id = OCSP_cert_to_id(NULL, x, obj.data.x509);
 | 
			
		||||
	X509_free(obj.data.x509);
 | 
			
		||||
	X509_STORE_CTX_cleanup(&inctx);
 | 
			
		||||
	if (!id)
 | 
			
		||||
		goto err;
 | 
			
		||||
	if (!OCSP_request_add0_id(req, id))
 | 
			
		||||
		goto err;
 | 
			
		||||
	id = NULL;
 | 
			
		||||
	/* Add any extensions to the request */
 | 
			
		||||
	SSL_get_tlsext_status_exts(s, &exts);
 | 
			
		||||
	for (i = 0; i < sk_X509_EXTENSION_num(exts); i++)
 | 
			
		||||
		{
 | 
			
		||||
		X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i);
 | 
			
		||||
		if (!OCSP_REQUEST_add_ext(req, ext, -1))
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	resp = process_responder(err, req, host, path, port, use_ssl,
 | 
			
		||||
					srctx->timeout);
 | 
			
		||||
	if (!resp)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(err, "cert_status: error querying responder\n");
 | 
			
		||||
		goto done;
 | 
			
		||||
		}
 | 
			
		||||
	rspderlen = i2d_OCSP_RESPONSE(resp, &rspder);
 | 
			
		||||
	if (rspderlen <= 0)
 | 
			
		||||
		goto err;
 | 
			
		||||
	SSL_set_tlsext_status_ocsp_resp(s, rspder, rspderlen);
 | 
			
		||||
	if (srctx->verbose)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_puts(err, "cert_status: ocsp response sent:\n");
 | 
			
		||||
		OCSP_RESPONSE_print(err, resp, 2);
 | 
			
		||||
		}
 | 
			
		||||
	ret = SSL_TLSEXT_ERR_OK;
 | 
			
		||||
	done:
 | 
			
		||||
	if (ret != SSL_TLSEXT_ERR_OK)
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
	if (aia)
 | 
			
		||||
		{
 | 
			
		||||
		OPENSSL_free(host);
 | 
			
		||||
		OPENSSL_free(path);
 | 
			
		||||
		OPENSSL_free(port);
 | 
			
		||||
		X509_email_free(aia);
 | 
			
		||||
		}
 | 
			
		||||
	if (id)
 | 
			
		||||
		OCSP_CERTID_free(id);
 | 
			
		||||
	if (req)
 | 
			
		||||
		OCSP_REQUEST_free(req);
 | 
			
		||||
	if (resp)
 | 
			
		||||
		OCSP_RESPONSE_free(resp);
 | 
			
		||||
	return ret;
 | 
			
		||||
	err:
 | 
			
		||||
	ret = SSL_TLSEXT_ERR_ALERT_FATAL;
 | 
			
		||||
	goto done;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char *argv[])
 | 
			
		||||
@@ -527,14 +750,16 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
	char *CApath=NULL,*CAfile=NULL;
 | 
			
		||||
	unsigned char *context = NULL;
 | 
			
		||||
	char *dhfile = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ECDH
 | 
			
		||||
	char *named_curve = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	int badop=0,bugs=0;
 | 
			
		||||
	int ret=1;
 | 
			
		||||
	int off=0;
 | 
			
		||||
	int no_tmp_rsa=0,no_dhe=0,no_ecdhe=0,nocert=0;
 | 
			
		||||
	int state=0;
 | 
			
		||||
	SSL_METHOD *meth=NULL;
 | 
			
		||||
    int sock_type=SOCK_STREAM;
 | 
			
		||||
        int socket_type=SOCK_STREAM;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
@@ -545,6 +770,14 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
	int s_dcert_format = FORMAT_PEM, s_dkey_format = FORMAT_PEM;
 | 
			
		||||
	X509 *s_cert = NULL, *s_dcert = NULL;
 | 
			
		||||
	EVP_PKEY *s_key = NULL, *s_dkey = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	EVP_PKEY *s_key2 = NULL;
 | 
			
		||||
	X509 *s_cert2 = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
        tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
	meth=SSLv23_server_method();
 | 
			
		||||
@@ -681,7 +914,7 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
			{
 | 
			
		||||
			vflags |= X509_V_FLAG_CRL_CHECK;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-crl_check") == 0)
 | 
			
		||||
		else if (strcmp(*argv,"-crl_check_all") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			vflags |= X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL;
 | 
			
		||||
			}
 | 
			
		||||
@@ -710,6 +943,37 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
			}
 | 
			
		||||
		else if	(strcmp(*argv,"-debug") == 0)
 | 
			
		||||
			{ s_debug=1; }
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		else if	(strcmp(*argv,"-tlsextdebug") == 0)
 | 
			
		||||
			s_tlsextdebug=1;
 | 
			
		||||
		else if	(strcmp(*argv,"-status") == 0)
 | 
			
		||||
			s_tlsextstatus=1;
 | 
			
		||||
		else if	(strcmp(*argv,"-status_verbose") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			s_tlsextstatus=1;
 | 
			
		||||
			tlscstatp.verbose = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*argv, "-status_timeout"))
 | 
			
		||||
			{
 | 
			
		||||
			s_tlsextstatus=1;
 | 
			
		||||
                        if (--argc < 1) goto bad;
 | 
			
		||||
			tlscstatp.timeout = atoi(*(++argv));
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*argv, "-status_url"))
 | 
			
		||||
			{
 | 
			
		||||
			s_tlsextstatus=1;
 | 
			
		||||
                        if (--argc < 1) goto bad;
 | 
			
		||||
			if (!OCSP_parse_url(*(++argv),
 | 
			
		||||
					&tlscstatp.host,
 | 
			
		||||
					&tlscstatp.port,
 | 
			
		||||
					&tlscstatp.path,
 | 
			
		||||
					&tlscstatp.use_ssl))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "Error parsing URL\n");
 | 
			
		||||
				goto bad;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if	(strcmp(*argv,"-msg") == 0)
 | 
			
		||||
			{ s_msg=1; }
 | 
			
		||||
		else if	(strcmp(*argv,"-hack") == 0)
 | 
			
		||||
@@ -740,6 +1004,10 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
			{ off|=SSL_OP_NO_SSLv3; }
 | 
			
		||||
		else if	(strcmp(*argv,"-no_tls1") == 0)
 | 
			
		||||
			{ off|=SSL_OP_NO_TLSv1; }
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		else if	(strcmp(*argv,"-no_ticket") == 0)
 | 
			
		||||
			{ off|=SSL_OP_NO_TICKET; }
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SSL2
 | 
			
		||||
		else if	(strcmp(*argv,"-ssl2") == 0)
 | 
			
		||||
			{ meth=SSLv2_server_method(); }
 | 
			
		||||
@@ -756,7 +1024,7 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
		else if	(strcmp(*argv,"-dtls1") == 0)
 | 
			
		||||
			{ 
 | 
			
		||||
			meth=DTLSv1_server_method();
 | 
			
		||||
			sock_type = SOCK_DGRAM;
 | 
			
		||||
			socket_type = SOCK_DGRAM;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-timeout") == 0)
 | 
			
		||||
			enable_timeouts = 1;
 | 
			
		||||
@@ -785,6 +1053,25 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			inrand= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		else if (strcmp(*argv,"-servername") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			tlsextcbp.servername= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-servername_fatal") == 0)
 | 
			
		||||
			{ tlsextcbp.extension_error = SSL_TLSEXT_ERR_ALERT_FATAL; }
 | 
			
		||||
		else if	(strcmp(*argv,"-cert2") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			s_cert_file2= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if	(strcmp(*argv,"-key2") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			s_key_file2= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
			
		||||
@@ -817,24 +1104,52 @@ bad:
 | 
			
		||||
 | 
			
		||||
	if (s_key_file == NULL)
 | 
			
		||||
		s_key_file = s_cert_file;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (s_key_file2 == NULL)
 | 
			
		||||
		s_key_file2 = s_cert_file2;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e,
 | 
			
		||||
		       "server certificate private key file");
 | 
			
		||||
	if (!s_key)
 | 
			
		||||
	if (nocert == 0)
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
		s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e,
 | 
			
		||||
		       "server certificate private key file");
 | 
			
		||||
		if (!s_key)
 | 
			
		||||
			{
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
	s_cert = load_cert(bio_err,s_cert_file,s_cert_format,
 | 
			
		||||
		s_cert = load_cert(bio_err,s_cert_file,s_cert_format,
 | 
			
		||||
			NULL, e, "server certificate file");
 | 
			
		||||
 | 
			
		||||
	if (!s_cert)
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
		if (!s_cert)
 | 
			
		||||
			{
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (tlsextcbp.servername) 
 | 
			
		||||
			{
 | 
			
		||||
			s_key2 = load_key(bio_err, s_key_file2, s_key_format, 0, pass, e,
 | 
			
		||||
				"second server certificate private key file");
 | 
			
		||||
			if (!s_key2)
 | 
			
		||||
				{
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				goto end;
 | 
			
		||||
				}
 | 
			
		||||
			
 | 
			
		||||
			s_cert2 = load_cert(bio_err,s_cert_file2,s_cert_format,
 | 
			
		||||
				NULL, e, "second server certificate file");
 | 
			
		||||
			
 | 
			
		||||
			if (!s_cert2)
 | 
			
		||||
				{
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				goto end;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		}
 | 
			
		||||
	if (s_dcert_file)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
@@ -891,6 +1206,10 @@ bad:
 | 
			
		||||
		s_key_file=NULL;
 | 
			
		||||
		s_dcert_file=NULL;
 | 
			
		||||
		s_dkey_file=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		s_cert_file2=NULL;
 | 
			
		||||
		s_key_file2=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	ctx=SSL_CTX_new(meth);
 | 
			
		||||
@@ -922,7 +1241,7 @@ bad:
 | 
			
		||||
	/* DTLS: partial reads end up discarding unread UDP bytes :-( 
 | 
			
		||||
	 * Setting read ahead solves this problem.
 | 
			
		||||
	 */
 | 
			
		||||
	if (sock_type == SOCK_DGRAM) SSL_CTX_set_read_ahead(ctx, 1);
 | 
			
		||||
	if (socket_type == SOCK_DGRAM) SSL_CTX_set_read_ahead(ctx, 1);
 | 
			
		||||
 | 
			
		||||
	if (state) SSL_CTX_set_info_callback(ctx,apps_ssl_info_callback);
 | 
			
		||||
 | 
			
		||||
@@ -949,6 +1268,62 @@ bad:
 | 
			
		||||
		}
 | 
			
		||||
	store = SSL_CTX_get_cert_store(ctx);
 | 
			
		||||
	X509_STORE_set_flags(store, vflags);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (s_cert2)
 | 
			
		||||
		{
 | 
			
		||||
		ctx2=SSL_CTX_new(meth);
 | 
			
		||||
		if (ctx2 == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	
 | 
			
		||||
	if (ctx2)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_s_out,"Setting secondary ctx parameters\n");
 | 
			
		||||
 | 
			
		||||
		if (session_id_prefix)
 | 
			
		||||
			{
 | 
			
		||||
			if(strlen(session_id_prefix) >= 32)
 | 
			
		||||
				BIO_printf(bio_err,
 | 
			
		||||
					"warning: id_prefix is too long, only one new session will be possible\n");
 | 
			
		||||
			else if(strlen(session_id_prefix) >= 16)
 | 
			
		||||
				BIO_printf(bio_err,
 | 
			
		||||
					"warning: id_prefix is too long if you use SSLv2\n");
 | 
			
		||||
			if(!SSL_CTX_set_generate_session_id(ctx2, generate_session_id))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"error setting 'id_prefix'\n");
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				goto end;
 | 
			
		||||
				}
 | 
			
		||||
			BIO_printf(bio_err,"id_prefix '%s' set.\n", session_id_prefix);
 | 
			
		||||
			}
 | 
			
		||||
		SSL_CTX_set_quiet_shutdown(ctx2,1);
 | 
			
		||||
		if (bugs) SSL_CTX_set_options(ctx2,SSL_OP_ALL);
 | 
			
		||||
		if (hack) SSL_CTX_set_options(ctx2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
 | 
			
		||||
		SSL_CTX_set_options(ctx2,off);
 | 
			
		||||
 | 
			
		||||
		/* DTLS: partial reads end up discarding unread UDP bytes :-( 
 | 
			
		||||
		 * Setting read ahead solves this problem.
 | 
			
		||||
		 */
 | 
			
		||||
		if (socket_type == SOCK_DGRAM) SSL_CTX_set_read_ahead(ctx2, 1);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		if (state) SSL_CTX_set_info_callback(ctx2,apps_ssl_info_callback);
 | 
			
		||||
 | 
			
		||||
		SSL_CTX_sess_set_cache_size(ctx2,128);
 | 
			
		||||
 | 
			
		||||
		if ((!SSL_CTX_load_verify_locations(ctx2,CAfile,CApath)) ||
 | 
			
		||||
			(!SSL_CTX_set_default_verify_paths(ctx2)))
 | 
			
		||||
			{
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			}
 | 
			
		||||
		store = SSL_CTX_get_cert_store(ctx2);
 | 
			
		||||
		X509_STORE_set_flags(store, vflags);
 | 
			
		||||
		}
 | 
			
		||||
#endif 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_DH
 | 
			
		||||
	if (!no_dhe)
 | 
			
		||||
@@ -972,6 +1347,24 @@ bad:
 | 
			
		||||
		(void)BIO_flush(bio_s_out);
 | 
			
		||||
 | 
			
		||||
		SSL_CTX_set_tmp_dh(ctx,dh);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (ctx2)
 | 
			
		||||
			{
 | 
			
		||||
			if (!dhfile)
 | 
			
		||||
				{ 
 | 
			
		||||
				DH *dh2=load_dh_param(s_cert_file2);
 | 
			
		||||
				if (dh2 != NULL)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_s_out,"Setting temp DH parameters\n");
 | 
			
		||||
					(void)BIO_flush(bio_s_out);
 | 
			
		||||
 | 
			
		||||
					DH_free(dh);
 | 
			
		||||
					dh = dh2;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			SSL_CTX_set_tmp_dh(ctx2,dh);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		DH_free(dh);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
@@ -981,13 +1374,6 @@ bad:
 | 
			
		||||
		{
 | 
			
		||||
		EC_KEY *ecdh=NULL;
 | 
			
		||||
 | 
			
		||||
		ecdh = EC_KEY_new();
 | 
			
		||||
		if (ecdh == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"Could not create ECDH struct.\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (named_curve)
 | 
			
		||||
			{
 | 
			
		||||
			int nid = OBJ_sn2nid(named_curve);
 | 
			
		||||
@@ -998,9 +1384,8 @@ bad:
 | 
			
		||||
					named_curve);
 | 
			
		||||
				goto end;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			ecdh->group = EC_GROUP_new_by_nid(nid);
 | 
			
		||||
			if (ecdh->group == NULL)
 | 
			
		||||
			ecdh = EC_KEY_new_by_curve_name(nid);
 | 
			
		||||
			if (ecdh == NULL)
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "unable to create curve (%s)\n", 
 | 
			
		||||
					named_curve);
 | 
			
		||||
@@ -1008,15 +1393,15 @@ bad:
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (ecdh->group != NULL)
 | 
			
		||||
		if (ecdh != NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_s_out,"Setting temp ECDH parameters\n");
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_s_out,"Using default temp ECDH parameters\n");
 | 
			
		||||
			ecdh->group=EC_GROUP_new_by_nid(NID_sect163r2);
 | 
			
		||||
			if (ecdh->group == NULL) 
 | 
			
		||||
			ecdh = EC_KEY_new_by_curve_name(NID_sect163r2);
 | 
			
		||||
			if (ecdh == NULL) 
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "unable to create curve (sect163r2)\n");
 | 
			
		||||
				goto end;
 | 
			
		||||
@@ -1025,12 +1410,20 @@ bad:
 | 
			
		||||
		(void)BIO_flush(bio_s_out);
 | 
			
		||||
 | 
			
		||||
		SSL_CTX_set_tmp_ecdh(ctx,ecdh);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (ctx2) 
 | 
			
		||||
			SSL_CTX_set_tmp_ecdh(ctx2,ecdh);
 | 
			
		||||
#endif
 | 
			
		||||
		EC_KEY_free(ecdh);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	
 | 
			
		||||
	if (!set_cert_key_stuff(ctx,s_cert,s_key))
 | 
			
		||||
		goto end;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (ctx2 && !set_cert_key_stuff(ctx2,s_cert2,s_key2))
 | 
			
		||||
		goto end; 
 | 
			
		||||
#endif
 | 
			
		||||
	if (s_dcert != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		if (!set_cert_key_stuff(ctx,s_dcert,s_dkey))
 | 
			
		||||
@@ -1040,7 +1433,13 @@ bad:
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#if 1
 | 
			
		||||
	if (!no_tmp_rsa)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_CTX_set_tmp_rsa_callback(ctx,tmp_rsa_cb);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (ctx2) 
 | 
			
		||||
			SSL_CTX_set_tmp_rsa_callback(ctx2,tmp_rsa_cb);
 | 
			
		||||
#endif	
 | 
			
		||||
		}
 | 
			
		||||
#else
 | 
			
		||||
	if (!no_tmp_rsa && SSL_CTX_need_tmp_RSA(ctx))
 | 
			
		||||
		{
 | 
			
		||||
@@ -1056,6 +1455,16 @@ bad:
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
			if (ctx2)
 | 
			
		||||
				{
 | 
			
		||||
				if (!SSL_CTX_set_tmp_rsa(ctx2,rsa))
 | 
			
		||||
					{
 | 
			
		||||
					ERR_print_errors(bio_err);
 | 
			
		||||
					goto end;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
#endif
 | 
			
		||||
		RSA_free(rsa);
 | 
			
		||||
		BIO_printf(bio_s_out,"\n");
 | 
			
		||||
		}
 | 
			
		||||
@@ -1067,19 +1476,46 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err,"error setting cipher list\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (ctx2 && !SSL_CTX_set_cipher_list(ctx2,cipher))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"error setting cipher list\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
	SSL_CTX_set_verify(ctx,s_server_verify,verify_callback);
 | 
			
		||||
	SSL_CTX_set_session_id_context(ctx,(void*)&s_server_session_id_context,
 | 
			
		||||
		sizeof s_server_session_id_context);
 | 
			
		||||
 | 
			
		||||
	if (CAfile != NULL)
 | 
			
		||||
	    SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(CAfile));
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (ctx2)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_CTX_set_verify(ctx2,s_server_verify,verify_callback);
 | 
			
		||||
		SSL_CTX_set_session_id_context(ctx2,(void*)&s_server_session_id_context,
 | 
			
		||||
			sizeof s_server_session_id_context);
 | 
			
		||||
 | 
			
		||||
		tlsextcbp.biodebug = bio_s_out;
 | 
			
		||||
		SSL_CTX_set_tlsext_servername_callback(ctx2, ssl_servername_cb);
 | 
			
		||||
		SSL_CTX_set_tlsext_servername_arg(ctx2, &tlsextcbp);
 | 
			
		||||
		SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_cb);
 | 
			
		||||
		SSL_CTX_set_tlsext_servername_arg(ctx, &tlsextcbp);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	if (CAfile != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(CAfile));
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (ctx2) 
 | 
			
		||||
			SSL_CTX_set_client_CA_list(ctx2,SSL_load_client_CA_file(CAfile));
 | 
			
		||||
#endif
 | 
			
		||||
		}
 | 
			
		||||
	BIO_printf(bio_s_out,"ACCEPT\n");
 | 
			
		||||
	if (www)
 | 
			
		||||
		do_server(port,sock_type,&accept_socket,www_body, context);
 | 
			
		||||
		do_server(port,socket_type,&accept_socket,www_body, context);
 | 
			
		||||
	else
 | 
			
		||||
		do_server(port,sock_type,&accept_socket,sv_body, context);
 | 
			
		||||
		do_server(port,socket_type,&accept_socket,sv_body, context);
 | 
			
		||||
	print_stats(bio_s_out,ctx);
 | 
			
		||||
	ret=0;
 | 
			
		||||
end:
 | 
			
		||||
@@ -1096,6 +1532,13 @@ end:
 | 
			
		||||
		OPENSSL_free(pass);
 | 
			
		||||
	if (dpass)
 | 
			
		||||
		OPENSSL_free(dpass);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (ctx2 != NULL) SSL_CTX_free(ctx2);
 | 
			
		||||
	if (s_cert2)
 | 
			
		||||
		X509_free(s_cert2);
 | 
			
		||||
	if (s_key2)
 | 
			
		||||
		EVP_PKEY_free(s_key2);
 | 
			
		||||
#endif
 | 
			
		||||
	if (bio_s_out != NULL)
 | 
			
		||||
		{
 | 
			
		||||
        BIO_free(bio_s_out);
 | 
			
		||||
@@ -1162,6 +1605,19 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
 | 
			
		||||
	if (con == NULL) {
 | 
			
		||||
		con=SSL_new(ctx);
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (s_tlsextdebug)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_set_tlsext_debug_callback(con, tlsext_cb);
 | 
			
		||||
		SSL_set_tlsext_debug_arg(con, bio_s_out);
 | 
			
		||||
		}
 | 
			
		||||
	if (s_tlsextstatus)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_CTX_set_tlsext_status_cb(ctx, cert_status_cb);
 | 
			
		||||
		tlscstatp.err = bio_err;
 | 
			
		||||
		SSL_CTX_set_tlsext_status_arg(ctx, &tlscstatp);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_KRB5
 | 
			
		||||
		if ((con->kssl_ctx = kssl_ctx_new()) != NULL)
 | 
			
		||||
                        {
 | 
			
		||||
@@ -1225,13 +1681,20 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
		{
 | 
			
		||||
		con->debug=1;
 | 
			
		||||
		BIO_set_callback(SSL_get_rbio(con),bio_dump_callback);
 | 
			
		||||
		BIO_set_callback_arg(SSL_get_rbio(con),bio_s_out);
 | 
			
		||||
		BIO_set_callback_arg(SSL_get_rbio(con),(char *)bio_s_out);
 | 
			
		||||
		}
 | 
			
		||||
	if (s_msg)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_set_msg_callback(con, msg_cb);
 | 
			
		||||
		SSL_set_msg_callback_arg(con, bio_s_out);
 | 
			
		||||
		}
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
	if (s_tlsextdebug)
 | 
			
		||||
		{
 | 
			
		||||
		SSL_set_tlsext_debug_callback(con, tlsext_cb);
 | 
			
		||||
		SSL_set_tlsext_debug_arg(con, bio_s_out);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	width=s+1;
 | 
			
		||||
	for (;;)
 | 
			
		||||
@@ -1597,6 +2060,13 @@ static int www_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
	if (!BIO_set_write_buffer_size(io,bufsize)) goto err;
 | 
			
		||||
 | 
			
		||||
	if ((con=SSL_new(ctx)) == NULL) goto err;
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
		if (s_tlsextdebug)
 | 
			
		||||
			{
 | 
			
		||||
			SSL_set_tlsext_debug_callback(con, tlsext_cb);
 | 
			
		||||
			SSL_set_tlsext_debug_arg(con, bio_s_out);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_KRB5
 | 
			
		||||
	if ((con->kssl_ctx = kssl_ctx_new()) != NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -1629,7 +2099,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
		{
 | 
			
		||||
		con->debug=1;
 | 
			
		||||
		BIO_set_callback(SSL_get_rbio(con),bio_dump_callback);
 | 
			
		||||
		BIO_set_callback_arg(SSL_get_rbio(con),bio_s_out);
 | 
			
		||||
		BIO_set_callback_arg(SSL_get_rbio(con),(char *)bio_s_out);
 | 
			
		||||
		}
 | 
			
		||||
	if (s_msg)
 | 
			
		||||
		{
 | 
			
		||||
 
 | 
			
		||||
@@ -87,8 +87,12 @@ typedef unsigned int u_int;
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_SOCK
 | 
			
		||||
 | 
			
		||||
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
 | 
			
		||||
#include "netdb.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static struct hostent *GetHostByName(char *name);
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
 | 
			
		||||
static void ssl_sock_cleanup(void);
 | 
			
		||||
#endif
 | 
			
		||||
static int ssl_sock_init(void);
 | 
			
		||||
@@ -104,7 +108,7 @@ static int host_ip(char *str, unsigned char ip[4]);
 | 
			
		||||
#define SOCKET_PROTOCOL	IPPROTO_TCP
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_NETWARE
 | 
			
		||||
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
 | 
			
		||||
static int wsa_init_done=0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -156,7 +160,7 @@ static void ssl_sock_cleanup(void)
 | 
			
		||||
		WSACleanup();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
#elif defined(OPENSSL_SYS_NETWARE)
 | 
			
		||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
 | 
			
		||||
static void sock_cleanup(void)
 | 
			
		||||
    {
 | 
			
		||||
    if (wsa_init_done)
 | 
			
		||||
@@ -199,7 +203,7 @@ static int ssl_sock_init(void)
 | 
			
		||||
		SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
 | 
			
		||||
#endif /* OPENSSL_SYS_WIN16 */
 | 
			
		||||
		}
 | 
			
		||||
#elif defined(OPENSSL_SYS_NETWARE)
 | 
			
		||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
 | 
			
		||||
   WORD wVerReq;
 | 
			
		||||
   WSADATA wsaData;
 | 
			
		||||
   int err;
 | 
			
		||||
@@ -398,7 +402,7 @@ redoit:
 | 
			
		||||
	ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
 | 
			
		||||
	if (ret == INVALID_SOCKET)
 | 
			
		||||
		{
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
 | 
			
		||||
		i=WSAGetLastError();
 | 
			
		||||
		BIO_printf(bio_err,"accept error %d\n",i);
 | 
			
		||||
#else
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								apps/smime.c
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								apps/smime.c
									
									
									
									
									
								
							@@ -145,6 +145,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		else if (!strcmp (*args, "-des")) 
 | 
			
		||||
				cipher = EVP_des_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		else if (!strcmp (*args, "-seed")) 
 | 
			
		||||
				cipher = EVP_seed_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC2
 | 
			
		||||
		else if (!strcmp (*args, "-rc2-40")) 
 | 
			
		||||
				cipher = EVP_rc2_40_cbc();
 | 
			
		||||
@@ -160,6 +164,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				cipher = EVP_aes_192_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-aes256"))
 | 
			
		||||
				cipher = EVP_aes_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		else if (!strcmp(*args,"-camellia128"))
 | 
			
		||||
				cipher = EVP_camellia_128_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-camellia192"))
 | 
			
		||||
				cipher = EVP_camellia_192_cbc();
 | 
			
		||||
		else if (!strcmp(*args,"-camellia256"))
 | 
			
		||||
				cipher = EVP_camellia_256_cbc();
 | 
			
		||||
#endif
 | 
			
		||||
		else if (!strcmp (*args, "-text")) 
 | 
			
		||||
				flags |= PKCS7_TEXT;
 | 
			
		||||
@@ -384,9 +396,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		}
 | 
			
		||||
	else if (operation == SMIME_DECRYPT)
 | 
			
		||||
		{
 | 
			
		||||
		if (!recipfile)
 | 
			
		||||
		if (!recipfile && !keyfile)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "No recipient certificate and key specified\n");
 | 
			
		||||
			BIO_printf(bio_err, "No recipient certificate or key specified\n");
 | 
			
		||||
			badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -415,6 +427,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		BIO_printf (bio_err, "-des3          encrypt with triple DES\n");
 | 
			
		||||
		BIO_printf (bio_err, "-des           encrypt with DES\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		BIO_printf (bio_err, "-seed          encrypt with SEED\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC2
 | 
			
		||||
		BIO_printf (bio_err, "-rc2-40        encrypt with RC2-40 (default)\n");
 | 
			
		||||
		BIO_printf (bio_err, "-rc2-64        encrypt with RC2-64\n");
 | 
			
		||||
@@ -423,6 +438,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		BIO_printf (bio_err, "-aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf (bio_err, "               encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
		BIO_printf (bio_err, "-camellia128, -camellia192, -camellia256\n");
 | 
			
		||||
		BIO_printf (bio_err, "               encrypt PEM output with cbc camellia\n");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf (bio_err, "-nointern      don't search certificates in message for signer\n");
 | 
			
		||||
		BIO_printf (bio_err, "-nosigs        don't verify message signature\n");
 | 
			
		||||
@@ -638,12 +657,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		if ((flags & PKCS7_DETACHED) && (outformat == FORMAT_SMIME))
 | 
			
		||||
			flags |= PKCS7_STREAM;
 | 
			
		||||
		p7 = PKCS7_sign(signer, key, other, in, flags);
 | 
			
		||||
		/* Don't need to rewind for partial signing */
 | 
			
		||||
		if (!(flags & PKCS7_STREAM) && (BIO_reset(in) != 0))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Can't rewind input file\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										563
									
								
								apps/speed.c
									
									
									
									
									
								
							
							
						
						
									
										563
									
								
								apps/speed.c
									
									
									
									
									
								
							@@ -164,6 +164,9 @@
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
#include <openssl/camellia.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_MD2
 | 
			
		||||
#include <openssl/md2.h>
 | 
			
		||||
#endif
 | 
			
		||||
@@ -198,6 +201,9 @@
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
#include <openssl/idea.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
#include <openssl/seed.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_BF
 | 
			
		||||
#include <openssl/blowfish.h>
 | 
			
		||||
#endif
 | 
			
		||||
@@ -269,7 +275,7 @@ static void print_result(int alg,int run_no,int count,double time_used);
 | 
			
		||||
static int do_multi(int multi);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define ALGOR_NUM	21
 | 
			
		||||
#define ALGOR_NUM	28
 | 
			
		||||
#define SIZE_NUM	5
 | 
			
		||||
#define RSA_NUM		4
 | 
			
		||||
#define DSA_NUM		3
 | 
			
		||||
@@ -279,16 +285,27 @@ static int do_multi(int multi);
 | 
			
		||||
 | 
			
		||||
static const char *names[ALGOR_NUM]={
 | 
			
		||||
  "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4",
 | 
			
		||||
  "des cbc","des ede3","idea cbc",
 | 
			
		||||
  "des cbc","des ede3","idea cbc","seed cbc",
 | 
			
		||||
  "rc2 cbc","rc5-32/12 cbc","blowfish cbc","cast cbc",
 | 
			
		||||
  "aes-128 cbc","aes-192 cbc","aes-256 cbc","evp","sha256","sha512"};
 | 
			
		||||
  "aes-128 cbc","aes-192 cbc","aes-256 cbc",
 | 
			
		||||
  "camellia-128 cbc","camellia-192 cbc","camellia-256 cbc",
 | 
			
		||||
  "evp","sha256","sha512",
 | 
			
		||||
  "aes-128 ige","aes-192 ige","aes-256 ige"};
 | 
			
		||||
static double results[ALGOR_NUM][SIZE_NUM];
 | 
			
		||||
static int lengths[SIZE_NUM]={16,64,256,1024,8*1024};
 | 
			
		||||
static double rsa_results[RSA_NUM][2];
 | 
			
		||||
static double dsa_results[DSA_NUM][2];
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
static double ecdsa_results[EC_NUM][2];
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDH
 | 
			
		||||
static double ecdh_results[EC_NUM][1];
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(OPENSSL_NO_DSA) && !(defined(OPENSSL_NO_ECDSA) && defined(OPENSSL_NO_ECDH))
 | 
			
		||||
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
 | 
			
		||||
static int rnd_fake = 0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef SIGALRM
 | 
			
		||||
#if defined(__STDC__) || defined(sgi) || defined(_AIX)
 | 
			
		||||
@@ -448,6 +465,7 @@ static double Time_F(int s)
 | 
			
		||||
#endif /* if defined(OPENSSL_SYS_NETWARE) */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ECDH
 | 
			
		||||
static const int KDF1_SHA1_len = 20;
 | 
			
		||||
static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen)
 | 
			
		||||
	{
 | 
			
		||||
@@ -459,8 +477,9 @@ static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen)
 | 
			
		||||
	return SHA1(in, inlen, out);
 | 
			
		||||
#else
 | 
			
		||||
	return NULL;
 | 
			
		||||
#endif
 | 
			
		||||
#endif	/* OPENSSL_NO_SHA */
 | 
			
		||||
	}
 | 
			
		||||
#endif	/* OPENSSL_NO_ECDH */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
@@ -496,9 +515,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA
 | 
			
		||||
	unsigned char sha[SHA_DIGEST_LENGTH];
 | 
			
		||||
#ifndef OPENSSL_NO_SHA256
 | 
			
		||||
	unsigned char sha256[SHA256_DIGEST_LENGTH];
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA512
 | 
			
		||||
	unsigned char sha512[SHA512_DIGEST_LENGTH];
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RIPEMD
 | 
			
		||||
	unsigned char rmd160[RIPEMD160_DIGEST_LENGTH];
 | 
			
		||||
#endif
 | 
			
		||||
@@ -514,6 +537,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
	IDEA_KEY_SCHEDULE idea_ks;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	SEED_KEY_SCHEDULE seed_ks;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_BF
 | 
			
		||||
	BF_KEY bf_ks;
 | 
			
		||||
#endif
 | 
			
		||||
@@ -523,6 +549,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	static const unsigned char key16[16]=
 | 
			
		||||
		{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
 | 
			
		||||
		 0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
	static const unsigned char key24[24]=
 | 
			
		||||
		{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
 | 
			
		||||
		 0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
 | 
			
		||||
@@ -532,13 +559,25 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		 0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
 | 
			
		||||
		 0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,
 | 
			
		||||
		 0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,0x56};
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	static const unsigned char ckey24[24]=
 | 
			
		||||
		{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
 | 
			
		||||
		 0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
 | 
			
		||||
		 0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
 | 
			
		||||
	static const unsigned char ckey32[32]=
 | 
			
		||||
		{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
 | 
			
		||||
		 0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
 | 
			
		||||
		 0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,
 | 
			
		||||
		 0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,0x56};
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
#define MAX_BLOCK_SIZE 128
 | 
			
		||||
#else
 | 
			
		||||
#define MAX_BLOCK_SIZE 64
 | 
			
		||||
#endif
 | 
			
		||||
	unsigned char DES_iv[8];
 | 
			
		||||
	unsigned char iv[MAX_BLOCK_SIZE/8];
 | 
			
		||||
	unsigned char iv[2*MAX_BLOCK_SIZE/8];
 | 
			
		||||
#ifndef OPENSSL_NO_DES
 | 
			
		||||
	DES_cblock *buf_as_des_cblock = NULL;
 | 
			
		||||
	static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
 | 
			
		||||
@@ -551,6 +590,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
	AES_KEY aes_ks1, aes_ks2, aes_ks3;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3;
 | 
			
		||||
#endif
 | 
			
		||||
#define	D_MD2		0
 | 
			
		||||
#define	D_MDC2		1
 | 
			
		||||
#define	D_MD4		2
 | 
			
		||||
@@ -562,16 +604,23 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#define	D_CBC_DES	8
 | 
			
		||||
#define	D_EDE3_DES	9
 | 
			
		||||
#define	D_CBC_IDEA	10
 | 
			
		||||
#define	D_CBC_RC2	11
 | 
			
		||||
#define	D_CBC_RC5	12
 | 
			
		||||
#define	D_CBC_BF	13
 | 
			
		||||
#define	D_CBC_CAST	14
 | 
			
		||||
#define D_CBC_128_AES	15
 | 
			
		||||
#define D_CBC_192_AES	16
 | 
			
		||||
#define D_CBC_256_AES	17
 | 
			
		||||
#define D_EVP		18
 | 
			
		||||
#define D_SHA256	19
 | 
			
		||||
#define D_SHA512	20
 | 
			
		||||
#define	D_CBC_SEED	11
 | 
			
		||||
#define	D_CBC_RC2	12
 | 
			
		||||
#define	D_CBC_RC5	13
 | 
			
		||||
#define	D_CBC_BF	14
 | 
			
		||||
#define	D_CBC_CAST	15
 | 
			
		||||
#define D_CBC_128_AES	16
 | 
			
		||||
#define D_CBC_192_AES	17
 | 
			
		||||
#define D_CBC_256_AES	18
 | 
			
		||||
#define D_CBC_128_CML   19 
 | 
			
		||||
#define D_CBC_192_CML   20
 | 
			
		||||
#define D_CBC_256_CML   21 
 | 
			
		||||
#define D_EVP		22
 | 
			
		||||
#define D_SHA256	23	
 | 
			
		||||
#define D_SHA512	24
 | 
			
		||||
#define D_IGE_128_AES   25
 | 
			
		||||
#define D_IGE_192_AES   26
 | 
			
		||||
#define D_IGE_256_AES   27
 | 
			
		||||
	double d=0.0;
 | 
			
		||||
	long c[ALGOR_NUM][SIZE_NUM];
 | 
			
		||||
#define	R_DSA_512	0
 | 
			
		||||
@@ -689,8 +738,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
	int rsa_doit[RSA_NUM];
 | 
			
		||||
	int dsa_doit[DSA_NUM];
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	int ecdsa_doit[EC_NUM];
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDH
 | 
			
		||||
        int ecdh_doit[EC_NUM];
 | 
			
		||||
#endif
 | 
			
		||||
	int doit[ALGOR_NUM];
 | 
			
		||||
	int pr_header=0;
 | 
			
		||||
	const EVP_CIPHER *evp_cipher=NULL;
 | 
			
		||||
@@ -878,11 +931,15 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
							doit[D_SHA256]=1,
 | 
			
		||||
							doit[D_SHA512]=1;
 | 
			
		||||
		else
 | 
			
		||||
#ifndef OPENSSL_NO_SHA256
 | 
			
		||||
			if (strcmp(*argv,"sha256") == 0) doit[D_SHA256]=1;
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA512
 | 
			
		||||
			if (strcmp(*argv,"sha512") == 0) doit[D_SHA512]=1;
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RIPEMD
 | 
			
		||||
			if (strcmp(*argv,"ripemd") == 0) doit[D_RMD160]=1;
 | 
			
		||||
		else
 | 
			
		||||
@@ -904,6 +961,15 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (strcmp(*argv,"aes-128-cbc") == 0) doit[D_CBC_128_AES]=1;
 | 
			
		||||
		else	if (strcmp(*argv,"aes-192-cbc") == 0) doit[D_CBC_192_AES]=1;
 | 
			
		||||
		else	if (strcmp(*argv,"aes-256-cbc") == 0) doit[D_CBC_256_AES]=1;
 | 
			
		||||
		else    if (strcmp(*argv,"aes-128-ige") == 0) doit[D_IGE_128_AES]=1;
 | 
			
		||||
		else	if (strcmp(*argv,"aes-192-ige") == 0) doit[D_IGE_192_AES]=1;
 | 
			
		||||
		else	if (strcmp(*argv,"aes-256-ige") == 0) doit[D_IGE_256_AES]=1;
 | 
			
		||||
                else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
			if (strcmp(*argv,"camellia-128-cbc") == 0) doit[D_CBC_128_CML]=1;
 | 
			
		||||
		else    if (strcmp(*argv,"camellia-192-cbc") == 0) doit[D_CBC_192_CML]=1;
 | 
			
		||||
		else    if (strcmp(*argv,"camellia-256-cbc") == 0) doit[D_CBC_256_CML]=1;
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
@@ -947,6 +1013,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		else if (strcmp(*argv,"idea") == 0) doit[D_CBC_IDEA]=1;
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
		     if (strcmp(*argv,"seed-cbc") == 0) doit[D_CBC_SEED]=1;
 | 
			
		||||
		else if (strcmp(*argv,"seed") == 0) doit[D_CBC_SEED]=1;
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_BF
 | 
			
		||||
		     if (strcmp(*argv,"bf-cbc") == 0) doit[D_CBC_BF]=1;
 | 
			
		||||
		else if (strcmp(*argv,"blowfish") == 0) doit[D_CBC_BF]=1;
 | 
			
		||||
@@ -976,6 +1047,15 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
			if (strcmp(*argv,"camellia") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			doit[D_CBC_128_CML]=1;
 | 
			
		||||
			doit[D_CBC_192_CML]=1;
 | 
			
		||||
			doit[D_CBC_256_CML]=1;
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
			if (strcmp(*argv,"rsa") == 0)
 | 
			
		||||
			{
 | 
			
		||||
@@ -1064,8 +1144,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA1
 | 
			
		||||
			BIO_printf(bio_err,"sha1     ");
 | 
			
		||||
			BIO_printf(bio_err,"sha256  ");
 | 
			
		||||
			BIO_printf(bio_err,"sha512  ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA256
 | 
			
		||||
			BIO_printf(bio_err,"sha256   ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SHA512
 | 
			
		||||
			BIO_printf(bio_err,"sha512   ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RIPEMD160
 | 
			
		||||
			BIO_printf(bio_err,"rmd160");
 | 
			
		||||
@@ -1079,6 +1163,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
			BIO_printf(bio_err,"idea-cbc ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
			BIO_printf(bio_err,"seed-cbc ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC2
 | 
			
		||||
			BIO_printf(bio_err,"rc2-cbc  ");
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1088,7 +1175,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_BF
 | 
			
		||||
			BIO_printf(bio_err,"bf-cbc");
 | 
			
		||||
#endif
 | 
			
		||||
#if !defined(OPENSSL_NO_IDEA) || !defined(OPENSSL_NO_RC2) || \
 | 
			
		||||
#if !defined(OPENSSL_NO_IDEA) || !defined(OPENSSL_NO_SEED) || !defined(OPENSSL_NO_RC2) || \
 | 
			
		||||
    !defined(OPENSSL_NO_BF) || !defined(OPENSSL_NO_RC5)
 | 
			
		||||
			BIO_printf(bio_err,"\n");
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1097,6 +1184,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
			BIO_printf(bio_err,"aes-128-cbc aes-192-cbc aes-256-cbc ");
 | 
			
		||||
			BIO_printf(bio_err,"aes-128-ige aes-192-ige aes-256-ige ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
			BIO_printf(bio_err,"\n");
 | 
			
		||||
			BIO_printf(bio_err,"camellia-128-cbc camellia-192-cbc camellia-256-cbc ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC4
 | 
			
		||||
			BIO_printf(bio_err,"rc4");
 | 
			
		||||
@@ -1126,6 +1218,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
			BIO_printf(bio_err,"idea     ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
			BIO_printf(bio_err,"seed     ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC2
 | 
			
		||||
			BIO_printf(bio_err,"rc2      ");
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1135,15 +1230,19 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
			BIO_printf(bio_err,"aes      ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
			BIO_printf(bio_err,"camellia ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
			BIO_printf(bio_err,"rsa      ");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_BF
 | 
			
		||||
			BIO_printf(bio_err,"blowfish");
 | 
			
		||||
#endif
 | 
			
		||||
#if !defined(OPENSSL_NO_IDEA) || !defined(OPENSSL_NO_RC2) || \
 | 
			
		||||
    !defined(OPENSSL_NO_DES) || !defined(OPENSSL_NO_RSA) || \
 | 
			
		||||
    !defined(OPENSSL_NO_BF) || !defined(OPENSSL_NO_AES)
 | 
			
		||||
#if !defined(OPENSSL_NO_IDEA) || !defined(OPENSSL_NO_SEED) || \
 | 
			
		||||
    !defined(OPENSSL_NO_RC2) || !defined(OPENSSL_NO_DES) || \
 | 
			
		||||
    !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_BF) || \
 | 
			
		||||
    !defined(OPENSSL_NO_AES) || !defined(OPENSSL_NO_CAMELLIA)
 | 
			
		||||
			BIO_printf(bio_err,"\n");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -1237,9 +1336,17 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	AES_set_encrypt_key(key24,192,&aes_ks2);
 | 
			
		||||
	AES_set_encrypt_key(key32,256,&aes_ks3);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	Camellia_set_key(key16,128,&camellia_ks1);
 | 
			
		||||
	Camellia_set_key(ckey24,192,&camellia_ks2);
 | 
			
		||||
	Camellia_set_key(ckey32,256,&camellia_ks3);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
	idea_set_encrypt_key(key16,&idea_ks);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	SEED_set_key(key16,&seed_ks);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC4
 | 
			
		||||
	RC4_set_key(&rc4_ks,16,key16);
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1283,6 +1390,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	c[D_CBC_DES][0]=count;
 | 
			
		||||
	c[D_EDE3_DES][0]=count/3;
 | 
			
		||||
	c[D_CBC_IDEA][0]=count;
 | 
			
		||||
	c[D_CBC_SEED][0]=count;
 | 
			
		||||
	c[D_CBC_RC2][0]=count;
 | 
			
		||||
	c[D_CBC_RC5][0]=count;
 | 
			
		||||
	c[D_CBC_BF][0]=count;
 | 
			
		||||
@@ -1290,8 +1398,14 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	c[D_CBC_128_AES][0]=count;
 | 
			
		||||
	c[D_CBC_192_AES][0]=count;
 | 
			
		||||
	c[D_CBC_256_AES][0]=count;
 | 
			
		||||
	c[D_CBC_128_CML][0]=count;
 | 
			
		||||
	c[D_CBC_192_CML][0]=count;
 | 
			
		||||
	c[D_CBC_256_CML][0]=count;
 | 
			
		||||
	c[D_SHA256][0]=count;
 | 
			
		||||
	c[D_SHA512][0]=count;
 | 
			
		||||
	c[D_IGE_128_AES][0]=count;
 | 
			
		||||
	c[D_IGE_192_AES][0]=count;
 | 
			
		||||
	c[D_IGE_256_AES][0]=count;
 | 
			
		||||
 | 
			
		||||
	for (i=1; i<SIZE_NUM; i++)
 | 
			
		||||
		{
 | 
			
		||||
@@ -1315,6 +1429,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		c[D_CBC_DES][i]=c[D_CBC_DES][i-1]*l0/l1;
 | 
			
		||||
		c[D_EDE3_DES][i]=c[D_EDE3_DES][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_IDEA][i]=c[D_CBC_IDEA][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_SEED][i]=c[D_CBC_SEED][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_RC2][i]=c[D_CBC_RC2][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1;
 | 
			
		||||
@@ -1322,6 +1437,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		c[D_CBC_128_AES][i]=c[D_CBC_128_AES][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_192_AES][i]=c[D_CBC_192_AES][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_256_AES][i]=c[D_CBC_256_AES][i-1]*l0/l1;
 | 
			
		||||
 		c[D_CBC_128_CML][i]=c[D_CBC_128_CML][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_192_CML][i]=c[D_CBC_192_CML][i-1]*l0/l1;
 | 
			
		||||
		c[D_CBC_256_CML][i]=c[D_CBC_256_CML][i-1]*l0/l1;
 | 
			
		||||
		c[D_IGE_128_AES][i]=c[D_IGE_128_AES][i-1]*l0/l1;
 | 
			
		||||
		c[D_IGE_192_AES][i]=c[D_IGE_192_AES][i-1]*l0/l1;
 | 
			
		||||
		c[D_IGE_256_AES][i]=c[D_IGE_256_AES][i-1]*l0/l1;
 | 
			
		||||
		}
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
	rsa_c[R_RSA_512][0]=count/2000;
 | 
			
		||||
@@ -1715,6 +1836,93 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (doit[D_IGE_128_AES])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_IGE_128_AES],c[D_IGE_128_AES][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_IGE_128_AES][j]); count++)
 | 
			
		||||
				AES_ige_encrypt(buf,buf2,
 | 
			
		||||
					(unsigned long)lengths[j],&aes_ks1,
 | 
			
		||||
					iv,AES_ENCRYPT);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_IGE_128_AES,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	if (doit[D_IGE_192_AES])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_IGE_192_AES],c[D_IGE_192_AES][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_IGE_192_AES][j]); count++)
 | 
			
		||||
				AES_ige_encrypt(buf,buf2,
 | 
			
		||||
					(unsigned long)lengths[j],&aes_ks2,
 | 
			
		||||
					iv,AES_ENCRYPT);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_IGE_192_AES,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	if (doit[D_IGE_256_AES])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_IGE_256_AES],c[D_IGE_256_AES][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_IGE_256_AES][j]); count++)
 | 
			
		||||
				AES_ige_encrypt(buf,buf2,
 | 
			
		||||
					(unsigned long)lengths[j],&aes_ks3,
 | 
			
		||||
					iv,AES_ENCRYPT);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_IGE_256_AES,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_CAMELLIA
 | 
			
		||||
	if (doit[D_CBC_128_CML])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_CBC_128_CML],c[D_CBC_128_CML][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_CBC_128_CML][j]); count++)
 | 
			
		||||
				Camellia_cbc_encrypt(buf,buf,
 | 
			
		||||
				        (unsigned long)lengths[j],&camellia_ks1,
 | 
			
		||||
				        iv,CAMELLIA_ENCRYPT);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_CBC_128_CML,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	if (doit[D_CBC_192_CML])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_CBC_192_CML],c[D_CBC_192_CML][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_CBC_192_CML][j]); count++)
 | 
			
		||||
				Camellia_cbc_encrypt(buf,buf,
 | 
			
		||||
				        (unsigned long)lengths[j],&camellia_ks2,
 | 
			
		||||
				        iv,CAMELLIA_ENCRYPT);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_CBC_192_CML,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	if (doit[D_CBC_256_CML])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_CBC_256_CML],c[D_CBC_256_CML][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_CBC_256_CML][j]); count++)
 | 
			
		||||
				Camellia_cbc_encrypt(buf,buf,
 | 
			
		||||
				        (unsigned long)lengths[j],&camellia_ks3,
 | 
			
		||||
				        iv,CAMELLIA_ENCRYPT);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_CBC_256_CML,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
	if (doit[D_CBC_IDEA])
 | 
			
		||||
@@ -1732,6 +1940,21 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SEED
 | 
			
		||||
	if (doit[D_CBC_SEED])
 | 
			
		||||
		{
 | 
			
		||||
		for (j=0; j<SIZE_NUM; j++)
 | 
			
		||||
			{
 | 
			
		||||
			print_message(names[D_CBC_SEED],c[D_CBC_SEED][j],lengths[j]);
 | 
			
		||||
			Time_F(START);
 | 
			
		||||
			for (count=0,run=1; COND(c[D_CBC_SEED][j]); count++)
 | 
			
		||||
				SEED_cbc_encrypt(buf,buf,
 | 
			
		||||
					(unsigned long)lengths[j],&seed_ks,iv,1);
 | 
			
		||||
			d=Time_F(STOP);
 | 
			
		||||
			print_result(D_CBC_SEED,j,count,d);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_RC2
 | 
			
		||||
	if (doit[D_CBC_RC2])
 | 
			
		||||
		{
 | 
			
		||||
@@ -2040,7 +2263,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		int ret;
 | 
			
		||||
 | 
			
		||||
		if (!ecdsa_doit[j]) continue; /* Ignore Curve */ 
 | 
			
		||||
		ecdsa[j] = EC_KEY_new();
 | 
			
		||||
		ecdsa[j] = EC_KEY_new_by_curve_name(test_curves[j]);
 | 
			
		||||
		if (ecdsa[j] == NULL) 
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"ECDSA failure.\n");
 | 
			
		||||
@@ -2049,100 +2272,89 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			} 
 | 
			
		||||
		else 
 | 
			
		||||
			{
 | 
			
		||||
			ecdsa[j]->group = EC_GROUP_new_by_nid(test_curves[j]);
 | 
			
		||||
			/* Could not obtain group information */
 | 
			
		||||
			if (ecdsa[j]->group == NULL) 
 | 
			
		||||
#if 1
 | 
			
		||||
			EC_KEY_precompute_mult(ecdsa[j], NULL);
 | 
			
		||||
#endif
 | 
			
		||||
			/* Perform ECDSA signature test */
 | 
			
		||||
			EC_KEY_generate_key(ecdsa[j]);
 | 
			
		||||
			ret = ECDSA_sign(0, buf, 20, ecdsasig, 
 | 
			
		||||
				&ecdsasiglen, ecdsa[j]);
 | 
			
		||||
			if (ret == 0) 
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"ECDSA failure.Could not obtain group information\n");
 | 
			
		||||
				BIO_printf(bio_err,"ECDSA sign failure.  No ECDSA sign will be done.\n");
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				rsa_count=1;
 | 
			
		||||
				} 
 | 
			
		||||
			else 
 | 
			
		||||
				{
 | 
			
		||||
#if 1
 | 
			
		||||
				EC_GROUP_precompute_mult(ecdsa[j]->group, NULL);
 | 
			
		||||
#endif
 | 
			
		||||
				/* Perform ECDSA signature test */
 | 
			
		||||
				EC_KEY_generate_key(ecdsa[j]);
 | 
			
		||||
				ret = ECDSA_sign(0, buf, 20, ecdsasig, 
 | 
			
		||||
					&ecdsasiglen, ecdsa[j]);
 | 
			
		||||
				if (ret == 0) 
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,"ECDSA sign failure.  No ECDSA sign will be done.\n");
 | 
			
		||||
					ERR_print_errors(bio_err);
 | 
			
		||||
					rsa_count=1;
 | 
			
		||||
					} 
 | 
			
		||||
				else 
 | 
			
		||||
					{
 | 
			
		||||
					pkey_print_message("sign","ecdsa",
 | 
			
		||||
						ecdsa_c[j][0], 
 | 
			
		||||
						test_curves_bits[j],
 | 
			
		||||
						ECDSA_SECONDS);
 | 
			
		||||
 | 
			
		||||
					Time_F(START);
 | 
			
		||||
					for (count=0,run=1; COND(ecdsa_c[j][0]);
 | 
			
		||||
						count++) 
 | 
			
		||||
						{
 | 
			
		||||
						ret=ECDSA_sign(0, buf, 20, 
 | 
			
		||||
							ecdsasig, &ecdsasiglen,
 | 
			
		||||
							ecdsa[j]);
 | 
			
		||||
						if (ret == 0) 
 | 
			
		||||
							{
 | 
			
		||||
							BIO_printf(bio_err, "ECDSA sign failure\n");
 | 
			
		||||
							ERR_print_errors(bio_err);
 | 
			
		||||
							count=1;
 | 
			
		||||
							break;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					d=Time_F(STOP);
 | 
			
		||||
 | 
			
		||||
					BIO_printf(bio_err, mr ? "+R5:%ld:%d:%.2f\n" :
 | 
			
		||||
						"%ld %d bit ECDSA signs in %.2fs \n", 
 | 
			
		||||
						count, test_curves_bits[j], d);
 | 
			
		||||
					ecdsa_results[j][0]=d/(double)count;
 | 
			
		||||
					rsa_count=count;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				/* Perform ECDSA verification test */
 | 
			
		||||
				ret=ECDSA_verify(0, buf, 20, ecdsasig, 
 | 
			
		||||
					ecdsasiglen, ecdsa[j]);
 | 
			
		||||
				if (ret != 1) 
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,"ECDSA verify failure.  No ECDSA verify will be done.\n");
 | 
			
		||||
					ERR_print_errors(bio_err);
 | 
			
		||||
					ecdsa_doit[j] = 0;
 | 
			
		||||
					} 
 | 
			
		||||
				else 
 | 
			
		||||
					{
 | 
			
		||||
					pkey_print_message("verify","ecdsa",
 | 
			
		||||
					ecdsa_c[j][1],
 | 
			
		||||
				pkey_print_message("sign","ecdsa",
 | 
			
		||||
					ecdsa_c[j][0], 
 | 
			
		||||
					test_curves_bits[j],
 | 
			
		||||
					ECDSA_SECONDS);
 | 
			
		||||
					Time_F(START);
 | 
			
		||||
					for (count=0,run=1; COND(ecdsa_c[j][1]); count++) 
 | 
			
		||||
						{
 | 
			
		||||
						ret=ECDSA_verify(0, buf, 20, ecdsasig, ecdsasiglen, ecdsa[j]);
 | 
			
		||||
						if (ret != 1) 
 | 
			
		||||
							{
 | 
			
		||||
							BIO_printf(bio_err, "ECDSA verify failure\n");
 | 
			
		||||
							ERR_print_errors(bio_err);
 | 
			
		||||
							count=1;
 | 
			
		||||
							break;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					d=Time_F(STOP);
 | 
			
		||||
					BIO_printf(bio_err, mr? "+R6:%ld:%d:%.2f\n"
 | 
			
		||||
							: "%ld %d bit ECDSA verify in %.2fs\n",
 | 
			
		||||
					count, test_curves_bits[j], d);
 | 
			
		||||
					ecdsa_results[j][1]=d/(double)count;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				if (rsa_count <= 1) 
 | 
			
		||||
				Time_F(START);
 | 
			
		||||
				for (count=0,run=1; COND(ecdsa_c[j][0]);
 | 
			
		||||
					count++) 
 | 
			
		||||
					{
 | 
			
		||||
					/* if longer than 10s, don't do any more */
 | 
			
		||||
					for (j++; j<EC_NUM; j++)
 | 
			
		||||
					ecdsa_doit[j]=0;
 | 
			
		||||
					ret=ECDSA_sign(0, buf, 20, 
 | 
			
		||||
						ecdsasig, &ecdsasiglen,
 | 
			
		||||
						ecdsa[j]);
 | 
			
		||||
					if (ret == 0) 
 | 
			
		||||
						{
 | 
			
		||||
						BIO_printf(bio_err, "ECDSA sign failure\n");
 | 
			
		||||
						ERR_print_errors(bio_err);
 | 
			
		||||
						count=1;
 | 
			
		||||
						break;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				d=Time_F(STOP);
 | 
			
		||||
 | 
			
		||||
				BIO_printf(bio_err, mr ? "+R5:%ld:%d:%.2f\n" :
 | 
			
		||||
					"%ld %d bit ECDSA signs in %.2fs \n", 
 | 
			
		||||
					count, test_curves_bits[j], d);
 | 
			
		||||
				ecdsa_results[j][0]=d/(double)count;
 | 
			
		||||
				rsa_count=count;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			/* Perform ECDSA verification test */
 | 
			
		||||
			ret=ECDSA_verify(0, buf, 20, ecdsasig, 
 | 
			
		||||
				ecdsasiglen, ecdsa[j]);
 | 
			
		||||
			if (ret != 1) 
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"ECDSA verify failure.  No ECDSA verify will be done.\n");
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				ecdsa_doit[j] = 0;
 | 
			
		||||
				} 
 | 
			
		||||
			else 
 | 
			
		||||
				{
 | 
			
		||||
				pkey_print_message("verify","ecdsa",
 | 
			
		||||
				ecdsa_c[j][1],
 | 
			
		||||
				test_curves_bits[j],
 | 
			
		||||
				ECDSA_SECONDS);
 | 
			
		||||
				Time_F(START);
 | 
			
		||||
				for (count=0,run=1; COND(ecdsa_c[j][1]); count++) 
 | 
			
		||||
					{
 | 
			
		||||
					ret=ECDSA_verify(0, buf, 20, ecdsasig, ecdsasiglen, ecdsa[j]);
 | 
			
		||||
					if (ret != 1) 
 | 
			
		||||
						{
 | 
			
		||||
						BIO_printf(bio_err, "ECDSA verify failure\n");
 | 
			
		||||
						ERR_print_errors(bio_err);
 | 
			
		||||
						count=1;
 | 
			
		||||
						break;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				d=Time_F(STOP);
 | 
			
		||||
				BIO_printf(bio_err, mr? "+R6:%ld:%d:%.2f\n"
 | 
			
		||||
						: "%ld %d bit ECDSA verify in %.2fs\n",
 | 
			
		||||
				count, test_curves_bits[j], d);
 | 
			
		||||
				ecdsa_results[j][1]=d/(double)count;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			if (rsa_count <= 1) 
 | 
			
		||||
				{
 | 
			
		||||
				/* if longer than 10s, don't do any more */
 | 
			
		||||
				for (j++; j<EC_NUM; j++)
 | 
			
		||||
				ecdsa_doit[j]=0;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -2158,8 +2370,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	for (j=0; j<EC_NUM; j++)
 | 
			
		||||
		{
 | 
			
		||||
		if (!ecdh_doit[j]) continue;
 | 
			
		||||
		ecdh_a[j] = EC_KEY_new();
 | 
			
		||||
		ecdh_b[j] = EC_KEY_new();
 | 
			
		||||
		ecdh_a[j] = EC_KEY_new_by_curve_name(test_curves[j]);
 | 
			
		||||
		ecdh_b[j] = EC_KEY_new_by_curve_name(test_curves[j]);
 | 
			
		||||
		if ((ecdh_a[j] == NULL) || (ecdh_b[j] == NULL))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"ECDH failure.\n");
 | 
			
		||||
@@ -2168,90 +2380,79 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			ecdh_a[j]->group = EC_GROUP_new_by_nid(test_curves[j]);
 | 
			
		||||
			if (ecdh_a[j]->group == NULL)
 | 
			
		||||
			/* generate two ECDH key pairs */
 | 
			
		||||
			if (!EC_KEY_generate_key(ecdh_a[j]) ||
 | 
			
		||||
				!EC_KEY_generate_key(ecdh_b[j]))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"ECDH failure.\n");
 | 
			
		||||
				BIO_printf(bio_err,"ECDH key generation failure.\n");
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				rsa_count=1;
 | 
			
		||||
				rsa_count=1;		
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				ecdh_b[j]->group = EC_GROUP_dup(ecdh_a[j]->group);
 | 
			
		||||
 | 
			
		||||
				/* generate two ECDH key pairs */
 | 
			
		||||
				if (!EC_KEY_generate_key(ecdh_a[j]) ||
 | 
			
		||||
					!EC_KEY_generate_key(ecdh_b[j]))
 | 
			
		||||
				/* If field size is not more than 24 octets, then use SHA-1 hash of result;
 | 
			
		||||
				 * otherwise, use result (see section 4.8 of draft-ietf-tls-ecc-03.txt).
 | 
			
		||||
				 */
 | 
			
		||||
				int field_size, outlen;
 | 
			
		||||
				void *(*kdf)(const void *in, size_t inlen, void *out, size_t *xoutlen);
 | 
			
		||||
				field_size = EC_GROUP_get_degree(EC_KEY_get0_group(ecdh_a[j]));
 | 
			
		||||
				if (field_size <= 24 * 8)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,"ECDH key generation failure.\n");
 | 
			
		||||
					ERR_print_errors(bio_err);
 | 
			
		||||
					rsa_count=1;		
 | 
			
		||||
					outlen = KDF1_SHA1_len;
 | 
			
		||||
					kdf = KDF1_SHA1;
 | 
			
		||||
					}
 | 
			
		||||
				else
 | 
			
		||||
					{
 | 
			
		||||
					/* If field size is not more than 24 octets, then use SHA-1 hash of result;
 | 
			
		||||
					 * otherwise, use result (see section 4.8 of draft-ietf-tls-ecc-03.txt).
 | 
			
		||||
					 */
 | 
			
		||||
					int field_size, outlen;
 | 
			
		||||
					void *(*kdf)(const void *in, size_t inlen, void *out, size_t *xoutlen);
 | 
			
		||||
					field_size = EC_GROUP_get_degree(ecdh_a[j]->group);
 | 
			
		||||
					if (field_size <= 24 * 8)
 | 
			
		||||
						{
 | 
			
		||||
						outlen = KDF1_SHA1_len;
 | 
			
		||||
						kdf = KDF1_SHA1;
 | 
			
		||||
						}
 | 
			
		||||
					else
 | 
			
		||||
						{
 | 
			
		||||
						outlen = (field_size+7)/8;
 | 
			
		||||
						kdf = NULL;
 | 
			
		||||
						}
 | 
			
		||||
					secret_size_a = ECDH_compute_key(secret_a, outlen,
 | 
			
		||||
						ecdh_b[j]->pub_key,
 | 
			
		||||
						ecdh_a[j], kdf);
 | 
			
		||||
					secret_size_b = ECDH_compute_key(secret_b, outlen,
 | 
			
		||||
						ecdh_a[j]->pub_key,
 | 
			
		||||
						ecdh_b[j], kdf);
 | 
			
		||||
					if (secret_size_a != secret_size_b) 
 | 
			
		||||
						ecdh_checks = 0;
 | 
			
		||||
					else
 | 
			
		||||
						ecdh_checks = 1;
 | 
			
		||||
 | 
			
		||||
					for (secret_idx = 0; 
 | 
			
		||||
					    (secret_idx < secret_size_a)
 | 
			
		||||
						&& (ecdh_checks == 1);
 | 
			
		||||
					    secret_idx++)
 | 
			
		||||
						{
 | 
			
		||||
						if (secret_a[secret_idx] != secret_b[secret_idx])
 | 
			
		||||
						ecdh_checks = 0;
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
					if (ecdh_checks == 0)
 | 
			
		||||
						{
 | 
			
		||||
						BIO_printf(bio_err,"ECDH computations don't match.\n");
 | 
			
		||||
						ERR_print_errors(bio_err);
 | 
			
		||||
						rsa_count=1;		
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
					pkey_print_message("","ecdh",
 | 
			
		||||
					ecdh_c[j][0], 
 | 
			
		||||
					test_curves_bits[j],
 | 
			
		||||
					ECDH_SECONDS);
 | 
			
		||||
					Time_F(START);
 | 
			
		||||
					for (count=0,run=1; COND(ecdh_c[j][0]); count++)
 | 
			
		||||
						{
 | 
			
		||||
						ECDH_compute_key(secret_a, outlen,
 | 
			
		||||
						ecdh_b[j]->pub_key,
 | 
			
		||||
						ecdh_a[j], kdf);
 | 
			
		||||
						}
 | 
			
		||||
					d=Time_F(STOP);
 | 
			
		||||
					BIO_printf(bio_err, mr ? "+R7:%ld:%d:%.2f\n" :"%ld %d-bit ECDH ops in %.2fs\n",
 | 
			
		||||
					count, test_curves_bits[j], d);
 | 
			
		||||
					ecdh_results[j][0]=d/(double)count;
 | 
			
		||||
					rsa_count=count;
 | 
			
		||||
					outlen = (field_size+7)/8;
 | 
			
		||||
					kdf = NULL;
 | 
			
		||||
					}
 | 
			
		||||
				secret_size_a = ECDH_compute_key(secret_a, outlen,
 | 
			
		||||
					EC_KEY_get0_public_key(ecdh_b[j]),
 | 
			
		||||
					ecdh_a[j], kdf);
 | 
			
		||||
				secret_size_b = ECDH_compute_key(secret_b, outlen,
 | 
			
		||||
					EC_KEY_get0_public_key(ecdh_a[j]),
 | 
			
		||||
					ecdh_b[j], kdf);
 | 
			
		||||
				if (secret_size_a != secret_size_b) 
 | 
			
		||||
					ecdh_checks = 0;
 | 
			
		||||
				else
 | 
			
		||||
					ecdh_checks = 1;
 | 
			
		||||
 | 
			
		||||
				for (secret_idx = 0; 
 | 
			
		||||
				    (secret_idx < secret_size_a)
 | 
			
		||||
					&& (ecdh_checks == 1);
 | 
			
		||||
				    secret_idx++)
 | 
			
		||||
					{
 | 
			
		||||
					if (secret_a[secret_idx] != secret_b[secret_idx])
 | 
			
		||||
					ecdh_checks = 0;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				if (ecdh_checks == 0)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,"ECDH computations don't match.\n");
 | 
			
		||||
					ERR_print_errors(bio_err);
 | 
			
		||||
					rsa_count=1;		
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				pkey_print_message("","ecdh",
 | 
			
		||||
				ecdh_c[j][0], 
 | 
			
		||||
				test_curves_bits[j],
 | 
			
		||||
				ECDH_SECONDS);
 | 
			
		||||
				Time_F(START);
 | 
			
		||||
				for (count=0,run=1; COND(ecdh_c[j][0]); count++)
 | 
			
		||||
					{
 | 
			
		||||
					ECDH_compute_key(secret_a, outlen,
 | 
			
		||||
					EC_KEY_get0_public_key(ecdh_b[j]),
 | 
			
		||||
					ecdh_a[j], kdf);
 | 
			
		||||
					}
 | 
			
		||||
				d=Time_F(STOP);
 | 
			
		||||
				BIO_printf(bio_err, mr ? "+R7:%ld:%d:%.2f\n" :"%ld %d-bit ECDH ops in %.2fs\n",
 | 
			
		||||
				count, test_curves_bits[j], d);
 | 
			
		||||
				ecdh_results[j][0]=d/(double)count;
 | 
			
		||||
				rsa_count=count;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		if (rsa_count <= 1)
 | 
			
		||||
			{
 | 
			
		||||
			/* if longer than 10s, don't do any more */
 | 
			
		||||
@@ -2365,7 +2566,7 @@ show_res:
 | 
			
		||||
				k,rsa_bits[k],rsa_results[k][0],
 | 
			
		||||
				rsa_results[k][1]);
 | 
			
		||||
		else
 | 
			
		||||
			fprintf(stdout,"rsa %4u bits %8.4fs %8.4fs %8.1f %8.1f\n",
 | 
			
		||||
			fprintf(stdout,"rsa %4u bits %8.6fs %8.6fs %8.1f %8.1f\n",
 | 
			
		||||
				rsa_bits[k],rsa_results[k][0],rsa_results[k][1],
 | 
			
		||||
				1.0/rsa_results[k][0],1.0/rsa_results[k][1]);
 | 
			
		||||
		}
 | 
			
		||||
@@ -2384,7 +2585,7 @@ show_res:
 | 
			
		||||
			fprintf(stdout,"+F3:%u:%u:%f:%f\n",
 | 
			
		||||
				k,dsa_bits[k],dsa_results[k][0],dsa_results[k][1]);
 | 
			
		||||
		else
 | 
			
		||||
			fprintf(stdout,"dsa %4u bits %8.4fs %8.4fs %8.1f %8.1f\n",
 | 
			
		||||
			fprintf(stdout,"dsa %4u bits %8.6fs %8.6fs %8.1f %8.1f\n",
 | 
			
		||||
				dsa_bits[k],dsa_results[k][0],dsa_results[k][1],
 | 
			
		||||
				1.0/dsa_results[k][0],1.0/dsa_results[k][1]);
 | 
			
		||||
		}
 | 
			
		||||
@@ -2516,6 +2717,7 @@ static void print_result(int alg,int run_no,int count,double time_used)
 | 
			
		||||
	results[alg][run_no]=((double)count)/time_used*lengths[run_no];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_FORK
 | 
			
		||||
static char *sstrsep(char **string, const char *delim)
 | 
			
		||||
    {
 | 
			
		||||
    char isdelim[256];
 | 
			
		||||
@@ -2547,7 +2749,6 @@ static char *sstrsep(char **string, const char *delim)
 | 
			
		||||
    return token;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_FORK
 | 
			
		||||
static int do_multi(int multi)
 | 
			
		||||
	{
 | 
			
		||||
	int n;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								apps/x509.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								apps/x509.c
									
									
									
									
									
								
							@@ -73,8 +73,12 @@
 | 
			
		||||
#include <openssl/x509v3.h>
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#include <openssl/rsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG x509_main
 | 
			
		||||
@@ -110,6 +114,7 @@ static const char *x509_usage[]={
 | 
			
		||||
" -alias          - output certificate alias\n",
 | 
			
		||||
" -noout          - no certificate output\n",
 | 
			
		||||
" -ocspid         - print OCSP hash values for the subject name and public key\n",
 | 
			
		||||
" -ocspurl        - print OCSP Responder URL(s)\n",
 | 
			
		||||
" -trustout       - output a \"trusted\" certificate\n",
 | 
			
		||||
" -clrtrust       - clear all trusted purposes\n",
 | 
			
		||||
" -clrreject      - clear all rejected purposes\n",
 | 
			
		||||
@@ -175,6 +180,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int next_serial=0;
 | 
			
		||||
	int subject_hash=0,issuer_hash=0,ocspid=0;
 | 
			
		||||
	int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0;
 | 
			
		||||
	int ocsp_uri=0;
 | 
			
		||||
	int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0;
 | 
			
		||||
	int C=0;
 | 
			
		||||
	int x509req=0,days=DEF_DAYS,modulus=0,pubkey=0;
 | 
			
		||||
@@ -374,6 +380,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			C= ++num;
 | 
			
		||||
		else if (strcmp(*argv,"-email") == 0)
 | 
			
		||||
			email= ++num;
 | 
			
		||||
		else if (strcmp(*argv,"-ocsp_uri") == 0)
 | 
			
		||||
			ocsp_uri= ++num;
 | 
			
		||||
		else if (strcmp(*argv,"-serial") == 0)
 | 
			
		||||
			serial= ++num;
 | 
			
		||||
		else if (strcmp(*argv,"-next_serial") == 0)
 | 
			
		||||
@@ -727,11 +735,14 @@ bad:
 | 
			
		||||
				ASN1_INTEGER_free(ser);
 | 
			
		||||
				BIO_puts(out, "\n");
 | 
			
		||||
				}
 | 
			
		||||
			else if (email == i) 
 | 
			
		||||
			else if ((email == i) || (ocsp_uri == i))
 | 
			
		||||
				{
 | 
			
		||||
				int j;
 | 
			
		||||
				STACK *emlst;
 | 
			
		||||
				emlst = X509_get1_email(x);
 | 
			
		||||
				if (email == i)
 | 
			
		||||
					emlst = X509_get1_email(x);
 | 
			
		||||
				else
 | 
			
		||||
					emlst = X509_get1_ocsp(x);
 | 
			
		||||
				for (j = 0; j < sk_num(emlst); j++)
 | 
			
		||||
					BIO_printf(STDout, "%s\n", sk_value(emlst, j));
 | 
			
		||||
				X509_email_free(emlst);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
Microsoft (R) C/C++ Optimizing Compiler Version 8.00c
 | 
			
		||||
 | 
			
		||||
Compile with /O2 chokes the compiler on these files
 | 
			
		||||
 | 
			
		||||
crypto\md\md5_dgst.c		warning '@(#)reg86.c:1.26', line 1110
 | 
			
		||||
crypto\des\ofb64ede.c		warning '@(#)grammar.c:1.147', line 168
 | 
			
		||||
crypto\des\ofb64enc.c		warning '@(#)grammar.c:1.147', line 168
 | 
			
		||||
crypto\des\qud_cksm.c		warning '@(#)grammar.c:1.147', line 168
 | 
			
		||||
crypto\rc2\rc2ofb64.c		warning '@(#)grammar.c:1.147', line 168
 | 
			
		||||
crypto\objects\obj_dat.c	warning	'@(#)grammar.c:1.147', line 168
 | 
			
		||||
				fatal	'@(#)grammar.c:1.147', line 168
 | 
			
		||||
crypto\objects\obj_lib.c	warning	'@(#)grammar.c:1.147', line 168
 | 
			
		||||
				fatal	'@(#)grammar.c:1.147', line 168
 | 
			
		||||
ssl\ssl_auth.c			warning	'@(#)grammar.c:1.147', line 168
 | 
			
		||||
				fatal	'@(#)grammar.c:1.147', line 168
 | 
			
		||||
 | 
			
		||||
Turning on /G3 with build flags that worked fine for /G2 came up with
 | 
			
		||||
divide by zero errors in 'normal' code in speed.c :-(
 | 
			
		||||
							
								
								
									
										4
									
								
								certs/README.RootCerts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								certs/README.RootCerts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
The OpenSSL project does not (any longer) include root CA certificates.
 | 
			
		||||
 | 
			
		||||
Please check out the FAQ:
 | 
			
		||||
  * How can I set up a bundle of commercial root CA certificates?
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
issuer= CN=5R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
 | 
			
		||||
notBefore=Mar 22 08:55:51 2000 GMT
 | 
			
		||||
notAfter=Mar 22 08:55:51 2005 GMT
 | 
			
		||||
subject= CN=5R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICaDCCAdSgAwIBAgIDDIOqMAoGBiskAwMBAgUAMG8xCzAJBgNVBAYTAkRFMT0w
 | 
			
		||||
OwYDVQQKFDRSZWd1bGllcnVuZ3NiZWjIb3JkZSBmyHVyIFRlbGVrb21tdW5pa2F0
 | 
			
		||||
aW9uIHVuZCBQb3N0MSEwDAYHAoIGAQoHFBMBMTARBgNVBAMUCjVSLUNBIDE6UE4w
 | 
			
		||||
IhgPMjAwMDAzMjIwODU1NTFaGA8yMDA1MDMyMjA4NTU1MVowbzELMAkGA1UEBhMC
 | 
			
		||||
REUxPTA7BgNVBAoUNFJlZ3VsaWVydW5nc2JlaMhvcmRlIGbIdXIgVGVsZWtvbW11
 | 
			
		||||
bmlrYXRpb24gdW5kIFBvc3QxITAMBgcCggYBCgcUEwExMBEGA1UEAxQKNVItQ0Eg
 | 
			
		||||
MTpQTjCBoTANBgkqhkiG9w0BAQEFAAOBjwAwgYsCgYEAih5BUycfBpqKhU8RDsaS
 | 
			
		||||
vV5AtzWeXQRColL9CH3t0DKnhjKAlJ8iccFtJNv+d3bh8bb9sh0maRSo647xP7hs
 | 
			
		||||
HTjKgTE4zM5BYNfXvST79OtcMgAzrnDiGjQIIWv8xbfV1MqxxdtZJygrwzRMb9jG
 | 
			
		||||
CAGoJEymoyzAMNG7tSdBWnUCBQDAAAABoxIwEDAOBgNVHQ8BAf8EBAMCAQYwCgYG
 | 
			
		||||
KyQDAwECBQADgYEAOaK8ihVSBUcL2IdVBxZYYUKwMz5m7H3zqhN8W9w+iafWudH6
 | 
			
		||||
b+aahkbENEwzg3C3v5g8nze7v7ssacQze657LHjP+e7ksUDIgcS4R1pU2eN16bjS
 | 
			
		||||
P/qGPF3rhrIEHoK5nJULkjkZYTtNiOvmQ/+G70TXDi3Os/TwLlWRvu+7YLM=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
issuer= CN=6R-Ca 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
 | 
			
		||||
notBefore=Feb  1 09:52:17 2001 GMT
 | 
			
		||||
notAfter=Jun  1 09:52:17 2005 GMT
 | 
			
		||||
subject= CN=6R-Ca 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICaDCCAdSgAwIBAgIDMtGNMAoGBiskAwMBAgUAMG8xCzAJBgNVBAYTAkRFMT0w
 | 
			
		||||
OwYDVQQKFDRSZWd1bGllcnVuZ3NiZWjIb3JkZSBmyHVyIFRlbGVrb21tdW5pa2F0
 | 
			
		||||
aW9uIHVuZCBQb3N0MSEwDAYHAoIGAQoHFBMBMTARBgNVBAMUCjZSLUNhIDE6UE4w
 | 
			
		||||
IhgPMjAwMTAyMDEwOTUyMTdaGA8yMDA1MDYwMTA5NTIxN1owbzELMAkGA1UEBhMC
 | 
			
		||||
REUxPTA7BgNVBAoUNFJlZ3VsaWVydW5nc2JlaMhvcmRlIGbIdXIgVGVsZWtvbW11
 | 
			
		||||
bmlrYXRpb24gdW5kIFBvc3QxITAMBgcCggYBCgcUEwExMBEGA1UEAxQKNlItQ2Eg
 | 
			
		||||
MTpQTjCBoTANBgkqhkiG9w0BAQEFAAOBjwAwgYsCgYEAg6KrFSTNXKqe+2GKGeW2
 | 
			
		||||
wTmbVeflNkp5H/YxA9K1zmEn5XjKm0S0jH4Wfms6ipPlURVaFwTfnB1s++AnJAWf
 | 
			
		||||
mayaE9BP/pdIY6WtZGgW6aZc32VDMCMKPWyBNyagsJVDmzlakIA5cXBVa7Xqqd3P
 | 
			
		||||
ew8i2feMnQXcqHfDv02CW88CBQDAAAABoxIwEDAOBgNVHQ8BAf8EBAMCAQYwCgYG
 | 
			
		||||
KyQDAwECBQADgYEAOkqkUwdaTCt8wcJLA2zLuOwL5ADHMWLhv6gr5zEF+VckA6qe
 | 
			
		||||
IVLVf8e7fYlRmzQd+5OJcGglCQJLGT+ZplI3Mjnrd4plkoTNKV4iOzBcvJD7K4tn
 | 
			
		||||
XPvs9wCFcC7QU7PLvc1FDsAlr7e4wyefZRDL+wbqNfI7QZTSF1ubLd9AzeQ=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN
 | 
			
		||||
BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w
 | 
			
		||||
HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0
 | 
			
		||||
IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL
 | 
			
		||||
MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls
 | 
			
		||||
aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww
 | 
			
		||||
GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL
 | 
			
		||||
ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc
 | 
			
		||||
zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0
 | 
			
		||||
YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq
 | 
			
		||||
hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF
 | 
			
		||||
cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W
 | 
			
		||||
YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
Tims test GCI CA
 | 
			
		||||
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD
 | 
			
		||||
VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
 | 
			
		||||
cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD
 | 
			
		||||
cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow
 | 
			
		||||
gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC
 | 
			
		||||
cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl
 | 
			
		||||
dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN
 | 
			
		||||
AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw
 | 
			
		||||
OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF
 | 
			
		||||
AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA
 | 
			
		||||
TfdbFZtAAD2Hx9jUtY3tfdrJOb8= 
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD
 | 
			
		||||
VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
 | 
			
		||||
cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O
 | 
			
		||||
IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB
 | 
			
		||||
VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1
 | 
			
		||||
NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
 | 
			
		||||
EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT
 | 
			
		||||
I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta
 | 
			
		||||
RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ
 | 
			
		||||
KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR
 | 
			
		||||
Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG
 | 
			
		||||
9w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4
 | 
			
		||||
WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
subject=/O=VeriSign, Inc/OU=www.verisign.com/repository/TestCPS Incorp. By Ref. Liab. LTD./OU=For VeriSign authorized testing only. No assurances (C)VS1997
 | 
			
		||||
notBefore=Mar  4 00:00:00 1997 GMT
 | 
			
		||||
notAfter=Mar  4 23:59:59 2025 GMT
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICTTCCAfcCEEdoCqpuXxnoK27q7d58Qc4wDQYJKoZIhvcNAQEEBQAwgakxFjAU
 | 
			
		||||
BgNVBAoTDVZlcmlTaWduLCBJbmMxRzBFBgNVBAsTPnd3dy52ZXJpc2lnbi5jb20v
 | 
			
		||||
cmVwb3NpdG9yeS9UZXN0Q1BTIEluY29ycC4gQnkgUmVmLiBMaWFiLiBMVEQuMUYw
 | 
			
		||||
RAYDVQQLEz1Gb3IgVmVyaVNpZ24gYXV0aG9yaXplZCB0ZXN0aW5nIG9ubHkuIE5v
 | 
			
		||||
IGFzc3VyYW5jZXMgKEMpVlMxOTk3MB4XDTk3MDMwNDAwMDAwMFoXDTI1MDMwNDIz
 | 
			
		||||
NTk1OVowgakxFjAUBgNVBAoTDVZlcmlTaWduLCBJbmMxRzBFBgNVBAsTPnd3dy52
 | 
			
		||||
ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9UZXN0Q1BTIEluY29ycC4gQnkgUmVmLiBM
 | 
			
		||||
aWFiLiBMVEQuMUYwRAYDVQQLEz1Gb3IgVmVyaVNpZ24gYXV0aG9yaXplZCB0ZXN0
 | 
			
		||||
aW5nIG9ubHkuIE5vIGFzc3VyYW5jZXMgKEMpVlMxOTk3MFwwDQYJKoZIhvcNAQEB
 | 
			
		||||
BQADSwAwSAJBAMak6xImJx44jMKcbkACy5/CyMA2fqXK4PlzTtCxRq5tFkDzne7s
 | 
			
		||||
cI8oFK/J+gFZNE3bjidDxf07O3JOYG9RGx8CAwEAATANBgkqhkiG9w0BAQQFAANB
 | 
			
		||||
ADT523tENOKrEheZFpsJx1UUjPrG7TwYc/C4NBHrZI4gZJcKVFIfNulftVS6UMYW
 | 
			
		||||
ToLEMaUojc3DuNXHG21PDG8=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
			
		||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9CYW5rRW5n
 | 
			
		||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
			
		||||
aW9uMRMwEQYDVQQDEwpiYW5rZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBiYW5r
 | 
			
		||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
			
		||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
			
		||||
BAoTD0JhbmtFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
			
		||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmJhbmtlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
			
		||||
CQEWEWNhQGJhbmtlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
 | 
			
		||||
CgKCAQEA14LoTUAl1/hEy+Kh1kLHiBdW2zD3V4IhM7xxTVKsYsIH56nr69ATTIxU
 | 
			
		||||
P36eRzeZ137qt1AxHFjDCidk3m1Ul6l59ProPexdslLLM2npM3f2cteg+toyiYiS
 | 
			
		||||
EJKjyzIu1xF1j9qzGkymSY/4DsXLZNk9FaczxMk/Ooc6Os1M3AverL4VG4rYIb6f
 | 
			
		||||
eR32cIKJ9Q1fGuyKk7ipq1XQfPW8a8TgZdbHbe7U9Gk3iasGMHHvpR9Ep3mGbgdT
 | 
			
		||||
uQ98SBEuIwe1BUCGg/MXpVy48MNXfAMotBgGw4pl9yqSjMni2FB+E9Q9DHFs2RgX
 | 
			
		||||
MqzKuo8zcPxKx2kZ6Arj8+27dw2clQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
 | 
			
		||||
CSqGSIb3DQEBBQUAA4IBAQBauupHX9EhpC/r57d6b5kkeWvognxIP9//TO4iw3qb
 | 
			
		||||
zIXEkPXmJmwVzlzoKJWqiya+aw19SP0+G6CzsFOBo/9ehmz+hZ8bhYX4MjlWzX5u
 | 
			
		||||
Tnkhz172j9fOBUmrTVPkcRIs6zjCD5PQAGoBPP1/Zdy2N36lZ0U7lg07Opirj/yJ
 | 
			
		||||
PSJeM2j0fwIFAroiVckvdT0BVwB6S/cPaAQGPghbbr1YGSmYrMriSv825ILJUfxz
 | 
			
		||||
rJYunGR9FiY9Ob7+jwJwiZMS4CxSPktutxr/3hOvr1+ALS7IcVakhhA3PuZAJbdH
 | 
			
		||||
FRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
			
		||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9DZXJ0RW5n
 | 
			
		||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
			
		||||
aW9uMRMwEQYDVQQDEwpjZXJ0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBjZXJ0
 | 
			
		||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
			
		||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
			
		||||
BAoTD0NlcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
			
		||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmNlcnRlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
			
		||||
CQEWEWNhQGNlcnRlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
 | 
			
		||||
CgKCAQEA7aTXURShaeVt9u/dP3Q2dVib3jTCZvEyc6yfpGgaYWewXWuP4HOSfI4h
 | 
			
		||||
GZblbpl+dzJc6RjhR+pguIRtbT5FJB8SJGjRqoujBEOQOxtVtc2fjM9Dqh0iOvMW
 | 
			
		||||
WS6buxHG55GVrHAQaO5HXEScKQBa9ZyNmpSXPTEBrDMej1OAGOkc524/TZrgFPF4
 | 
			
		||||
AiJLLkxCcP8NuzUKlW3WzNMSSoCtjkUKy4wjSLlAWCFM0T9Df6/+Z8ZUQTzHoKCD
 | 
			
		||||
ncH5Qnynd7DlOwKQ2JwwxRhYGiGVTUN0GUq7qA11kW3+vnbFesKQXoF6o2PVx9s2
 | 
			
		||||
YXviI2NXXUjZ0pVnsnFCc45Pm8XojwIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
 | 
			
		||||
CSqGSIb3DQEBBQUAA4IBAQBP/aHOKJ00Akzc9HWM1X30hlWZFBaQi4pqD4Uhk8+p
 | 
			
		||||
KzzwFP5DRLBOz8TYBbtdXrS6hxVMr2sqWmhVkuyepWhHZazKGyHY/y0FbOXsewAV
 | 
			
		||||
1QxxSyx7ve89pCKv4/w0rQcP916iHc8Y/TCpmz7eITa3GId+8H/XTaBi8GBp9X9O
 | 
			
		||||
w8m25FmEB1NT+eJwefvfdKowjy4tSorKdW/eJspxNuTSRGmUy8G71W5dYvgpAlx6
 | 
			
		||||
mdnHyzxEGvRYNNI2bS0ifXgbEFNWqSas9q34ea5KOpkJu8T/KyXfSb6rPOsBSb0t
 | 
			
		||||
wMowwGtCVH2C4Lw/8zo0EjhMpTOsPaub408PrZ+NQ2bl
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,34 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIIF3TCCA8WgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
			
		||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9Gb3J0RW5n
 | 
			
		||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
			
		||||
aW9uMRMwEQYDVQQDEwpmb3J0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBmb3J0
 | 
			
		||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
			
		||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
			
		||||
BAoTD0ZvcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
			
		||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmZvcnRlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
			
		||||
CQEWEWNhQGZvcnRlbmdpbmUuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
 | 
			
		||||
CgKCAgEAyr7GbpwDxx1v3EYbo0gcO+ligEhlDqG2e7u/AbWGoVAqc8+q6auUJUtz
 | 
			
		||||
4i7oh0yNadu1o9kpXW+znkgO0zlrgjGskqqMO1ooppzTJdFy/P8gR6x1Iuv3kWtX
 | 
			
		||||
OuzwPPEjv09LWlhyJsN+oU4ztTVf07I0Q9zYupcoDQ58XKRheI9KdDB2DYSmxywA
 | 
			
		||||
WSLQwIeG0Qa7gvokeQlpkgkEC7viEecJ3752KXBJHnh7As51mxnlpmG6sDy67Eli
 | 
			
		||||
HDw5tHETRqbtnscGBjskGQBqR5xt7+QnnthZrN8HJHDoa9zgGephwizhkL44lXLF
 | 
			
		||||
YK9W5XhFbblw2c+mAcHkokRiwD7CPeIoyD2a/Jcw3n5hegKTlNhd4BFGVF6JR7gF
 | 
			
		||||
OFk2QfHXit5uthsij9Xhl7WAgQUqLgggD9MphqPf4nY66OZUJV9ZsmB+Qfp8UizB
 | 
			
		||||
0WAOegactKVyRqHtRa+KIEXQXNtZgjcmMk9CYkP0nIbKtgKXaH6+9VMHNOryCnFE
 | 
			
		||||
7pSsuPUkypncFWCHGSeiFO3w4w4J4csltxBADQzxfRu5KZnlToQN7bVpI/Q31tVX
 | 
			
		||||
E5bjrJcq6Oj/OTqZ3ID+OqbkUdAg0ggjRKcTgxnLHd/AbMzJ6PsclDDf7cLs0WSl
 | 
			
		||||
xMxQR/z5bNST1rNtT9rsiv2TOhfvCBxO9AOjBioO8PLO032HTNECAwEAAaMQMA4w
 | 
			
		||||
DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAgEAVyBpPWfT2VOyvVpslGKx
 | 
			
		||||
8h0+CWP8cilygGRtZJ5dAJzc//1REAHdvK+TgZ4Foz3dqHhXI+RNN0FpzuWaYMjW
 | 
			
		||||
ZTS0kAmcOQuGY1Oo4PGlPHI21pNz29oFDTJr0ZmLBJ4JKVsE2soJg55jdk9MZHA7
 | 
			
		||||
K//7HH9RsmrWZOE5DZDlrxp6+naixhMwnlPKKisIy9GNZUPqGdUWABMdB/BUVVNl
 | 
			
		||||
NU5TtWpIXUClMd8a+eoKcItBeYXowkHOBpinPkDX3clFDIUfWiw0Ro08s8SrrFqR
 | 
			
		||||
8Szwbrj52Xv1RM56oGqCjnkvJctxihODV7NcpxoAFjIZokDom0q6zPrrTUsLFQov
 | 
			
		||||
Plovc3w5hmALiDMshaTvE1nm3Psn4yQ+FlRE8epTZrQiIGypZkZC6lcz0mYawueW
 | 
			
		||||
cThYWGFhVG4ktQzOjjNRsNxopW+W7cF1zQTxiWUDnxIKSj7gtdQ2jiubxEEhfVag
 | 
			
		||||
r8DMtAccNVTZVURpGi56TptOOuotrTqqC+2GviW4hlxvdvmuQN0OlXlUwzz2Trxc
 | 
			
		||||
FamNnuA54lZw/8arLtxsFmHrcnPw53+1spumLD0S5UkxHNu40h6LIVpZz3H+0rLz
 | 
			
		||||
uFofTfiyMjcfK2AyHQTgUCbsrvgNuLDQUbyFGVchdFUkhztX3DhEVnxnnrpY4BVj
 | 
			
		||||
QdTqWIvw7lGlSuDCjxEQAOc=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
			
		||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9NYWlsRW5n
 | 
			
		||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
			
		||||
aW9uMRMwEQYDVQQDEwptYWlsZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBtYWls
 | 
			
		||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
			
		||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
			
		||||
BAoTD01haWxFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
			
		||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCm1haWxlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
			
		||||
CQEWEWNhQG1haWxlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
 | 
			
		||||
CgKCAQEAqXmfsU+lx+NFmn6tN17RTOyaddHqLnr/3rzEDIyT9TN+tF9TG7jmK7lJ
 | 
			
		||||
Jrj5arQ3nTFaLF8JuND2U1z/cLPw6/TX+1tE3v3CNUDSjaisyUDiUyp3TE8hMMMz
 | 
			
		||||
zfZQn0JsGgNhhWxqyzjhRQGtKL4+xtn8VsF/8zGgZYke7nlmVKz/FslDFTnNoodL
 | 
			
		||||
BAEGiu9JQS9qqpbSs20NdZ6LXPL2A4iTjnsNFBW3jIMVIn/JVVyaycU7ue2oFviD
 | 
			
		||||
vLNpkVZcR7A+jjIdIumOc5VSF0y7y74cQC5YwkR2mLK7UBYDK6NCY3ta/C4M8NsM
 | 
			
		||||
0FpmvRl0+A1ivZtVwqI98dxDtp7HeQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
 | 
			
		||||
CSqGSIb3DQEBBQUAA4IBAQAjfNn5BCzxylBDakFQGWKE/P43PRibMOEzfd7+DzbY
 | 
			
		||||
WIekoz3i00DwoH3b6j4gwlDJRAOq4dF6/Pt/uBOHDo/op+ef+9ErmKPd+ehXN9h3
 | 
			
		||||
7QbccTgz7DtVwA4iRlDRLru+JuXzT+OsCHuFZMOLJ+KD2JAGh3W68JjdcLkrlcpt
 | 
			
		||||
AU0wc5aOHPPfEBdIah8y8QtNzXRVzoBt8zzvgCARkXxTS2u/9QaXR1hML0JtDgQS
 | 
			
		||||
SdZ6Kd8SN6yzqxD+buYD5sOfJmjBF/n3lqFHNMHnnGXy2TAXZtIAWzffU3A0cGPB
 | 
			
		||||
N6FZ026a86HbF1X4k+xszhbJu/ikczyuWnCJIg3fTYSD
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIID6TCCAtGgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UEBhMCQ0Ex
 | 
			
		||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRowGAYDVQQKExFUcmFkZXJF
 | 
			
		||||
bmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2
 | 
			
		||||
aXNpb24xFTATBgNVBAMTDHRyYWRlcmVuZ2luZTEiMCAGCSqGSIb3DQEJARYTY2FA
 | 
			
		||||
dHJhZGVyZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBa
 | 
			
		||||
MIGuMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8x
 | 
			
		||||
GjAYBgNVBAoTEVRyYWRlckVuZ2luZSBJbmMuMSkwJwYDVQQLEyBDZXJ0aWZpY2F0
 | 
			
		||||
aW9uIEF1dGhvcml0eSBEaXZpc2lvbjEVMBMGA1UEAxMMdHJhZGVyZW5naW5lMSIw
 | 
			
		||||
IAYJKoZIhvcNAQkBFhNjYUB0cmFkZXJlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0B
 | 
			
		||||
AQEFAAOCAQ8AMIIBCgKCAQEAzyX5QE+5SN+zgNn1v3zp9HmP4hQOWW8WuEVItZVP
 | 
			
		||||
9bt/xj5NeJd1kyPL/SqnF2qHcL3o/74r0Ga55aKHniwKYgQTlp5ELGfQ568QQeN9
 | 
			
		||||
xNIHtUXeStI9zCNZyZC+4YqObdMR/ivKA/WsLfUVMl2lV5JzJJz1BOE0gKEYiEyz
 | 
			
		||||
gIq5oLzkP/mOXoHRvWSZD2D0eHYIO7ovV2epVFK7g7p+dC4QoeIUEli+GF/Myg88
 | 
			
		||||
dV/qmi+Sybck2RLPXa8Nh27/ETVQ7kE1Eafmx7EyCqIhG+5lwJAy3HwHUBwAYuzj
 | 
			
		||||
iuZz5lD8aQmr8SKuvy3eOH9SVN5wh3YBlrNGwTStkESVLwIDAQABoxAwDjAMBgNV
 | 
			
		||||
HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAWOPAUhZd3x9EQiFJcuxFTMd9q
 | 
			
		||||
axgcriCzJsM6D96sYGko9xTeLhX/lr1bliVYI5AlupoLXAdMzGHJkOgaTirKjQXr
 | 
			
		||||
F9nymDdUWKe3TmwGob5016nQlH7qRKvGO3hka0rOGRK2U/2JT/4Qp8iH/DFi6cyM
 | 
			
		||||
uP0q8n64SAkxZXLzUuFQXqf7U/SNjzb9XJQEIAdjp7eYd3Qb4jDsDcX0FrKMF1aV
 | 
			
		||||
r0dCDnS7am7WTXPYCDGdSkPgEHEtLYIYH3lZp5sKdVZ9wl4F0WNFkRWRUr7AXPjw
 | 
			
		||||
50uLmUNmKCd8JZLMGA1TRNSTi7U9EcrWt0OkMWm74T2WVnAgNsDv2WrWsGfj
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,59 +0,0 @@
 | 
			
		||||
Certificate:
 | 
			
		||||
    Data:
 | 
			
		||||
        Version: 3 (0x2)
 | 
			
		||||
        Serial Number: 1 (0x1)
 | 
			
		||||
        Signature Algorithm: md5WithRSAEncryption
 | 
			
		||||
        Issuer: O=European ICE-TEL project, OU=V3-Certification Authority
 | 
			
		||||
        Validity
 | 
			
		||||
            Not Before: Apr  2 17:35:53 1997 GMT
 | 
			
		||||
            Not After : Apr  2 17:35:53 1998 GMT
 | 
			
		||||
        Subject: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt
 | 
			
		||||
        Subject Public Key Info:
 | 
			
		||||
            Public Key Algorithm: rsa
 | 
			
		||||
            RSA Public Key: (512 bit)
 | 
			
		||||
                Modulus (512 bit):
 | 
			
		||||
                    00:82:75:ba:f6:d1:60:b5:f9:15:b3:6a:dd:29:8f:
 | 
			
		||||
                    8b:a4:6f:1a:88:e0:50:43:40:0b:79:41:d5:d3:16:
 | 
			
		||||
                    44:7d:74:65:17:42:06:52:0b:e9:50:c8:10:cd:24:
 | 
			
		||||
                    e2:ae:8d:22:30:73:e6:b4:b7:93:1f:e5:6e:a2:ae:
 | 
			
		||||
                    49:11:a5:c9:45
 | 
			
		||||
                Exponent: 65537 (0x10001)
 | 
			
		||||
        X509v3 extensions:
 | 
			
		||||
            X509v3 Authority Key Identifier: 
 | 
			
		||||
                0.........z.."p......e..
 | 
			
		||||
            X509v3 Subject Key Identifier: 
 | 
			
		||||
                ..~r..:..B.44fu......3
 | 
			
		||||
            X509v3 Key Usage: critical
 | 
			
		||||
                ....
 | 
			
		||||
            X509v3 Certificate Policies: critical
 | 
			
		||||
                0.0...*...
 | 
			
		||||
            X509v3 Subject Alternative Name: 
 | 
			
		||||
                0!..secude-support@darmstadt.gmd.de
 | 
			
		||||
            X509v3 Issuer Alternative Name: 
 | 
			
		||||
                0I..ice-tel-ca@darmstadt.gmd.de.*http://www.darmstadt.gmd.de/ice-tel/euroca
 | 
			
		||||
            X509v3 Basic Constraints: critical
 | 
			
		||||
                0....
 | 
			
		||||
            X509v3 CRL Distribution Points: 
 | 
			
		||||
                0200...,.*http://www.darmstadt.gmd.de/ice-tel/euroca
 | 
			
		||||
    Signature Algorithm: md5WithRSAEncryption
 | 
			
		||||
        17:a2:88:b7:99:5a:05:41:e4:13:34:67:e6:1f:3e:26:ec:4b:
 | 
			
		||||
        69:f9:3e:28:22:be:9d:1c:ab:41:6f:0c:00:85:fe:45:74:f6:
 | 
			
		||||
        98:f0:ce:9b:65:53:4a:50:42:c7:d4:92:bd:d7:a2:a8:3d:98:
 | 
			
		||||
        88:73:cd:60:28:79:a3:fc:48:7a
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICzDCCAnagAwIBAgIBATANBgkqhkiG9w0BAQQFADBIMSEwHwYDVQQKExhFdXJv
 | 
			
		||||
cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g
 | 
			
		||||
QXV0aG9yaXR5MB4XDTk3MDQwMjE3MzU1M1oXDTk4MDQwMjE3MzU1M1owXDEhMB8G
 | 
			
		||||
A1UEChMYRXVyb3BlYW4gSUNFLVRFTCBwcm9qZWN0MSMwIQYDVQQLExpWMy1DZXJ0
 | 
			
		||||
aWZpY2F0aW9uIEF1dGhvcml0eTESMBAGA1UEBxMJRGFybXN0YWR0MFkwCgYEVQgB
 | 
			
		||||
AQICAgADSwAwSAJBAIJ1uvbRYLX5FbNq3SmPi6RvGojgUENAC3lB1dMWRH10ZRdC
 | 
			
		||||
BlIL6VDIEM0k4q6NIjBz5rS3kx/lbqKuSRGlyUUCAwEAAaOCATgwggE0MB8GA1Ud
 | 
			
		||||
IwQYMBaAFIr3yNUOx3ro1yJw4AuJ1bbsZbzPMB0GA1UdDgQWBBR+cvL4OoacQog0
 | 
			
		||||
NGZ1w9T80aIRMzAOBgNVHQ8BAf8EBAMCAfYwFAYDVR0gAQH/BAowCDAGBgQqAwQF
 | 
			
		||||
MCoGA1UdEQQjMCGBH3NlY3VkZS1zdXBwb3J0QGRhcm1zdGFkdC5nbWQuZGUwUgYD
 | 
			
		||||
VR0SBEswSYEbaWNlLXRlbC1jYUBkYXJtc3RhZHQuZ21kLmRlhipodHRwOi8vd3d3
 | 
			
		||||
LmRhcm1zdGFkdC5nbWQuZGUvaWNlLXRlbC9ldXJvY2EwDwYDVR0TAQH/BAUwAwEB
 | 
			
		||||
/zA7BgNVHR8ENDAyMDCgLqAshipodHRwOi8vd3d3LmRhcm1zdGFkdC5nbWQuZGUv
 | 
			
		||||
aWNlLXRlbC9ldXJvY2EwDQYJKoZIhvcNAQEEBQADQQAXooi3mVoFQeQTNGfmHz4m
 | 
			
		||||
7Etp+T4oIr6dHKtBbwwAhf5FdPaY8M6bZVNKUELH1JK916KoPZiIc81gKHmj/Eh6
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,48 +0,0 @@
 | 
			
		||||
Certificate:
 | 
			
		||||
    Data:
 | 
			
		||||
        Version: 3 (0x2)
 | 
			
		||||
        Serial Number: 0 (0x0)
 | 
			
		||||
        Signature Algorithm: md5WithRSAEncryption
 | 
			
		||||
        Issuer: O=European ICE-TEL project, OU=V3-Certification Authority
 | 
			
		||||
        Validity
 | 
			
		||||
            Not Before: Apr  2 17:33:36 1997 GMT
 | 
			
		||||
            Not After : Apr  2 17:33:36 1998 GMT
 | 
			
		||||
        Subject: O=European ICE-TEL project, OU=V3-Certification Authority
 | 
			
		||||
        Subject Public Key Info:
 | 
			
		||||
            Public Key Algorithm: rsa
 | 
			
		||||
            RSA Public Key: (512 bit)
 | 
			
		||||
                Modulus (512 bit):
 | 
			
		||||
                    00:80:3e:eb:ae:47:a9:fe:10:54:0b:81:8b:9c:2b:
 | 
			
		||||
                    82:ab:3a:61:36:65:8b:f3:73:9f:ac:ac:7a:15:a7:
 | 
			
		||||
                    13:8f:b4:c4:ba:a3:0f:bc:a5:58:8d:cc:b1:93:31:
 | 
			
		||||
                    9e:81:9e:8c:19:61:86:fa:52:73:54:d1:97:76:22:
 | 
			
		||||
                    e7:c7:9f:41:cd
 | 
			
		||||
                Exponent: 65537 (0x10001)
 | 
			
		||||
        X509v3 extensions:
 | 
			
		||||
            X509v3 Subject Key Identifier: 
 | 
			
		||||
                ........z.."p......e..
 | 
			
		||||
            X509v3 Key Usage: critical
 | 
			
		||||
                ....
 | 
			
		||||
            X509v3 Subject Alternative Name: 
 | 
			
		||||
                0I.*http://www.darmstadt.gmd.de/ice-tel/euroca..ice-tel-ca@darmstadt.gmd.de
 | 
			
		||||
            X509v3 Basic Constraints: critical
 | 
			
		||||
                0....
 | 
			
		||||
    Signature Algorithm: md5WithRSAEncryption
 | 
			
		||||
        76:69:61:db:b7:cf:8b:06:9e:d8:8c:96:53:d2:4d:a8:23:a6:
 | 
			
		||||
        03:44:e8:8f:24:a5:c0:84:a8:4b:77:d4:2d:2b:7d:37:91:67:
 | 
			
		||||
        f2:2c:ce:02:31:4c:6b:cc:ce:f2:68:a6:11:11:ab:7d:88:b8:
 | 
			
		||||
        7e:22:9f:25:06:60:bd:79:30:3d
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICFjCCAcCgAwIBAgIBADANBgkqhkiG9w0BAQQFADBIMSEwHwYDVQQKExhFdXJv
 | 
			
		||||
cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g
 | 
			
		||||
QXV0aG9yaXR5MB4XDTk3MDQwMjE3MzMzNloXDTk4MDQwMjE3MzMzNlowSDEhMB8G
 | 
			
		||||
A1UEChMYRXVyb3BlYW4gSUNFLVRFTCBwcm9qZWN0MSMwIQYDVQQLExpWMy1DZXJ0
 | 
			
		||||
aWZpY2F0aW9uIEF1dGhvcml0eTBZMAoGBFUIAQECAgIAA0sAMEgCQQCAPuuuR6n+
 | 
			
		||||
EFQLgYucK4KrOmE2ZYvzc5+srHoVpxOPtMS6ow+8pViNzLGTMZ6BnowZYYb6UnNU
 | 
			
		||||
0Zd2IufHn0HNAgMBAAGjgZcwgZQwHQYDVR0OBBYEFIr3yNUOx3ro1yJw4AuJ1bbs
 | 
			
		||||
ZbzPMA4GA1UdDwEB/wQEAwIB9jBSBgNVHREESzBJhipodHRwOi8vd3d3LmRhcm1z
 | 
			
		||||
dGFkdC5nbWQuZGUvaWNlLXRlbC9ldXJvY2GBG2ljZS10ZWwtY2FAZGFybXN0YWR0
 | 
			
		||||
LmdtZC5kZTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA0EAdmlh27fP
 | 
			
		||||
iwae2IyWU9JNqCOmA0TojySlwISoS3fULSt9N5Fn8izOAjFMa8zO8mimERGrfYi4
 | 
			
		||||
fiKfJQZgvXkwPQ==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,63 +0,0 @@
 | 
			
		||||
Certificate:
 | 
			
		||||
    Data:
 | 
			
		||||
        Version: 3 (0x2)
 | 
			
		||||
        Serial Number: 1 (0x1)
 | 
			
		||||
        Signature Algorithm: md5WithRSAEncryption
 | 
			
		||||
        Issuer: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt
 | 
			
		||||
        Validity
 | 
			
		||||
            Not Before: Apr  2 17:35:59 1997 GMT
 | 
			
		||||
            Not After : Apr  2 17:35:59 1998 GMT
 | 
			
		||||
        Subject: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt, CN=USER
 | 
			
		||||
        Subject Public Key Info:
 | 
			
		||||
            Public Key Algorithm: rsa
 | 
			
		||||
            RSA Public Key: (512 bit)
 | 
			
		||||
                Modulus (512 bit):
 | 
			
		||||
                    00:a8:a8:53:63:49:1b:93:c3:c3:0b:6c:88:11:55:
 | 
			
		||||
                    de:7e:6a:e2:f9:52:a0:dc:69:25:c4:c8:bf:55:e1:
 | 
			
		||||
                    31:a8:ce:e4:a9:29:85:99:8a:15:9a:de:f6:2f:e1:
 | 
			
		||||
                    b4:50:5f:5e:04:75:a6:f4:76:dc:3c:0e:39:dc:3a:
 | 
			
		||||
                    be:3e:a4:61:8b
 | 
			
		||||
                Exponent: 65537 (0x10001)
 | 
			
		||||
        X509v3 extensions:
 | 
			
		||||
            X509v3 Authority Key Identifier: 
 | 
			
		||||
                0...~r..:..B.44fu......3
 | 
			
		||||
            X509v3 Subject Key Identifier: 
 | 
			
		||||
                ...... .*...1.*.......
 | 
			
		||||
            X509v3 Key Usage: critical
 | 
			
		||||
                ....
 | 
			
		||||
            X509v3 Certificate Policies: critical
 | 
			
		||||
                0.0...*...0.......
 | 
			
		||||
            X509v3 Subject Alternative Name: 
 | 
			
		||||
                0:..user@darmstadt.gmd.de.!http://www.darmstadt.gmd.de/~user
 | 
			
		||||
            X509v3 Issuer Alternative Name: 
 | 
			
		||||
                0....gmdca@gmd.de..http://www.gmd.de..saturn.darmstadt.gmd.de.\1!0...U.
 | 
			
		||||
..European ICE-TEL project1#0!..U....V3-Certification Authority1.0...U....Darmstadt..141.12.62.26
 | 
			
		||||
            X509v3 Basic Constraints: critical
 | 
			
		||||
                0.
 | 
			
		||||
            X509v3 CRL Distribution Points: 
 | 
			
		||||
                0.0.......gmdca@gmd.de
 | 
			
		||||
    Signature Algorithm: md5WithRSAEncryption
 | 
			
		||||
        69:0c:e1:b7:a7:f2:d8:fb:e8:69:c0:13:cd:37:ad:21:06:22:
 | 
			
		||||
        4d:e8:c6:db:f1:04:0b:b7:e0:b3:d6:0c:81:03:ce:c3:6a:3e:
 | 
			
		||||
        c7:e7:24:24:a4:92:64:c2:83:83:06:42:53:0e:6f:09:1e:84:
 | 
			
		||||
        9a:f7:6f:63:9b:94:99:83:d6:a4
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIIDTzCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBcMSEwHwYDVQQKExhFdXJv
 | 
			
		||||
cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g
 | 
			
		||||
QXV0aG9yaXR5MRIwEAYDVQQHEwlEYXJtc3RhZHQwHhcNOTcwNDAyMTczNTU5WhcN
 | 
			
		||||
OTgwNDAyMTczNTU5WjBrMSEwHwYDVQQKExhFdXJvcGVhbiBJQ0UtVEVMIHByb2pl
 | 
			
		||||
Y3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24gQXV0aG9yaXR5MRIwEAYDVQQH
 | 
			
		||||
EwlEYXJtc3RhZHQxDTALBgNVBAMTBFVTRVIwWTAKBgRVCAEBAgICAANLADBIAkEA
 | 
			
		||||
qKhTY0kbk8PDC2yIEVXefmri+VKg3GklxMi/VeExqM7kqSmFmYoVmt72L+G0UF9e
 | 
			
		||||
BHWm9HbcPA453Dq+PqRhiwIDAQABo4IBmDCCAZQwHwYDVR0jBBgwFoAUfnLy+DqG
 | 
			
		||||
nEKINDRmdcPU/NGiETMwHQYDVR0OBBYEFJfc4B8gjSoRmLUx4Sq/ucIYiMrPMA4G
 | 
			
		||||
A1UdDwEB/wQEAwIB8DAcBgNVHSABAf8EEjAQMAYGBCoDBAUwBgYECQgHBjBDBgNV
 | 
			
		||||
HREEPDA6gRV1c2VyQGRhcm1zdGFkdC5nbWQuZGWGIWh0dHA6Ly93d3cuZGFybXN0
 | 
			
		||||
YWR0LmdtZC5kZS9+dXNlcjCBsQYDVR0SBIGpMIGmgQxnbWRjYUBnbWQuZGWGEWh0
 | 
			
		||||
dHA6Ly93d3cuZ21kLmRlghdzYXR1cm4uZGFybXN0YWR0LmdtZC5kZaRcMSEwHwYD
 | 
			
		||||
VQQKExhFdXJvcGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRp
 | 
			
		||||
ZmljYXRpb24gQXV0aG9yaXR5MRIwEAYDVQQHEwlEYXJtc3RhZHSHDDE0MS4xMi42
 | 
			
		||||
Mi4yNjAMBgNVHRMBAf8EAjAAMB0GA1UdHwQWMBQwEqAQoA6BDGdtZGNhQGdtZC5k
 | 
			
		||||
ZTANBgkqhkiG9w0BAQQFAANBAGkM4ben8tj76GnAE803rSEGIk3oxtvxBAu34LPW
 | 
			
		||||
DIEDzsNqPsfnJCSkkmTCg4MGQlMObwkehJr3b2OblJmD1qQ=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
issuer= CN=4R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
 | 
			
		||||
notBefore=Jan 21 16:04:53 1999 GMT
 | 
			
		||||
notAfter=Jan 21 16:04:53 2004 GMT
 | 
			
		||||
subject= CN=4R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICZzCCAdOgAwIBAgIEOwVn1DAKBgYrJAMDAQIFADBvMQswCQYDVQQGEwJERTE9
 | 
			
		||||
MDsGA1UEChQ0UmVndWxpZXJ1bmdzYmVoyG9yZGUgZsh1ciBUZWxla29tbXVuaWth
 | 
			
		||||
dGlvbiB1bmQgUG9zdDEhMAwGBwKCBgEKBxQTATEwEQYDVQQDFAo0Ui1DQSAxOlBO
 | 
			
		||||
MCIYDzE5OTkwMTIxMTYwNDUzWhgPMjAwNDAxMjExNjA0NTNaMG8xCzAJBgNVBAYT
 | 
			
		||||
AkRFMT0wOwYDVQQKFDRSZWd1bGllcnVuZ3NiZWjIb3JkZSBmyHVyIFRlbGVrb21t
 | 
			
		||||
dW5pa2F0aW9uIHVuZCBQb3N0MSEwDAYHAoIGAQoHFBMBMTARBgNVBAMUCjRSLUNB
 | 
			
		||||
IDE6UE4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGAjzHbq2asUlqeWbXTQHso
 | 
			
		||||
aVF6YIPVH3c/B2cbuy9HJ/lnE6x0asOzM2DGDqi47xkdAxPc0LZ0fxO87rkmz7xs
 | 
			
		||||
jJObnVrMXpyUSDSp5Y0wqKJdsFdr6mGFOQZteIti8AJnr8xMkwnWVyuOlEXsFe1h
 | 
			
		||||
5gxwQXrOcPinE6qu1t/3PmECBMAAAAGjEjAQMA4GA1UdDwEB/wQEAwIBBjAKBgYr
 | 
			
		||||
JAMDAQIFAAOBgQA+RdocBmA2VV9E5aKPBcp01tdZAvvW9Tve3docArVKR/4/yvSX
 | 
			
		||||
Z+wvzzk+uu4qBp49HN3nqPYMrzbTmjBFu4ce5fkZ7dHF0W1sSBL0rox5z36Aq2re
 | 
			
		||||
JjfEOEmSnNe0+opuh4FSVOssXblXTE8lEQU0FhhItgDx2ADnWZibaxLG4w==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM
 | 
			
		||||
MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT
 | 
			
		||||
DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx
 | 
			
		||||
CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv
 | 
			
		||||
amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB
 | 
			
		||||
iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt
 | 
			
		||||
U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw
 | 
			
		||||
zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd
 | 
			
		||||
BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G
 | 
			
		||||
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8
 | 
			
		||||
/DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi
 | 
			
		||||
lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA
 | 
			
		||||
S7ELuYGtmYgYm9NZOIr7yU0=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
 | 
			
		||||
issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
 | 
			
		||||
notBefore=941104185834Z
 | 
			
		||||
notAfter =991103185834Z
 | 
			
		||||
-----BEGIN X509 CERTIFICATE-----
 | 
			
		||||
 | 
			
		||||
MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
 | 
			
		||||
HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
 | 
			
		||||
Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
 | 
			
		||||
OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
 | 
			
		||||
ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
 | 
			
		||||
IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
 | 
			
		||||
975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
 | 
			
		||||
touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
 | 
			
		||||
7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
 | 
			
		||||
9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
 | 
			
		||||
0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
 | 
			
		||||
MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
 | 
			
		||||
-----END X509 CERTIFICATE-----
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
 | 
			
		||||
issuer= /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
 | 
			
		||||
notBefore=941109235417Z
 | 
			
		||||
notAfter =991231235417Z
 | 
			
		||||
-----BEGIN X509 CERTIFICATE-----
 | 
			
		||||
 | 
			
		||||
MIICKTCCAZYCBQJBAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw
 | 
			
		||||
HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl
 | 
			
		||||
IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDkyMzU0MTda
 | 
			
		||||
Fw05OTEyMzEyMzU0MTdaMF8xCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0
 | 
			
		||||
YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJlIFNlcnZlciBDZXJ0aWZp
 | 
			
		||||
Y2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCSznrB
 | 
			
		||||
roM+WqqJg1esJQF2DK2ujiw3zus1eGRUA+WEQFHJv48I4oqCCNIWhjdV6bEhAq12
 | 
			
		||||
aIGaBaJLyUslZiJWbIgHj/eBWW2EB2VwE3F2Ppt3TONQiVaYSLkdpykaEy5KEVmc
 | 
			
		||||
HhXVSVQsczppgrGXOZxtcGdI5d0t1sgeewIDAQABMA0GCSqGSIb3DQEBAgUAA34A
 | 
			
		||||
iNHReSHO4ovo+MF9NFM/YYPZtgs4F7boviGNjwC4i1N+RGceIr2XJ+CchcxK9oU7
 | 
			
		||||
suK+ktPlDemvXA4MRpX/oRxePug2WHpzpgr4IhFrwwk4fia7c+8AvQKk8xQNMD9h
 | 
			
		||||
cHsg/jKjn7P0Z1LctO6EjJY2IN6BCINxIYoPnqk=
 | 
			
		||||
-----END X509 CERTIFICATE-----
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
subject=/C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority
 | 
			
		||||
notBefore=Jan 29 00:00:00 1996 GMT
 | 
			
		||||
notAfter=Jan  7 23:59:59 2004 GMT
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICPTCCAaYCEQC6WslMBTuS1qe2307QU5INMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
 | 
			
		||||
BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
 | 
			
		||||
c3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
 | 
			
		||||
NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
 | 
			
		||||
VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMiBQdWJsaWMgUHJp
 | 
			
		||||
bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
 | 
			
		||||
jQAwgYkCgYEAtlqLow1qI4OAa885h/QhEzMGTCWi7VUSl8WngLn6g8EgoPovFQ18
 | 
			
		||||
oWBrfnks+gYPOq72G2+x0v8vKFJfg31LxHq3+GYfgFT8t8KOWUoUV0bRmpO+QZED
 | 
			
		||||
uxWAk1zr58wIbD8+s0r8/0tsI9VQgiZEGY4jw3HqGSRHBJ51v8imAB8CAwEAATAN
 | 
			
		||||
BgkqhkiG9w0BAQIFAAOBgQC2AB+TV6QHp0DOZUA/VV7t7/pUSaUw1iF8YYfug5ML
 | 
			
		||||
v7Qz8pisnwa/TqjOFIFMywROWMPPX+5815pvy0GKt3+BuP+EYcYnQ2UdDOyxAArd
 | 
			
		||||
G6S7x3ggKLKi3TaVLuFUT79guXdoEZkj6OpS6KoATmdOu5C1RZtG644W78QzWzM9
 | 
			
		||||
1Q==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
 | 
			
		||||
notBefore=Jan 29 00:00:00 1996 GMT
 | 
			
		||||
notAfter=Jan  7 23:59:59 2004 GMT
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICPTCCAaYCEQDknv3zOugOz6URPhmkJAIyMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
 | 
			
		||||
BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
 | 
			
		||||
c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
 | 
			
		||||
NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
 | 
			
		||||
VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJp
 | 
			
		||||
bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
 | 
			
		||||
jQAwgYkCgYEAyVxZnvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqo
 | 
			
		||||
RAWq7AMfeH+ek7maAKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4
 | 
			
		||||
rCNfcCk2pMmG57GaIMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATAN
 | 
			
		||||
BgkqhkiG9w0BAQIFAAOBgQBhcOwvP579K+ZoVCGwZ3kIDCCWMYoNer62Jt95LCJp
 | 
			
		||||
STbjl3diYaIy13pUITa6Ask05yXaRDWw0lyAXbOU+Pms7qRgdSoflUkjsUp89LNH
 | 
			
		||||
ciFbfperVKxi513srpvSybIk+4Kt6WcVS7qqpvCXoPawl1cAyAw8CaCCBLpB2veZ
 | 
			
		||||
pA==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
 | 
			
		||||
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
 | 
			
		||||
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
 | 
			
		||||
biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
 | 
			
		||||
MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
 | 
			
		||||
MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
 | 
			
		||||
DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
 | 
			
		||||
dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
 | 
			
		||||
cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
 | 
			
		||||
DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
 | 
			
		||||
gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
 | 
			
		||||
yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
 | 
			
		||||
L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
 | 
			
		||||
EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
 | 
			
		||||
7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
 | 
			
		||||
QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
 | 
			
		||||
qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
 | 
			
		||||
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
 | 
			
		||||
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
 | 
			
		||||
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
 | 
			
		||||
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
 | 
			
		||||
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
 | 
			
		||||
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
 | 
			
		||||
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
 | 
			
		||||
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
 | 
			
		||||
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
 | 
			
		||||
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
 | 
			
		||||
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
 | 
			
		||||
ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
 | 
			
		||||
uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
 | 
			
		||||
9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
 | 
			
		||||
hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
 | 
			
		||||
pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
subject=/C=US/O=VeriSign, Inc./OU=Class 1 Public Primary Certification Authority
 | 
			
		||||
notBefore=Jan 29 00:00:00 1996 GMT
 | 
			
		||||
notAfter=Jan  7 23:59:59 2020 GMT
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICPDCCAaUCEDJQM89Q0VbzXIGtZVxPyCUwDQYJKoZIhvcNAQECBQAwXzELMAkG
 | 
			
		||||
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
 | 
			
		||||
cyAxIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
 | 
			
		||||
MDEyOTAwMDAwMFoXDTIwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
 | 
			
		||||
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcmlt
 | 
			
		||||
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
 | 
			
		||||
ADCBiQKBgQDlGb9to1ZhLZlIcfZn3rmN67eehoAKkQ76OCWvRoiC5XOooJskXQ0f
 | 
			
		||||
zGVuDLDQVoQYh5oGmxChc9+0WDlrbsH2FdWoqD+qEgaNMax/sDTXjzRniAnNFBHi
 | 
			
		||||
TkVWaR94AoDa3EeRKbs2yWNcxeDXLYd7obcysHswuiovMaruo2fa2wIDAQABMA0G
 | 
			
		||||
CSqGSIb3DQEBAgUAA4GBAEtEZmBoZOSYG/OwcuaViXzde7OVwB0u2NgZ0C00PcZQ
 | 
			
		||||
mhCGjKo/O6gE/DdSlcPZydvN8oYGxLEb8IKIMEKOF1AcZHq4PplJdJf8rAJD+5YM
 | 
			
		||||
VgQlDHx8h50kp9jwMim1pN9dokzFFjKoQvZFprY2ueC/ZTaTwtLXa9zeWdaiNfhF
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
 | 
			
		||||
notBefore=Jan 29 00:00:00 1996 GMT
 | 
			
		||||
notAfter=Aug  1 23:59:59 2028 GMT
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
 | 
			
		||||
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
 | 
			
		||||
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
 | 
			
		||||
MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
 | 
			
		||||
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
 | 
			
		||||
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
 | 
			
		||||
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
 | 
			
		||||
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
 | 
			
		||||
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
 | 
			
		||||
CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
 | 
			
		||||
lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
 | 
			
		||||
AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
 | 
			
		||||
notBefore=Nov  9 00:00:00 1994 GMT
 | 
			
		||||
notAfter=Jan  7 23:59:59 2010 GMT
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
 | 
			
		||||
A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
 | 
			
		||||
VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
 | 
			
		||||
MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
 | 
			
		||||
BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
 | 
			
		||||
dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
 | 
			
		||||
ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
 | 
			
		||||
0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
 | 
			
		||||
uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI
 | 
			
		||||
hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3
 | 
			
		||||
YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc
 | 
			
		||||
1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
-----BEGIN CERTIFICATE-----
 | 
			
		||||
MIID5TCCAs2gAwIBAgIEOeSXnjANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMC
 | 
			
		||||
VVMxFDASBgNVBAoTC1dlbGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBD
 | 
			
		||||
ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEvMC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9v
 | 
			
		||||
dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDAxMDExMTY0MTI4WhcNMjEwMTE0
 | 
			
		||||
MTY0MTI4WjCBgjELMAkGA1UEBhMCVVMxFDASBgNVBAoTC1dlbGxzIEZhcmdvMSww
 | 
			
		||||
KgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEvMC0G
 | 
			
		||||
A1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEi
 | 
			
		||||
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVqDM7Jvk0/82bfuUER84A4n13
 | 
			
		||||
5zHCLielTWi5MbqNQ1mXx3Oqfz1cQJ4F5aHiidlMuD+b+Qy0yGIZLEWukR5zcUHE
 | 
			
		||||
SxP9cMIlrCL1dQu3U+SlK93OvRw6esP3E48mVJwWa2uv+9iWsWCaSOAlIiR5NM4O
 | 
			
		||||
JgALTqv9i86C1y8IcGjBqAr5dE8Hq6T54oN+J3N0Prj5OEL8pahbSCOz6+MlsoCu
 | 
			
		||||
ltQKnMJ4msZoGK43YjdeUXWoWGPAUe5AeH6orxqg4bB4nVCMe+ez/I4jsNtlAHCE
 | 
			
		||||
AQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMB
 | 
			
		||||
AAGjYTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcB
 | 
			
		||||
CzAyMDAGCCsGAQUFBwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRw
 | 
			
		||||
b2xpY3kwDQYJKoZIhvcNAQEFBQADggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo
 | 
			
		||||
7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrvm+0fazbuSCUlFLZWohDo7qd/
 | 
			
		||||
0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0ROhPs7fpvcmR7
 | 
			
		||||
nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx
 | 
			
		||||
x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ
 | 
			
		||||
33ZwmVxwQ023tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s=
 | 
			
		||||
-----END CERTIFICATE-----
 | 
			
		||||
							
								
								
									
										67
									
								
								config
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								config
									
									
									
									
									
								
							@@ -84,7 +84,7 @@ if [ "x$XREL" != "x" ]; then
 | 
			
		||||
	    4.2)
 | 
			
		||||
		echo "whatever-whatever-unixware1"; exit 0
 | 
			
		||||
		;;
 | 
			
		||||
	    5)
 | 
			
		||||
	    5*)
 | 
			
		||||
		case "x${VERSION}" in
 | 
			
		||||
		    # We hardcode i586 in place of ${MACHINE} for the
 | 
			
		||||
		    # following reason. The catch is that even though Pentium
 | 
			
		||||
@@ -93,8 +93,7 @@ if [ "x$XREL" != "x" ]; then
 | 
			
		||||
		    # with i386 is that it makes ./config pass 386 to
 | 
			
		||||
		    # ./Configure, which in turn makes make generate
 | 
			
		||||
		    # inefficient SHA-1 (for this moment) code.
 | 
			
		||||
		    x7*)  echo "i586-sco-unixware7";           exit 0 ;;
 | 
			
		||||
		    x8*)  echo "i586-unkn-OpenUNIX${VERSION}"; exit 0 ;;
 | 
			
		||||
		    x[678]*)  echo "i586-sco-unixware7"; exit 0 ;;
 | 
			
		||||
		esac
 | 
			
		||||
		;;
 | 
			
		||||
	esac
 | 
			
		||||
@@ -407,7 +406,7 @@ if [ "$GCCVER" != "" ]; then
 | 
			
		||||
  CC=gcc
 | 
			
		||||
  # then strip off whatever prefix egcs prepends the number with...
 | 
			
		||||
  # Hopefully, this will work for any future prefixes as well.
 | 
			
		||||
  GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
 | 
			
		||||
  GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
 | 
			
		||||
  # Since gcc 3.1 gcc --version behaviour has changed.  gcc -dumpversion
 | 
			
		||||
  # does give us what we want though, so we use that.  We just just the
 | 
			
		||||
  # major and minor version numbers.
 | 
			
		||||
@@ -452,8 +451,6 @@ if [ "$SYSTEM" = "SunOS" ]; then
 | 
			
		||||
      echo "         patch #107357-01 or later applied."
 | 
			
		||||
      sleep 5
 | 
			
		||||
    fi
 | 
			
		||||
  elif [ "$CC" = "cc" -a $CCVER -gt 0 ]; then
 | 
			
		||||
    CC=sc3
 | 
			
		||||
  fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
@@ -588,23 +585,27 @@ case "$GUESSOS" in
 | 
			
		||||
	OUT="linux-generic32" ;;
 | 
			
		||||
  arm*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
 | 
			
		||||
  arm*l-*-linux2) OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
 | 
			
		||||
  s390*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN -DNO_ASM" ;;
 | 
			
		||||
  sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
 | 
			
		||||
  sh*-*-linux2)  OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
 | 
			
		||||
  m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
 | 
			
		||||
  s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN -DNO_ASM" ;;
 | 
			
		||||
  s390x-*-linux2) OUT="linux-generic64"; options="$options -DB_ENDIAN" ;;
 | 
			
		||||
  x86_64-*-linux?) OUT="linux-x86_64" ;;
 | 
			
		||||
  *86-*-linux2) OUT="linux-elf"
 | 
			
		||||
	if [ "$GCCVER" -gt 28 ]; then
 | 
			
		||||
          if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
 | 
			
		||||
	    options="$options -mcpu=pentium"
 | 
			
		||||
	    options="$options -march=pentium"
 | 
			
		||||
          fi
 | 
			
		||||
          if grep '^model.*Pentium Pro' /proc/cpuinfo >/dev/null ; then
 | 
			
		||||
	    options="$options -mcpu=pentiumpro"
 | 
			
		||||
	    options="$options -march=pentiumpro"
 | 
			
		||||
          fi
 | 
			
		||||
          if grep '^model.*K6' /proc/cpuinfo >/dev/null ; then
 | 
			
		||||
	    options="$options -mcpu=k6"
 | 
			
		||||
	    options="$options -march=k6"
 | 
			
		||||
          fi
 | 
			
		||||
        fi ;;
 | 
			
		||||
  *-*-linux1) OUT="linux-aout" ;;
 | 
			
		||||
  *-*-linux2) OUT="linux-generic32" ;;
 | 
			
		||||
  sun4u*-*-solaris2)
 | 
			
		||||
  sun4[uv]*-*-solaris2)
 | 
			
		||||
	OUT="solaris-sparcv9-$CC"
 | 
			
		||||
	ISA64=`(isalist) 2>/dev/null | grep sparcv9`
 | 
			
		||||
	if [ "$ISA64" != "" ]; then
 | 
			
		||||
@@ -647,34 +648,43 @@ case "$GUESSOS" in
 | 
			
		||||
	    OUT="solaris64-x86_64-$CC"
 | 
			
		||||
	else
 | 
			
		||||
	    OUT="solaris-x86-$CC"
 | 
			
		||||
	    if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then
 | 
			
		||||
		options="$options no-sse2"
 | 
			
		||||
	    fi
 | 
			
		||||
	fi
 | 
			
		||||
	;;
 | 
			
		||||
  *-*-sunos4)		OUT="sunos-$CC" ;;
 | 
			
		||||
 | 
			
		||||
  *86*-*-bsdi4)		OUT="bsdi-elf-gcc" ;;
 | 
			
		||||
  alpha*-*-*bsd*)	OUT="BSD-generic64; options="$options -DL_ENDIAN" ;;
 | 
			
		||||
  powerpc64-*-*bsd*)	OUT="BSD-generic64; options="$options -DB_ENDIAN" ;;
 | 
			
		||||
  *86*-*-bsdi4)		OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;;
 | 
			
		||||
  alpha*-*-*bsd*)	OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
 | 
			
		||||
  powerpc64-*-*bsd*)	OUT="BSD-generic64"; options="$options -DB_ENDIAN" ;;
 | 
			
		||||
  sparc64-*-*bsd*)	OUT="BSD-sparc64" ;;
 | 
			
		||||
  ia64-*-*bsd*)		OUT="BSD-ia64" ;;
 | 
			
		||||
  amd64-*-*bsd*)	OUT="BSD-x86_64" ;;
 | 
			
		||||
  *86*-*-*bsd*)		case "`(file -L /usr/lib/libc.so.*) 2>/dev/null`" in
 | 
			
		||||
  *86*-*-*bsd*)		# mimic ld behaviour when it's looking for libc...
 | 
			
		||||
			if [ -L /usr/lib/libc.so ]; then	# [Free|Net]BSD
 | 
			
		||||
			    libc=/usr/lib/libc.so
 | 
			
		||||
			else					# OpenBSD
 | 
			
		||||
			    # ld searches for highest libc.so.* and so do we
 | 
			
		||||
			    libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null`
 | 
			
		||||
			fi
 | 
			
		||||
			case "`(file -L $libc) 2>/dev/null`" in
 | 
			
		||||
			*ELF*)	OUT="BSD-x86-elf" ;;
 | 
			
		||||
			*)	OUT="BSD-x86" ;;
 | 
			
		||||
			*)	OUT="BSD-x86"; options="$options no-sse2" ;;
 | 
			
		||||
			esac ;;
 | 
			
		||||
  *-*-*bsd*)		OUT="BSD-generic32" ;;
 | 
			
		||||
 | 
			
		||||
  *-*-osf)		OUT="osf1-alpha-cc" ;;
 | 
			
		||||
  *-*-tru64)		OUT="tru64-alpha-cc" ;;
 | 
			
		||||
  *-*-OpenUNIX*)
 | 
			
		||||
  *-*-[Uu]nix[Ww]are7)
 | 
			
		||||
	if [ "$CC" = "gcc" ]; then
 | 
			
		||||
	  OUT="OpenUNIX-8-gcc" 
 | 
			
		||||
	  OUT="unixware-7-gcc" ; options="$options no-sse2"
 | 
			
		||||
	else    
 | 
			
		||||
	  OUT="OpenUNIX-8" 
 | 
			
		||||
	  OUT="unixware-7" ; options="$options no-sse2 -D__i386__"
 | 
			
		||||
	fi
 | 
			
		||||
	;;
 | 
			
		||||
  *-*-[Uu]nix[Ww]are7) OUT="unixware-7" ;;
 | 
			
		||||
  *-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0" ;;
 | 
			
		||||
  *-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1" ;;
 | 
			
		||||
  *-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0"; options="$options no-sse2 no-sha512" ;;
 | 
			
		||||
  *-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1"; options="$options no-sse2 no-sha512" ;;
 | 
			
		||||
  *-*-vos)
 | 
			
		||||
	options="$options no-threads no-shared no-asm no-dso"
 | 
			
		||||
	EXE=".pm"
 | 
			
		||||
@@ -711,9 +721,9 @@ case "$GUESSOS" in
 | 
			
		||||
		fi
 | 
			
		||||
	     fi
 | 
			
		||||
	elif [ $CPU_VERSION -ge 528 ]; then	# PA-RISC 1.1+ CPU
 | 
			
		||||
	     OUT="hpux-parisc-${CC}
 | 
			
		||||
	     OUT="hpux-parisc-${CC}"
 | 
			
		||||
	elif [ $CPU_VERSION -ge 523 ]; then	# PA-RISC 1.0 CPU
 | 
			
		||||
	     OUT="hpux-parisc-${CC}
 | 
			
		||||
	     OUT="hpux-parisc-${CC}"
 | 
			
		||||
	else					# Motorola(?) CPU
 | 
			
		||||
	     OUT="hpux-$CC"
 | 
			
		||||
	fi
 | 
			
		||||
@@ -739,6 +749,11 @@ case "$GUESSOS" in
 | 
			
		||||
		fi
 | 
			
		||||
	    fi
 | 
			
		||||
	fi
 | 
			
		||||
	if (lsattr -E -O -l `lsdev -c processor|awk '{print$1;exit}'` | grep -i powerpc) >/dev/null 2>&1; then
 | 
			
		||||
	    :	# this applies even to Power3 and later, as they return PowerPC_POWER[345]
 | 
			
		||||
	else
 | 
			
		||||
	    options="$options no-asm"
 | 
			
		||||
	fi
 | 
			
		||||
	;;
 | 
			
		||||
  # these are all covered by the catchall below
 | 
			
		||||
  # *-dgux) OUT="dgux" ;;
 | 
			
		||||
@@ -763,7 +778,7 @@ esac
 | 
			
		||||
#  options="$options -DATALLA"
 | 
			
		||||
#fi
 | 
			
		||||
 | 
			
		||||
# gcc < 2.8 does not support -mcpu=ultrasparc
 | 
			
		||||
# gcc < 2.8 does not support -march=ultrasparc
 | 
			
		||||
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
 | 
			
		||||
then
 | 
			
		||||
  echo "WARNING! Falling down to 'solaris-sparcv8-gcc'."
 | 
			
		||||
@@ -783,7 +798,7 @@ case "$GUESSOS" in
 | 
			
		||||
  i386-*) options="$options 386" ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 aes ripemd rsa sha
 | 
			
		||||
for i in aes bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha
 | 
			
		||||
do
 | 
			
		||||
  if [ ! -d crypto/$i ]
 | 
			
		||||
  then
 | 
			
		||||
 
 | 
			
		||||
@@ -4,3 +4,4 @@ opensslconf.h
 | 
			
		||||
Makefile.save
 | 
			
		||||
*.flc
 | 
			
		||||
semantic.cache
 | 
			
		||||
x86cpuid-elf.s
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										108
									
								
								crypto/Makefile
									
									
									
									
									
								
							
							
						
						
									
										108
									
								
								crypto/Makefile
									
									
									
									
									
								
							@@ -1,23 +1,25 @@
 | 
			
		||||
#
 | 
			
		||||
# SSLeay/crypto/Makefile
 | 
			
		||||
# OpenSSL/crypto/Makefile
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
DIR=		crypto
 | 
			
		||||
TOP=		..
 | 
			
		||||
CC=		cc
 | 
			
		||||
INCLUDE=	-I. -I$(TOP) -I../include
 | 
			
		||||
# INCLUDES targets sudbirs!
 | 
			
		||||
INCLUDES=	-I.. -I../.. -I../../include
 | 
			
		||||
CFLAG=		-g
 | 
			
		||||
INSTALL_PREFIX=
 | 
			
		||||
OPENSSLDIR=     /usr/local/ssl
 | 
			
		||||
INSTALLTOP=	/usr/local/ssl
 | 
			
		||||
MAKE=           make
 | 
			
		||||
MAKEDEPPROG=	makedepend
 | 
			
		||||
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
			
		||||
MAKEFILE=       Makefile
 | 
			
		||||
RM=             rm -f
 | 
			
		||||
AR=		ar r
 | 
			
		||||
 | 
			
		||||
RECURSIVE_MAKE=	[ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
 | 
			
		||||
		    (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
 | 
			
		||||
		    $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='${INCLUDES}' $$target ) || exit 1; \
 | 
			
		||||
		done;
 | 
			
		||||
 | 
			
		||||
PEX_LIBS=
 | 
			
		||||
EX_LIBS=
 | 
			
		||||
 
 | 
			
		||||
@@ -27,14 +29,6 @@ AFLAGS=$(ASFLAGS)
 | 
			
		||||
 | 
			
		||||
LIBS=
 | 
			
		||||
 | 
			
		||||
SDIRS=	objects \
 | 
			
		||||
	md2 md4 md5 sha mdc2 hmac ripemd \
 | 
			
		||||
	des rc2 rc4 rc5 idea bf cast \
 | 
			
		||||
	bn ec rsa dsa ecdsa ecdh dh dso engine aes \
 | 
			
		||||
	buffer bio stack lhash rand err \
 | 
			
		||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
 | 
			
		||||
	store pqueue
 | 
			
		||||
 | 
			
		||||
GENERAL=Makefile README crypto-lib.com install.com
 | 
			
		||||
 | 
			
		||||
LIB= $(TOP)/libcrypto.a
 | 
			
		||||
@@ -70,45 +64,42 @@ x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
 | 
			
		||||
x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl
 | 
			
		||||
	$(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@
 | 
			
		||||
 | 
			
		||||
uplink.o:	../ms/uplink.c
 | 
			
		||||
	$(CC) $(CFLAGS) -c -o $@ ../ms/uplink.c
 | 
			
		||||
 | 
			
		||||
uplink-cof.s:	../ms/uplink.pl
 | 
			
		||||
	$(PERL) ../ms/uplink.pl coff > $@
 | 
			
		||||
 | 
			
		||||
x86_64cpuid.s: x86_64cpuid.pl
 | 
			
		||||
	$(PERL) x86_64cpuid.pl $@
 | 
			
		||||
ia64cpuid.s: ia64cpuid.S
 | 
			
		||||
	$(CC) $(CFLAGS) -E ia64cpuid.S > $@
 | 
			
		||||
 | 
			
		||||
testapps:
 | 
			
		||||
	if echo ${SDIRS} | fgrep ' des '; \
 | 
			
		||||
	then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi
 | 
			
		||||
	if echo ${SDIRS} | fgrep ' pkcs7 '; \
 | 
			
		||||
	then cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps; fi
 | 
			
		||||
	[ -z "$(THIS)" ] || (	if echo ${SDIRS} | fgrep ' des '; \
 | 
			
		||||
				then cd des && $(MAKE) -e des; fi )
 | 
			
		||||
	[ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) -e testapps );
 | 
			
		||||
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
 | 
			
		||||
 | 
			
		||||
subdirs:
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making all in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) -e INCLUDES='${INCLUDES}' all ) || exit 1; \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=all; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making 'files' in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) PERL='${PERL}' files ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=files; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
links:
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
 | 
			
		||||
	@for i in $(SDIRS); do \
 | 
			
		||||
	(cd $$i && echo "making links in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=links; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
# lib: and $(LIB): are splitted to avoid end-less loop
 | 
			
		||||
lib:	$(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
$(LIB):	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	$(RANLIB) $(LIB) || echo Never mind.
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
shared: buildinf.h lib subdirs
 | 
			
		||||
	if [ -n "$(SHARED_LIBS)" ]; then \
 | 
			
		||||
@@ -116,64 +107,35 @@ shared: buildinf.h lib subdirs
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
libs:
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making libs in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
tests:
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making tests in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=lib; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
 | 
			
		||||
	@headerlist="$(EXHEADER)"; for i in $$headerlist ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 | 
			
		||||
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making install in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}'  INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=install; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
lint:
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making lint in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=lint; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
 | 
			
		||||
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 | 
			
		||||
	if [ ! -s buildinf.h ]; then rm buildinf.h; fi
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making depend in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
 | 
			
		||||
	@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 | 
			
		||||
	@[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
 | 
			
		||||
	@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
 | 
			
		||||
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making clean in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=clean; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
 | 
			
		||||
	mv -f Makefile.new $(MAKEFILE)
 | 
			
		||||
	@for i in $(SDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cd $$i && echo "making dclean in crypto/$$i..." && \
 | 
			
		||||
	$(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
 | 
			
		||||
	done;
 | 
			
		||||
	@target=dclean; $(RECURSIVE_MAKE)
 | 
			
		||||
 | 
			
		||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,12 +8,6 @@ CC=	cc
 | 
			
		||||
CPP=	$(CC) -E
 | 
			
		||||
INCLUDES=
 | 
			
		||||
CFLAG=-g
 | 
			
		||||
INSTALL_PREFIX=
 | 
			
		||||
OPENSSLDIR=     /usr/local/ssl
 | 
			
		||||
INSTALLTOP=	/usr/local/ssl
 | 
			
		||||
MAKE=		make
 | 
			
		||||
MAKEDEPPROG=	makedepend
 | 
			
		||||
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
			
		||||
MAKEFILE=	Makefile
 | 
			
		||||
AR=		ar r
 | 
			
		||||
 | 
			
		||||
@@ -29,8 +23,10 @@ TEST=
 | 
			
		||||
APPS=
 | 
			
		||||
 | 
			
		||||
LIB=$(TOP)/libcrypto.a
 | 
			
		||||
LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c
 | 
			
		||||
LIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ctr.o $(AES_ASM_OBJ)
 | 
			
		||||
LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c \
 | 
			
		||||
       aes_ctr.c aes_ige.c aes_wrap.c
 | 
			
		||||
LIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ctr.o aes_ige.o aes_wrap.o \
 | 
			
		||||
       $(AES_ASM_OBJ)
 | 
			
		||||
 | 
			
		||||
SRC= $(LIBSRC)
 | 
			
		||||
 | 
			
		||||
@@ -61,6 +57,9 @@ ax86-cof.s: asm/aes-586.pl ../perlasm/x86asm.pl
 | 
			
		||||
ax86-out.s: asm/aes-586.pl ../perlasm/x86asm.pl
 | 
			
		||||
	(cd asm; $(PERL) aes-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
 | 
			
		||||
 | 
			
		||||
aes-x86_64.s: asm/aes-x86_64.pl
 | 
			
		||||
	$(PERL) asm/aes-x86_64.pl $@
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
 | 
			
		||||
 | 
			
		||||
@@ -69,9 +68,8 @@ links:
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 | 
			
		||||
 | 
			
		||||
install: installs
 | 
			
		||||
 | 
			
		||||
installs:
 | 
			
		||||
install:
 | 
			
		||||
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
 | 
			
		||||
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
 | 
			
		||||
	do  \
 | 
			
		||||
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 | 
			
		||||
@@ -87,6 +85,7 @@ lint:
 | 
			
		||||
	lint -DLINT $(INCLUDES) $(SRC)>fluff
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
 | 
			
		||||
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
@@ -109,8 +108,23 @@ aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
			
		||||
aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
 | 
			
		||||
aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
			
		||||
aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
 | 
			
		||||
aes_ige.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/bio.h
 | 
			
		||||
aes_ige.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 | 
			
		||||
aes_ige.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
aes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
 | 
			
		||||
aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
 | 
			
		||||
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
			
		||||
aes_misc.o: ../../include/openssl/opensslconf.h
 | 
			
		||||
aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
 | 
			
		||||
aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
			
		||||
aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c
 | 
			
		||||
aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/opensslconf.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
aes_wrap.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_wrap.c
 | 
			
		||||
 
 | 
			
		||||
@@ -119,6 +119,23 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
	unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
			
		||||
	unsigned int *num);
 | 
			
		||||
 | 
			
		||||
/* For IGE, see also http://www.links.org/files/openssl-ige.pdf */
 | 
			
		||||
/* NB: the IV is _two_ blocks long */
 | 
			
		||||
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
		     const unsigned long length, const AES_KEY *key,
 | 
			
		||||
		     unsigned char *ivec, const int enc);
 | 
			
		||||
/* NB: the IV is _four_ blocks long */
 | 
			
		||||
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
			const unsigned long length, const AES_KEY *key,
 | 
			
		||||
			const AES_KEY *key2, const unsigned char *ivec,
 | 
			
		||||
			const int enc);
 | 
			
		||||
 | 
			
		||||
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
 | 
			
		||||
		unsigned char *out,
 | 
			
		||||
		const unsigned char *in, unsigned int inlen);
 | 
			
		||||
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
 | 
			
		||||
		unsigned char *out,
 | 
			
		||||
		const unsigned char *in, unsigned int inlen);
 | 
			
		||||
 | 
			
		||||
#ifdef  __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -44,22 +44,14 @@ Te0[x] = S [x].[02, 01, 01, 03];
 | 
			
		||||
Te1[x] = S [x].[03, 02, 01, 01];
 | 
			
		||||
Te2[x] = S [x].[01, 03, 02, 01];
 | 
			
		||||
Te3[x] = S [x].[01, 01, 03, 02];
 | 
			
		||||
Te4[x] = S [x].[01, 01, 01, 01];
 | 
			
		||||
 | 
			
		||||
Td0[x] = Si[x].[0e, 09, 0d, 0b];
 | 
			
		||||
Td1[x] = Si[x].[0b, 0e, 09, 0d];
 | 
			
		||||
Td2[x] = Si[x].[0d, 0b, 0e, 09];
 | 
			
		||||
Td3[x] = Si[x].[09, 0d, 0b, 0e];
 | 
			
		||||
Td4[x] = Si[x].[01, 01, 01, 01];
 | 
			
		||||
Td4[x] = Si[x].[01];
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifdef AES_ASM
 | 
			
		||||
extern const u32 AES_Te[5][256];
 | 
			
		||||
#define Te0 AES_Te[0]
 | 
			
		||||
#define Te1 AES_Te[1]
 | 
			
		||||
#define Te2 AES_Te[2]
 | 
			
		||||
#define Te3 AES_Te[3]
 | 
			
		||||
#else
 | 
			
		||||
static const u32 Te0[256] = {
 | 
			
		||||
    0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
 | 
			
		||||
    0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U,
 | 
			
		||||
@@ -324,81 +316,7 @@ static const u32 Te3[256] = {
 | 
			
		||||
    0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU,
 | 
			
		||||
    0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU,
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
static const u32 Te4[256] = {
 | 
			
		||||
    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,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#ifdef AES_ASM
 | 
			
		||||
extern const u32 AES_Td[5][256];
 | 
			
		||||
#define Td0 AES_Td[0]
 | 
			
		||||
#define Td1 AES_Td[1]
 | 
			
		||||
#define Td2 AES_Td[2]
 | 
			
		||||
#define Td3 AES_Td[3]
 | 
			
		||||
#else
 | 
			
		||||
static const u32 Td0[256] = {
 | 
			
		||||
    0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
 | 
			
		||||
    0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
 | 
			
		||||
@@ -663,72 +581,39 @@ static const u32 Td3[256] = {
 | 
			
		||||
    0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U,
 | 
			
		||||
    0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U,
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
static const u32 Td4[256] = {
 | 
			
		||||
    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,
 | 
			
		||||
static const u8 Td4[256] = {
 | 
			
		||||
    0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
 | 
			
		||||
    0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU,
 | 
			
		||||
    0x7cU, 0xe3U, 0x39U, 0x82U, 0x9bU, 0x2fU, 0xffU, 0x87U,
 | 
			
		||||
    0x34U, 0x8eU, 0x43U, 0x44U, 0xc4U, 0xdeU, 0xe9U, 0xcbU,
 | 
			
		||||
    0x54U, 0x7bU, 0x94U, 0x32U, 0xa6U, 0xc2U, 0x23U, 0x3dU,
 | 
			
		||||
    0xeeU, 0x4cU, 0x95U, 0x0bU, 0x42U, 0xfaU, 0xc3U, 0x4eU,
 | 
			
		||||
    0x08U, 0x2eU, 0xa1U, 0x66U, 0x28U, 0xd9U, 0x24U, 0xb2U,
 | 
			
		||||
    0x76U, 0x5bU, 0xa2U, 0x49U, 0x6dU, 0x8bU, 0xd1U, 0x25U,
 | 
			
		||||
    0x72U, 0xf8U, 0xf6U, 0x64U, 0x86U, 0x68U, 0x98U, 0x16U,
 | 
			
		||||
    0xd4U, 0xa4U, 0x5cU, 0xccU, 0x5dU, 0x65U, 0xb6U, 0x92U,
 | 
			
		||||
    0x6cU, 0x70U, 0x48U, 0x50U, 0xfdU, 0xedU, 0xb9U, 0xdaU,
 | 
			
		||||
    0x5eU, 0x15U, 0x46U, 0x57U, 0xa7U, 0x8dU, 0x9dU, 0x84U,
 | 
			
		||||
    0x90U, 0xd8U, 0xabU, 0x00U, 0x8cU, 0xbcU, 0xd3U, 0x0aU,
 | 
			
		||||
    0xf7U, 0xe4U, 0x58U, 0x05U, 0xb8U, 0xb3U, 0x45U, 0x06U,
 | 
			
		||||
    0xd0U, 0x2cU, 0x1eU, 0x8fU, 0xcaU, 0x3fU, 0x0fU, 0x02U,
 | 
			
		||||
    0xc1U, 0xafU, 0xbdU, 0x03U, 0x01U, 0x13U, 0x8aU, 0x6bU,
 | 
			
		||||
    0x3aU, 0x91U, 0x11U, 0x41U, 0x4fU, 0x67U, 0xdcU, 0xeaU,
 | 
			
		||||
    0x97U, 0xf2U, 0xcfU, 0xceU, 0xf0U, 0xb4U, 0xe6U, 0x73U,
 | 
			
		||||
    0x96U, 0xacU, 0x74U, 0x22U, 0xe7U, 0xadU, 0x35U, 0x85U,
 | 
			
		||||
    0xe2U, 0xf9U, 0x37U, 0xe8U, 0x1cU, 0x75U, 0xdfU, 0x6eU,
 | 
			
		||||
    0x47U, 0xf1U, 0x1aU, 0x71U, 0x1dU, 0x29U, 0xc5U, 0x89U,
 | 
			
		||||
    0x6fU, 0xb7U, 0x62U, 0x0eU, 0xaaU, 0x18U, 0xbeU, 0x1bU,
 | 
			
		||||
    0xfcU, 0x56U, 0x3eU, 0x4bU, 0xc6U, 0xd2U, 0x79U, 0x20U,
 | 
			
		||||
    0x9aU, 0xdbU, 0xc0U, 0xfeU, 0x78U, 0xcdU, 0x5aU, 0xf4U,
 | 
			
		||||
    0x1fU, 0xddU, 0xa8U, 0x33U, 0x88U, 0x07U, 0xc7U, 0x31U,
 | 
			
		||||
    0xb1U, 0x12U, 0x10U, 0x59U, 0x27U, 0x80U, 0xecU, 0x5fU,
 | 
			
		||||
    0x60U, 0x51U, 0x7fU, 0xa9U, 0x19U, 0xb5U, 0x4aU, 0x0dU,
 | 
			
		||||
    0x2dU, 0xe5U, 0x7aU, 0x9fU, 0x93U, 0xc9U, 0x9cU, 0xefU,
 | 
			
		||||
    0xa0U, 0xe0U, 0x3bU, 0x4dU, 0xaeU, 0x2aU, 0xf5U, 0xb0U,
 | 
			
		||||
    0xc8U, 0xebU, 0xbbU, 0x3cU, 0x83U, 0x53U, 0x99U, 0x61U,
 | 
			
		||||
    0x17U, 0x2bU, 0x04U, 0x7eU, 0xbaU, 0x77U, 0xd6U, 0x26U,
 | 
			
		||||
    0xe1U, 0x69U, 0x14U, 0x63U, 0x55U, 0x21U, 0x0cU, 0x7dU,
 | 
			
		||||
};
 | 
			
		||||
static const u32 rcon[] = {
 | 
			
		||||
	0x01000000, 0x02000000, 0x04000000, 0x08000000,
 | 
			
		||||
@@ -768,10 +653,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
			
		||||
		while (1) {
 | 
			
		||||
			temp  = rk[3];
 | 
			
		||||
			rk[4] = rk[0] ^
 | 
			
		||||
				(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
			
		||||
				(Te4[(temp >>  8) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te4[(temp      ) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te4[(temp >> 24)       ] & 0x000000ff) ^
 | 
			
		||||
				(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
			
		||||
				(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te1[(temp >> 24)       ] & 0x000000ff) ^
 | 
			
		||||
				rcon[i];
 | 
			
		||||
			rk[5] = rk[1] ^ rk[4];
 | 
			
		||||
			rk[6] = rk[2] ^ rk[5];
 | 
			
		||||
@@ -788,10 +673,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
			
		||||
		while (1) {
 | 
			
		||||
			temp = rk[ 5];
 | 
			
		||||
			rk[ 6] = rk[ 0] ^
 | 
			
		||||
				(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
			
		||||
				(Te4[(temp >>  8) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te4[(temp      ) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te4[(temp >> 24)       ] & 0x000000ff) ^
 | 
			
		||||
				(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
			
		||||
				(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te1[(temp >> 24)       ] & 0x000000ff) ^
 | 
			
		||||
				rcon[i];
 | 
			
		||||
			rk[ 7] = rk[ 1] ^ rk[ 6];
 | 
			
		||||
			rk[ 8] = rk[ 2] ^ rk[ 7];
 | 
			
		||||
@@ -810,10 +695,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
			
		||||
		while (1) {
 | 
			
		||||
			temp = rk[ 7];
 | 
			
		||||
			rk[ 8] = rk[ 0] ^
 | 
			
		||||
				(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
			
		||||
				(Te4[(temp >>  8) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te4[(temp      ) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te4[(temp >> 24)       ] & 0x000000ff) ^
 | 
			
		||||
				(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
			
		||||
				(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te1[(temp >> 24)       ] & 0x000000ff) ^
 | 
			
		||||
				rcon[i];
 | 
			
		||||
			rk[ 9] = rk[ 1] ^ rk[ 8];
 | 
			
		||||
			rk[10] = rk[ 2] ^ rk[ 9];
 | 
			
		||||
@@ -823,10 +708,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
			
		||||
			}
 | 
			
		||||
			temp = rk[11];
 | 
			
		||||
			rk[12] = rk[ 4] ^
 | 
			
		||||
				(Te4[(temp >> 24)       ] & 0xff000000) ^
 | 
			
		||||
				(Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te4[(temp >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te4[(temp      ) & 0xff] & 0x000000ff);
 | 
			
		||||
				(Te2[(temp >> 24)       ] & 0xff000000) ^
 | 
			
		||||
				(Te3[(temp >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
				(Te0[(temp >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
				(Te1[(temp      ) & 0xff] & 0x000000ff);
 | 
			
		||||
			rk[13] = rk[ 5] ^ rk[12];
 | 
			
		||||
			rk[14] = rk[ 6] ^ rk[13];
 | 
			
		||||
			rk[15] = rk[ 7] ^ rk[14];
 | 
			
		||||
@@ -865,25 +750,25 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
 | 
			
		||||
	for (i = 1; i < (key->rounds); i++) {
 | 
			
		||||
		rk += 4;
 | 
			
		||||
		rk[0] =
 | 
			
		||||
			Td0[Te4[(rk[0] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te4[(rk[0] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te4[(rk[0]      ) & 0xff] & 0xff];
 | 
			
		||||
			Td0[Te1[(rk[0] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te1[(rk[0] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te1[(rk[0] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te1[(rk[0]      ) & 0xff] & 0xff];
 | 
			
		||||
		rk[1] =
 | 
			
		||||
			Td0[Te4[(rk[1] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te4[(rk[1] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te4[(rk[1]      ) & 0xff] & 0xff];
 | 
			
		||||
			Td0[Te1[(rk[1] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te1[(rk[1] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te1[(rk[1] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te1[(rk[1]      ) & 0xff] & 0xff];
 | 
			
		||||
		rk[2] =
 | 
			
		||||
			Td0[Te4[(rk[2] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te4[(rk[2] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te4[(rk[2]      ) & 0xff] & 0xff];
 | 
			
		||||
			Td0[Te1[(rk[2] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te1[(rk[2] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te1[(rk[2] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te1[(rk[2]      ) & 0xff] & 0xff];
 | 
			
		||||
		rk[3] =
 | 
			
		||||
			Td0[Te4[(rk[3] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te4[(rk[3] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te4[(rk[3]      ) & 0xff] & 0xff];
 | 
			
		||||
			Td0[Te1[(rk[3] >> 24)       ] & 0xff] ^
 | 
			
		||||
			Td1[Te1[(rk[3] >> 16) & 0xff] & 0xff] ^
 | 
			
		||||
			Td2[Te1[(rk[3] >>  8) & 0xff] & 0xff] ^
 | 
			
		||||
			Td3[Te1[(rk[3]      ) & 0xff] & 0xff];
 | 
			
		||||
	}
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1051,31 +936,31 @@ void AES_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
	 * map cipher state to byte array block:
 | 
			
		||||
	 */
 | 
			
		||||
	s0 =
 | 
			
		||||
		(Te4[(t0 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te4[(t2 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te4[(t3      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		(Te2[(t0 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te3[(t1 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te0[(t2 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te1[(t3      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		rk[0];
 | 
			
		||||
	PUTU32(out     , s0);
 | 
			
		||||
	s1 =
 | 
			
		||||
		(Te4[(t1 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te4[(t3 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te4[(t0      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		(Te2[(t1 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te3[(t2 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te0[(t3 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te1[(t0      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		rk[1];
 | 
			
		||||
	PUTU32(out +  4, s1);
 | 
			
		||||
	s2 =
 | 
			
		||||
		(Te4[(t2 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te4[(t0 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te4[(t1      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		(Te2[(t2 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te3[(t3 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te0[(t0 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te1[(t1      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		rk[2];
 | 
			
		||||
	PUTU32(out +  8, s2);
 | 
			
		||||
	s3 =
 | 
			
		||||
		(Te4[(t3 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te4[(t1 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te4[(t2      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		(Te2[(t3 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
		(Te3[(t0 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
		(Te0[(t1 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
		(Te1[(t2      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
		rk[3];
 | 
			
		||||
	PUTU32(out + 12, s3);
 | 
			
		||||
}
 | 
			
		||||
@@ -1242,31 +1127,31 @@ void AES_decrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
	 * map cipher state to byte array block:
 | 
			
		||||
	 */
 | 
			
		||||
   	s0 =
 | 
			
		||||
   		(Td4[(t0 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
   		(Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
   		(Td4[(t2 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
   		(Td4[(t1      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
   		(Td4[(t0 >> 24)       ] << 24) ^
 | 
			
		||||
   		(Td4[(t3 >> 16) & 0xff] << 16) ^
 | 
			
		||||
   		(Td4[(t2 >>  8) & 0xff] <<  8) ^
 | 
			
		||||
   		(Td4[(t1      ) & 0xff])       ^
 | 
			
		||||
   		rk[0];
 | 
			
		||||
	PUTU32(out     , s0);
 | 
			
		||||
   	s1 =
 | 
			
		||||
   		(Td4[(t1 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
   		(Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
   		(Td4[(t3 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
   		(Td4[(t2      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
   		(Td4[(t1 >> 24)       ] << 24) ^
 | 
			
		||||
   		(Td4[(t0 >> 16) & 0xff] << 16) ^
 | 
			
		||||
   		(Td4[(t3 >>  8) & 0xff] <<  8) ^
 | 
			
		||||
   		(Td4[(t2      ) & 0xff])       ^
 | 
			
		||||
   		rk[1];
 | 
			
		||||
	PUTU32(out +  4, s1);
 | 
			
		||||
   	s2 =
 | 
			
		||||
   		(Td4[(t2 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
   		(Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
   		(Td4[(t0 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
   		(Td4[(t3      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
   		(Td4[(t2 >> 24)       ] << 24) ^
 | 
			
		||||
   		(Td4[(t1 >> 16) & 0xff] << 16) ^
 | 
			
		||||
   		(Td4[(t0 >>  8) & 0xff] <<  8) ^
 | 
			
		||||
   		(Td4[(t3      ) & 0xff])       ^
 | 
			
		||||
   		rk[2];
 | 
			
		||||
	PUTU32(out +  8, s2);
 | 
			
		||||
   	s3 =
 | 
			
		||||
   		(Td4[(t3 >> 24)       ] & 0xff000000) ^
 | 
			
		||||
   		(Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^
 | 
			
		||||
   		(Td4[(t1 >>  8) & 0xff] & 0x0000ff00) ^
 | 
			
		||||
   		(Td4[(t0      ) & 0xff] & 0x000000ff) ^
 | 
			
		||||
   		(Td4[(t3 >> 24)       ] << 24) ^
 | 
			
		||||
   		(Td4[(t2 >> 16) & 0xff] << 16) ^
 | 
			
		||||
   		(Td4[(t1 >>  8) & 0xff] <<  8) ^
 | 
			
		||||
   		(Td4[(t0      ) & 0xff])       ^
 | 
			
		||||
   		rk[3];
 | 
			
		||||
	PUTU32(out + 12, s3);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										323
									
								
								crypto/aes/aes_ige.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										323
									
								
								crypto/aes/aes_ige.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,323 @@
 | 
			
		||||
/* crypto/aes/aes_ige.c -*- mode:C; c-file-style: "eay" -*- */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 2006 The OpenSSL Project.  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. 
 | 
			
		||||
 *
 | 
			
		||||
 * 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.
 | 
			
		||||
 *
 | 
			
		||||
 * 3. All advertising materials mentioning features or use of this
 | 
			
		||||
 *    software must display the following acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 | 
			
		||||
 *    endorse or promote products derived from this software without
 | 
			
		||||
 *    prior written permission. For written permission, please contact
 | 
			
		||||
 *    openssl-core@openssl.org.
 | 
			
		||||
 *
 | 
			
		||||
 * 5. Products derived from this software may not be called "OpenSSL"
 | 
			
		||||
 *    nor may "OpenSSL" appear in their names without prior written
 | 
			
		||||
 *    permission of the OpenSSL Project.
 | 
			
		||||
 *
 | 
			
		||||
 * 6. Redistributions of any form whatsoever must retain the following
 | 
			
		||||
 *    acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESSED 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 OpenSSL PROJECT OR
 | 
			
		||||
 * ITS 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 "cryptlib.h"
 | 
			
		||||
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 | 
			
		||||
#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long))
 | 
			
		||||
typedef struct {
 | 
			
		||||
        unsigned long data[N_WORDS];
 | 
			
		||||
} aes_block_t;
 | 
			
		||||
 | 
			
		||||
/* XXX: probably some better way to do this */
 | 
			
		||||
#if defined(__i386__) || defined(__x86_64__)
 | 
			
		||||
#define UNALIGNED_MEMOPS_ARE_FAST 1
 | 
			
		||||
#else
 | 
			
		||||
#define UNALIGNED_MEMOPS_ARE_FAST 0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if UNALIGNED_MEMOPS_ARE_FAST
 | 
			
		||||
#define load_block(d, s)        (d) = *(const aes_block_t *)(s)
 | 
			
		||||
#define store_block(d, s)       *(aes_block_t *)(d) = (s)
 | 
			
		||||
#else
 | 
			
		||||
#define load_block(d, s)        memcpy((d).data, (s), AES_BLOCK_SIZE)
 | 
			
		||||
#define store_block(d, s)       memcpy((d), (s).data, AES_BLOCK_SIZE)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* N.B. The IV for this mode is _twice_ the block size */
 | 
			
		||||
 | 
			
		||||
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
					 const unsigned long length, const AES_KEY *key,
 | 
			
		||||
					 unsigned char *ivec, const int enc)
 | 
			
		||||
	{
 | 
			
		||||
	unsigned long n;
 | 
			
		||||
	unsigned long len;
 | 
			
		||||
 | 
			
		||||
	OPENSSL_assert(in && out && key && ivec);
 | 
			
		||||
	OPENSSL_assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
 | 
			
		||||
	OPENSSL_assert((length%AES_BLOCK_SIZE) == 0);
 | 
			
		||||
 | 
			
		||||
	len = length / AES_BLOCK_SIZE;
 | 
			
		||||
 | 
			
		||||
	if (AES_ENCRYPT == enc)
 | 
			
		||||
		{
 | 
			
		||||
		if (in != out &&
 | 
			
		||||
		    (UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
 | 
			
		||||
			{
 | 
			
		||||
			aes_block_t *ivp = (aes_block_t *)ivec;
 | 
			
		||||
			aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
 | 
			
		||||
 | 
			
		||||
			while (len)
 | 
			
		||||
				{
 | 
			
		||||
				aes_block_t *inp = (aes_block_t *)in;
 | 
			
		||||
				aes_block_t *outp = (aes_block_t *)out;
 | 
			
		||||
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					outp->data[n] = inp->data[n] ^ ivp->data[n];
 | 
			
		||||
				AES_encrypt((unsigned char *)outp->data, (unsigned char *)outp->data, key);
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					outp->data[n] ^= iv2p->data[n];
 | 
			
		||||
				ivp = outp;
 | 
			
		||||
				iv2p = inp;
 | 
			
		||||
				--len;
 | 
			
		||||
				in += AES_BLOCK_SIZE;
 | 
			
		||||
				out += AES_BLOCK_SIZE;
 | 
			
		||||
				}
 | 
			
		||||
			memcpy(ivec, ivp->data, AES_BLOCK_SIZE);
 | 
			
		||||
			memcpy(ivec + AES_BLOCK_SIZE, iv2p->data, AES_BLOCK_SIZE);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			aes_block_t tmp, tmp2;
 | 
			
		||||
			aes_block_t iv;
 | 
			
		||||
			aes_block_t iv2;
 | 
			
		||||
 | 
			
		||||
			load_block(iv, ivec);
 | 
			
		||||
			load_block(iv2, ivec + AES_BLOCK_SIZE);
 | 
			
		||||
 | 
			
		||||
			while (len)
 | 
			
		||||
				{
 | 
			
		||||
				load_block(tmp, in);
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					tmp2.data[n] = tmp.data[n] ^ iv.data[n];
 | 
			
		||||
				AES_encrypt((unsigned char *)tmp2.data, (unsigned char *)tmp2.data, key);
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					tmp2.data[n] ^= iv2.data[n];
 | 
			
		||||
				store_block(out, tmp2);
 | 
			
		||||
				iv = tmp2;
 | 
			
		||||
				iv2 = tmp;
 | 
			
		||||
				--len;
 | 
			
		||||
				in += AES_BLOCK_SIZE;
 | 
			
		||||
				out += AES_BLOCK_SIZE;
 | 
			
		||||
				}
 | 
			
		||||
			memcpy(ivec, iv.data, AES_BLOCK_SIZE);
 | 
			
		||||
			memcpy(ivec + AES_BLOCK_SIZE, iv2.data, AES_BLOCK_SIZE);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		if (in != out &&
 | 
			
		||||
		    (UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
 | 
			
		||||
			{
 | 
			
		||||
			aes_block_t *ivp = (aes_block_t *)ivec;
 | 
			
		||||
			aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
 | 
			
		||||
 | 
			
		||||
			while (len)
 | 
			
		||||
				{
 | 
			
		||||
				aes_block_t tmp;
 | 
			
		||||
				aes_block_t *inp = (aes_block_t *)in;
 | 
			
		||||
				aes_block_t *outp = (aes_block_t *)out;
 | 
			
		||||
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					tmp.data[n] = inp->data[n] ^ iv2p->data[n];
 | 
			
		||||
				AES_decrypt((unsigned char *)tmp.data, (unsigned char *)outp->data, key);
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					outp->data[n] ^= ivp->data[n];
 | 
			
		||||
				ivp = inp;
 | 
			
		||||
				iv2p = outp;
 | 
			
		||||
				--len;
 | 
			
		||||
				in += AES_BLOCK_SIZE;
 | 
			
		||||
				out += AES_BLOCK_SIZE;
 | 
			
		||||
				}
 | 
			
		||||
			memcpy(ivec, ivp->data, AES_BLOCK_SIZE);
 | 
			
		||||
			memcpy(ivec + AES_BLOCK_SIZE, iv2p->data, AES_BLOCK_SIZE);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			aes_block_t tmp, tmp2;
 | 
			
		||||
			aes_block_t iv;
 | 
			
		||||
			aes_block_t iv2;
 | 
			
		||||
 | 
			
		||||
			load_block(iv, ivec);
 | 
			
		||||
			load_block(iv2, ivec + AES_BLOCK_SIZE);
 | 
			
		||||
 | 
			
		||||
			while (len)
 | 
			
		||||
				{
 | 
			
		||||
				load_block(tmp, in);
 | 
			
		||||
				tmp2 = tmp;
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					tmp.data[n] ^= iv2.data[n];
 | 
			
		||||
				AES_decrypt((unsigned char *)tmp.data, (unsigned char *)tmp.data, key);
 | 
			
		||||
				for(n=0 ; n < N_WORDS; ++n)
 | 
			
		||||
					tmp.data[n] ^= iv.data[n];
 | 
			
		||||
				store_block(out, tmp);
 | 
			
		||||
				iv = tmp2;
 | 
			
		||||
				iv2 = tmp;
 | 
			
		||||
				--len;
 | 
			
		||||
				in += AES_BLOCK_SIZE;
 | 
			
		||||
				out += AES_BLOCK_SIZE;
 | 
			
		||||
				}
 | 
			
		||||
			memcpy(ivec, iv.data, AES_BLOCK_SIZE);
 | 
			
		||||
			memcpy(ivec + AES_BLOCK_SIZE, iv2.data, AES_BLOCK_SIZE);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Note that its effectively impossible to do biIGE in anything other
 | 
			
		||||
 * than a single pass, so no provision is made for chaining.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* N.B. The IV for this mode is _four times_ the block size */
 | 
			
		||||
 | 
			
		||||
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
						const unsigned long length, const AES_KEY *key,
 | 
			
		||||
						const AES_KEY *key2, const unsigned char *ivec,
 | 
			
		||||
						const int enc)
 | 
			
		||||
	{
 | 
			
		||||
	unsigned long n;
 | 
			
		||||
	unsigned long len = length;
 | 
			
		||||
	unsigned char tmp[AES_BLOCK_SIZE];
 | 
			
		||||
	unsigned char tmp2[AES_BLOCK_SIZE];
 | 
			
		||||
	unsigned char tmp3[AES_BLOCK_SIZE];
 | 
			
		||||
	unsigned char prev[AES_BLOCK_SIZE];
 | 
			
		||||
	const unsigned char *iv;
 | 
			
		||||
	const unsigned char *iv2;
 | 
			
		||||
 | 
			
		||||
	OPENSSL_assert(in && out && key && ivec);
 | 
			
		||||
	OPENSSL_assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
 | 
			
		||||
	OPENSSL_assert((length%AES_BLOCK_SIZE) == 0);
 | 
			
		||||
 | 
			
		||||
	if (AES_ENCRYPT == enc)
 | 
			
		||||
		{
 | 
			
		||||
		/* XXX: Do a separate case for when in != out (strictly should
 | 
			
		||||
		   check for overlap, too) */
 | 
			
		||||
 | 
			
		||||
		/* First the forward pass */ 
 | 
			
		||||
		iv = ivec;
 | 
			
		||||
		iv2 = ivec + AES_BLOCK_SIZE;
 | 
			
		||||
		while (len >= AES_BLOCK_SIZE)
 | 
			
		||||
			{
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				out[n] = in[n] ^ iv[n];
 | 
			
		||||
			AES_encrypt(out, out, key);
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				out[n] ^= iv2[n];
 | 
			
		||||
			iv = out;
 | 
			
		||||
			memcpy(prev, in, AES_BLOCK_SIZE);
 | 
			
		||||
			iv2 = prev;
 | 
			
		||||
			len -= AES_BLOCK_SIZE;
 | 
			
		||||
			in += AES_BLOCK_SIZE;
 | 
			
		||||
			out += AES_BLOCK_SIZE;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		/* And now backwards */
 | 
			
		||||
		iv = ivec + AES_BLOCK_SIZE*2;
 | 
			
		||||
		iv2 = ivec + AES_BLOCK_SIZE*3;
 | 
			
		||||
		len = length;
 | 
			
		||||
		while(len >= AES_BLOCK_SIZE)
 | 
			
		||||
			{
 | 
			
		||||
			out -= AES_BLOCK_SIZE;
 | 
			
		||||
			/* XXX: reduce copies by alternating between buffers */
 | 
			
		||||
			memcpy(tmp, out, AES_BLOCK_SIZE);
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				out[n] ^= iv[n];
 | 
			
		||||
			/*			hexdump(stdout, "out ^ iv", out, AES_BLOCK_SIZE); */
 | 
			
		||||
			AES_encrypt(out, out, key);
 | 
			
		||||
			/*			hexdump(stdout,"enc", out, AES_BLOCK_SIZE); */
 | 
			
		||||
			/*			hexdump(stdout,"iv2", iv2, AES_BLOCK_SIZE); */
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				out[n] ^= iv2[n];
 | 
			
		||||
			/*			hexdump(stdout,"out", out, AES_BLOCK_SIZE); */
 | 
			
		||||
			iv = out;
 | 
			
		||||
			memcpy(prev, tmp, AES_BLOCK_SIZE);
 | 
			
		||||
			iv2 = prev;
 | 
			
		||||
			len -= AES_BLOCK_SIZE;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		/* First backwards */
 | 
			
		||||
		iv = ivec + AES_BLOCK_SIZE*2;
 | 
			
		||||
		iv2 = ivec + AES_BLOCK_SIZE*3;
 | 
			
		||||
		in += length;
 | 
			
		||||
		out += length;
 | 
			
		||||
		while (len >= AES_BLOCK_SIZE)
 | 
			
		||||
			{
 | 
			
		||||
			in -= AES_BLOCK_SIZE;
 | 
			
		||||
			out -= AES_BLOCK_SIZE;
 | 
			
		||||
			memcpy(tmp, in, AES_BLOCK_SIZE);
 | 
			
		||||
			memcpy(tmp2, in, AES_BLOCK_SIZE);
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				tmp[n] ^= iv2[n];
 | 
			
		||||
			AES_decrypt(tmp, out, key);
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				out[n] ^= iv[n];
 | 
			
		||||
			memcpy(tmp3, tmp2, AES_BLOCK_SIZE);
 | 
			
		||||
			iv = tmp3;
 | 
			
		||||
			iv2 = out;
 | 
			
		||||
			len -= AES_BLOCK_SIZE;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		/* And now forwards */
 | 
			
		||||
		iv = ivec;
 | 
			
		||||
		iv2 = ivec + AES_BLOCK_SIZE;
 | 
			
		||||
		len = length;
 | 
			
		||||
		while (len >= AES_BLOCK_SIZE)
 | 
			
		||||
			{
 | 
			
		||||
			memcpy(tmp, out, AES_BLOCK_SIZE);
 | 
			
		||||
			memcpy(tmp2, out, AES_BLOCK_SIZE);
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				tmp[n] ^= iv2[n];
 | 
			
		||||
			AES_decrypt(tmp, out, key);
 | 
			
		||||
			for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
			
		||||
				out[n] ^= iv[n];
 | 
			
		||||
			memcpy(tmp3, tmp2, AES_BLOCK_SIZE);
 | 
			
		||||
			iv = tmp3;
 | 
			
		||||
			iv2 = out;
 | 
			
		||||
			len -= AES_BLOCK_SIZE;
 | 
			
		||||
			in += AES_BLOCK_SIZE;
 | 
			
		||||
			out += AES_BLOCK_SIZE;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@@ -62,7 +62,7 @@
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#if defined(_MSC_VER) && !defined(_M_IA64) && !defined(OPENSSL_SYS_WINCE)
 | 
			
		||||
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64))
 | 
			
		||||
# 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)); }
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user