Compare commits
	
		
			1288 Commits
		
	
	
		
			OpenSSL-en
			...
			OpenSSL_0_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					04572965ea | ||
| 
						 | 
					1832f5e751 | ||
| 
						 | 
					d3f56a69fb | ||
| 
						 | 
					bfbc667397 | ||
| 
						 | 
					cb284033f5 | ||
| 
						 | 
					ef9d3a10c3 | ||
| 
						 | 
					20c9a50710 | ||
| 
						 | 
					5b9aa0e474 | ||
| 
						 | 
					475cc45a61 | ||
| 
						 | 
					21fa937c9f | ||
| 
						 | 
					bae500aa21 | ||
| 
						 | 
					5534b7f133 | ||
| 
						 | 
					163d6401c5 | ||
| 
						 | 
					fc24169eaf | ||
| 
						 | 
					0c78046356 | ||
| 
						 | 
					4b8e01a22f | ||
| 
						 | 
					a882c80e6f | ||
| 
						 | 
					5de00c254d | ||
| 
						 | 
					d7b612e737 | ||
| 
						 | 
					d95b69b32c | ||
| 
						 | 
					1dbfa26b5a | ||
| 
						 | 
					342a584c2b | ||
| 
						 | 
					718d8a931d | ||
| 
						 | 
					39db27cb83 | ||
| 
						 | 
					cc81432b5b | ||
| 
						 | 
					c71414b3a9 | ||
| 
						 | 
					542e010aa5 | ||
| 
						 | 
					84ce9aa177 | ||
| 
						 | 
					4c94c028a7 | ||
| 
						 | 
					88a908e50d | ||
| 
						 | 
					d7de7bcf3e | ||
| 
						 | 
					cbdda5cc87 | ||
| 
						 | 
					4e356d9876 | ||
| 
						 | 
					ff3ab1699b | ||
| 
						 | 
					8eeefabf32 | ||
| 
						 | 
					214b8b998a | ||
| 
						 | 
					2ef9e7efe6 | ||
| 
						 | 
					449598e723 | ||
| 
						 | 
					5201cb5acb | ||
| 
						 | 
					ab79ac44d5 | ||
| 
						 | 
					e286dfe6ed | ||
| 
						 | 
					17e3b273e6 | ||
| 
						 | 
					c93c8d1123 | ||
| 
						 | 
					d5bf2e06b3 | ||
| 
						 | 
					bbd6c8bd16 | ||
| 
						 | 
					00f76ad0df | ||
| 
						 | 
					4b70367430 | ||
| 
						 | 
					ce9cbfc815 | ||
| 
						 | 
					a92a9f02fb | ||
| 
						 | 
					b65d3741b3 | ||
| 
						 | 
					fcf8f4d453 | ||
| 
						 | 
					13617646da | ||
| 
						 | 
					7a3565009e | ||
| 
						 | 
					9f3864fde3 | ||
| 
						 | 
					db186beee4 | ||
| 
						 | 
					1f1a32541f | ||
| 
						 | 
					0465313e70 | ||
| 
						 | 
					8d2563f136 | ||
| 
						 | 
					21996c6d8e | ||
| 
						 | 
					fcc5349156 | ||
| 
						 | 
					1a07628209 | ||
| 
						 | 
					814af7e175 | ||
| 
						 | 
					bf683ec609 | ||
| 
						 | 
					e851895f04 | ||
| 
						 | 
					a2049ba394 | ||
| 
						 | 
					a8239afc86 | ||
| 
						 | 
					bb38cd49e4 | ||
| 
						 | 
					1cbdbcd587 | ||
| 
						 | 
					7e201e9f73 | ||
| 
						 | 
					2f98abbcb6 | ||
| 
						 | 
					270fa8aeda | ||
| 
						 | 
					9fc866c5eb | ||
| 
						 | 
					4329db3726 | ||
| 
						 | 
					6f7ac8e1b0 | ||
| 
						 | 
					b0e88fb11b | ||
| 
						 | 
					04c71cd725 | ||
| 
						 | 
					a1457874c6 | ||
| 
						 | 
					d64b16ab25 | ||
| 
						 | 
					18be6c4116 | ||
| 
						 | 
					f30b793779 | ||
| 
						 | 
					dad1535f7a | ||
| 
						 | 
					f60e6604b8 | ||
| 
						 | 
					94ea9c84c5 | ||
| 
						 | 
					0d3f2ccb62 | ||
| 
						 | 
					5c72869563 | ||
| 
						 | 
					14676ffcd6 | ||
| 
						 | 
					e5a08ce44d | ||
| 
						 | 
					712419b73a | ||
| 
						 | 
					b9b6e14b4a | ||
| 
						 | 
					7627efc92f | ||
| 
						 | 
					442d42300b | ||
| 
						 | 
					cd7f458e28 | ||
| 
						 | 
					75e1c74724 | ||
| 
						 | 
					ea01493df0 | ||
| 
						 | 
					5db2b5e573 | ||
| 
						 | 
					323edf1908 | ||
| 
						 | 
					005ef84c5d | ||
| 
						 | 
					f92570f00a | ||
| 
						 | 
					9314e366c8 | ||
| 
						 | 
					ba9cf37d59 | ||
| 
						 | 
					b22c7a1cfb | ||
| 
						 | 
					99efc0f50f | ||
| 
						 | 
					d979d09ccc | ||
| 
						 | 
					2581aacd52 | ||
| 
						 | 
					c17810b087 | ||
| 
						 | 
					e0b2073fd4 | ||
| 
						 | 
					123e5dfc3a | ||
| 
						 | 
					533a0c4ce7 | ||
| 
						 | 
					0edad88a31 | ||
| 
						 | 
					4ccfe5f49b | ||
| 
						 | 
					e189872486 | ||
| 
						 | 
					fdaea9ed2e | ||
| 
						 | 
					5daec7ea0e | ||
| 
						 | 
					e9224c7177 | ||
| 
						 | 
					e90e719739 | ||
| 
						 | 
					7ba666fa0e | ||
| 
						 | 
					86a62cf15c | ||
| 
						 | 
					b11405723d | ||
| 
						 | 
					4c3a2b4f8a | ||
| 
						 | 
					93f3decc4f | ||
| 
						 | 
					bbf8198feb | ||
| 
						 | 
					1c799131ae | ||
| 
						 | 
					b1d4b48d39 | ||
| 
						 | 
					bed4559052 | ||
| 
						 | 
					3dda0dd2a2 | ||
| 
						 | 
					7f87c1c0fc | ||
| 
						 | 
					fa63a98ad8 | ||
| 
						 | 
					1fc73fef48 | ||
| 
						 | 
					aaf7b47abe | ||
| 
						 | 
					af0b30e77c | ||
| 
						 | 
					90543bd07a | ||
| 
						 | 
					9494e3cc40 | ||
| 
						 | 
					a272f7eb08 | ||
| 
						 | 
					43ecece595 | ||
| 
						 | 
					b3dd9f3bb5 | ||
| 
						 | 
					4ba8cabf62 | ||
| 
						 | 
					bb9104f0ee | ||
| 
						 | 
					f68bb3c51f | ||
| 
						 | 
					6d4ac67ac1 | ||
| 
						 | 
					ae0b7667a9 | ||
| 
						 | 
					b84d5b72f1 | ||
| 
						 | 
					8cbccedf7c | ||
| 
						 | 
					fabf7d3a67 | ||
| 
						 | 
					1c24347062 | ||
| 
						 | 
					54307ce955 | ||
| 
						 | 
					9ef888130d | ||
| 
						 | 
					2589b74fd8 | ||
| 
						 | 
					4387f47832 | ||
| 
						 | 
					d9090acdfb | ||
| 
						 | 
					38d6e4bb50 | ||
| 
						 | 
					ced621e3c2 | ||
| 
						 | 
					72951df799 | ||
| 
						 | 
					85940ea8ea | ||
| 
						 | 
					a9b41af71c | ||
| 
						 | 
					439ae4d398 | ||
| 
						 | 
					a0ed612fef | ||
| 
						 | 
					4fbe40c54f | ||
| 
						 | 
					afdec73ca5 | ||
| 
						 | 
					578ca7e4cd | ||
| 
						 | 
					7e8c30b589 | ||
| 
						 | 
					2b32b28191 | ||
| 
						 | 
					532215f2db | ||
| 
						 | 
					2e70cb6506 | ||
| 
						 | 
					1794904a4a | ||
| 
						 | 
					5319be4438 | ||
| 
						 | 
					fd28279a62 | ||
| 
						 | 
					f7a3e73ef6 | ||
| 
						 | 
					6b27ae1d94 | ||
| 
						 | 
					ff3345cb72 | ||
| 
						 | 
					a6ee8fe26a | ||
| 
						 | 
					716b2079dc | ||
| 
						 | 
					e7b6228fd3 | ||
| 
						 | 
					e758ce69a3 | ||
| 
						 | 
					2053c43de2 | ||
| 
						 | 
					38b085902f | ||
| 
						 | 
					27498a3330 | ||
| 
						 | 
					1c3e4a3660 | ||
| 
						 | 
					49cd4b7316 | ||
| 
						 | 
					4707991520 | ||
| 
						 | 
					a067cba35b | ||
| 
						 | 
					7a1f92fdc3 | ||
| 
						 | 
					2905015c6e | ||
| 
						 | 
					610abd4c52 | ||
| 
						 | 
					e7a285694e | ||
| 
						 | 
					6ab285bf4c | ||
| 
						 | 
					ddc6ea162f | ||
| 
						 | 
					1d3159bcca | ||
| 
						 | 
					f60ceb54eb | ||
| 
						 | 
					b8804bf15d | ||
| 
						 | 
					0f995b2f40 | ||
| 
						 | 
					d03ad453a5 | ||
| 
						 | 
					848f735ae4 | ||
| 
						 | 
					3f71579dfc | ||
| 
						 | 
					a678430602 | ||
| 
						 | 
					f217439ee2 | ||
| 
						 | 
					e9b553dac1 | ||
| 
						 | 
					9d8f3cfb7f | ||
| 
						 | 
					d5c79928ef | ||
| 
						 | 
					db3758923b | ||
| 
						 | 
					37529750e2 | ||
| 
						 | 
					5e4a75e79f | ||
| 
						 | 
					c9ea7400b4 | ||
| 
						 | 
					43d601641f | ||
| 
						 | 
					9fa15b6ff8 | ||
| 
						 | 
					55f78baf32 | ||
| 
						 | 
					9c44ebc1e2 | ||
| 
						 | 
					6c359479d7 | ||
| 
						 | 
					75e3026a14 | ||
| 
						 | 
					4579924b7e | ||
| 
						 | 
					2047bda6fb | ||
| 
						 | 
					406c6f6962 | ||
| 
						 | 
					0a3af9a403 | ||
| 
						 | 
					3a08cf3bfb | ||
| 
						 | 
					df29cc8f77 | ||
| 
						 | 
					ec7164133d | ||
| 
						 | 
					8826087a97 | ||
| 
						 | 
					8aa09a245c | ||
| 
						 | 
					ba8ad07490 | ||
| 
						 | 
					17582ccf21 | ||
| 
						 | 
					a5fd84de41 | ||
| 
						 | 
					31be2daa06 | ||
| 
						 | 
					dc199cfaa2 | ||
| 
						 | 
					de868e0b94 | ||
| 
						 | 
					b81ef84227 | ||
| 
						 | 
					15994b034a | ||
| 
						 | 
					922fa76e26 | ||
| 
						 | 
					19aa370573 | ||
| 
						 | 
					d020e701bb | ||
| 
						 | 
					91203a9482 | ||
| 
						 | 
					364ff369d1 | ||
| 
						 | 
					134fea9d0f | ||
| 
						 | 
					8a09b3866a | ||
| 
						 | 
					137445140b | ||
| 
						 | 
					6a8afe2201 | ||
| 
						 | 
					a153c46d7f | ||
| 
						 | 
					1e3a9b650f | ||
| 
						 | 
					8faad520ae | ||
| 
						 | 
					229dc0ee31 | ||
| 
						 | 
					fcc764639d | ||
| 
						 | 
					8f89ae928b | ||
| 
						 | 
					821385ad00 | ||
| 
						 | 
					782ded56e5 | ||
| 
						 | 
					25ff76d565 | ||
| 
						 | 
					8e458d52b5 | ||
| 
						 | 
					1f475c1f6f | ||
| 
						 | 
					bc9867e672 | ||
| 
						 | 
					9801fb61d0 | ||
| 
						 | 
					20199ca809 | ||
| 
						 | 
					711f1a3c26 | ||
| 
						 | 
					412fd4708d | ||
| 
						 | 
					a1d85309ee | ||
| 
						 | 
					273c624442 | ||
| 
						 | 
					450cee5c3a | ||
| 
						 | 
					a2dbcf3644 | ||
| 
						 | 
					4663355496 | ||
| 
						 | 
					8b591c2f8e | ||
| 
						 | 
					9dc610495c | ||
| 
						 | 
					8f4a23e3b7 | ||
| 
						 | 
					055076cd4f | ||
| 
						 | 
					c83d8e2ba6 | ||
| 
						 | 
					527497a722 | ||
| 
						 | 
					32d21c1ef6 | ||
| 
						 | 
					6afc70be84 | ||
| 
						 | 
					f503c2c9e6 | ||
| 
						 | 
					629b58b7fb | ||
| 
						 | 
					7656893d51 | ||
| 
						 | 
					7fa2a81d34 | ||
| 
						 | 
					ff38d68237 | ||
| 
						 | 
					7f66ab4783 | ||
| 
						 | 
					95189389b0 | ||
| 
						 | 
					aff3e60754 | ||
| 
						 | 
					8196d87371 | ||
| 
						 | 
					b4b82ab465 | ||
| 
						 | 
					61b1ad197a | ||
| 
						 | 
					89618e7a0d | ||
| 
						 | 
					293bb4b1b8 | ||
| 
						 | 
					b87e2576b5 | ||
| 
						 | 
					29ca164513 | ||
| 
						 | 
					97d58eadbf | ||
| 
						 | 
					0bf23d9b20 | ||
| 
						 | 
					813f256783 | ||
| 
						 | 
					8cdeec9f54 | ||
| 
						 | 
					bfa96bc20e | ||
| 
						 | 
					082cd4e564 | ||
| 
						 | 
					6f17f16fd5 | ||
| 
						 | 
					2115a89212 | ||
| 
						 | 
					84034f7aec | ||
| 
						 | 
					acce40c585 | ||
| 
						 | 
					af3ec1e24e | ||
| 
						 | 
					6dc78bf7e8 | ||
| 
						 | 
					f275683ae8 | ||
| 
						 | 
					ce4f169ff9 | ||
| 
						 | 
					c566205319 | ||
| 
						 | 
					da91e37d37 | ||
| 
						 | 
					2758c44398 | ||
| 
						 | 
					eaf6c61c9f | ||
| 
						 | 
					4e056a2894 | ||
| 
						 | 
					4c53d11d7f | ||
| 
						 | 
					f60b017da8 | ||
| 
						 | 
					1d647444e3 | ||
| 
						 | 
					08634f1156 | ||
| 
						 | 
					c1eeb6078f | ||
| 
						 | 
					a50d6a801f | ||
| 
						 | 
					953db08416 | ||
| 
						 | 
					0439a5a8a7 | ||
| 
						 | 
					0a5942093e | ||
| 
						 | 
					d78254aa28 | ||
| 
						 | 
					af67804bef | ||
| 
						 | 
					8ffe66b4ce | ||
| 
						 | 
					d62ec8362a | ||
| 
						 | 
					35a6db8640 | ||
| 
						 | 
					56dc24d483 | ||
| 
						 | 
					84d828ab70 | ||
| 
						 | 
					259b33d5a3 | ||
| 
						 | 
					cfae3d94e9 | ||
| 
						 | 
					6393c09cda | ||
| 
						 | 
					9421f1ab9c | ||
| 
						 | 
					b9c23cca01 | ||
| 
						 | 
					5bf0d0ea1e | ||
| 
						 | 
					c863201780 | ||
| 
						 | 
					cb21d001c9 | ||
| 
						 | 
					769f74b818 | ||
| 
						 | 
					c7faede37b | ||
| 
						 | 
					64051a3a71 | ||
| 
						 | 
					d4e573f305 | ||
| 
						 | 
					8260eded07 | ||
| 
						 | 
					e20afbb340 | ||
| 
						 | 
					2b2ab52354 | ||
| 
						 | 
					402b4a784d | ||
| 
						 | 
					651e7ddf7e | ||
| 
						 | 
					40bace2da6 | ||
| 
						 | 
					8d6e60486f | ||
| 
						 | 
					1f30946481 | ||
| 
						 | 
					e89c82f549 | ||
| 
						 | 
					b1697f189b | ||
| 
						 | 
					812d100d06 | ||
| 
						 | 
					17a202add7 | ||
| 
						 | 
					b759742352 | ||
| 
						 | 
					3bd16a8902 | ||
| 
						 | 
					555d75252a | ||
| 
						 | 
					eaad02a747 | ||
| 
						 | 
					475e4d23bd | ||
| 
						 | 
					bf4ae6dcfa | ||
| 
						 | 
					97101fafd5 | ||
| 
						 | 
					17d4f07658 | ||
| 
						 | 
					403f1bdc70 | ||
| 
						 | 
					5ec797f263 | ||
| 
						 | 
					d574d83993 | ||
| 
						 | 
					83411793b6 | ||
| 
						 | 
					5b1aea7afe | ||
| 
						 | 
					65caee44ff | ||
| 
						 | 
					327e113775 | ||
| 
						 | 
					58f3009aba | ||
| 
						 | 
					738554331b | ||
| 
						 | 
					b193f29a9b | ||
| 
						 | 
					3f083ef0eb | ||
| 
						 | 
					17ed6c06a7 | ||
| 
						 | 
					c112323dd5 | ||
| 
						 | 
					0709385d3c | ||
| 
						 | 
					7ab58bf012 | ||
| 
						 | 
					54a656ef08 | ||
| 
						 | 
					8f797f14b8 | ||
| 
						 | 
					cd10ba9c39 | ||
| 
						 | 
					c0d64de660 | ||
| 
						 | 
					96a3369c4a | ||
| 
						 | 
					c1ce8cf3b8 | ||
| 
						 | 
					e8ad570e3f | ||
| 
						 | 
					ad1ddf413c | ||
| 
						 | 
					2d780dfd81 | ||
| 
						 | 
					b6fee5c2fb | ||
| 
						 | 
					e2c2152be9 | ||
| 
						 | 
					10fa047622 | ||
| 
						 | 
					919b2a9673 | ||
| 
						 | 
					024a20905d | ||
| 
						 | 
					04f0a6ba39 | ||
| 
						 | 
					eb43641dd3 | ||
| 
						 | 
					69ba8a00ad | ||
| 
						 | 
					f6a0c4f853 | ||
| 
						 | 
					040ade9bee | ||
| 
						 | 
					d479dc1d02 | ||
| 
						 | 
					7fb8d254fe | ||
| 
						 | 
					c99935e32c | ||
| 
						 | 
					2232e262bf | ||
| 
						 | 
					137e7e3aa1 | ||
| 
						 | 
					ba36b61d3d | ||
| 
						 | 
					ccb13ded84 | ||
| 
						 | 
					46ce790727 | ||
| 
						 | 
					9ea1b87862 | ||
| 
						 | 
					9831d941ca | ||
| 
						 | 
					707ceb29e0 | ||
| 
						 | 
					688cf84d1f | ||
| 
						 | 
					3d470fc7b7 | ||
| 
						 | 
					69ce48c307 | ||
| 
						 | 
					edb7b28a00 | ||
| 
						 | 
					06b7c8d5ba | ||
| 
						 | 
					c4efde7403 | ||
| 
						 | 
					a1edc87664 | ||
| 
						 | 
					6722b62b36 | ||
| 
						 | 
					7d80b27949 | ||
| 
						 | 
					9cbc3356e7 | ||
| 
						 | 
					d742bd882e | ||
| 
						 | 
					97a06ad9ef | ||
| 
						 | 
					756b9a0046 | ||
| 
						 | 
					9161c2ff51 | ||
| 
						 | 
					96c930dd2f | ||
| 
						 | 
					21f8cf65e6 | ||
| 
						 | 
					8bcc049399 | ||
| 
						 | 
					95900b8592 | ||
| 
						 | 
					c81a15099a | ||
| 
						 | 
					20a50cb517 | ||
| 
						 | 
					a8c125550c | ||
| 
						 | 
					3782350c14 | ||
| 
						 | 
					a71a482250 | ||
| 
						 | 
					d6257073aa | ||
| 
						 | 
					8b6ee018c2 | ||
| 
						 | 
					ddff68bee7 | ||
| 
						 | 
					ddab3c9327 | ||
| 
						 | 
					491659c436 | ||
| 
						 | 
					6a9a7ff259 | ||
| 
						 | 
					8d6fc30bc7 | ||
| 
						 | 
					56824b9658 | ||
| 
						 | 
					f7cd5462c9 | ||
| 
						 | 
					892e9625d3 | ||
| 
						 | 
					e2916b2540 | ||
| 
						 | 
					d268511c84 | ||
| 
						 | 
					1810d2088e | ||
| 
						 | 
					d618f703ec | ||
| 
						 | 
					190467767e | ||
| 
						 | 
					896e4fef30 | ||
| 
						 | 
					8d699c8c93 | ||
| 
						 | 
					38c7271a39 | ||
| 
						 | 
					e2a93e38d6 | ||
| 
						 | 
					5e3247d8bc | ||
| 
						 | 
					41c2fb962c | ||
| 
						 | 
					b53e44e572 | ||
| 
						 | 
					e5f4d8279d | ||
| 
						 | 
					455bacd4d3 | ||
| 
						 | 
					86e8b56ac4 | ||
| 
						 | 
					e85cbdad7a | ||
| 
						 | 
					bff1567623 | ||
| 
						 | 
					db199abd9e | ||
| 
						 | 
					b6d0defb98 | ||
| 
						 | 
					c752563e43 | ||
| 
						 | 
					ad22b914d6 | ||
| 
						 | 
					f216fae545 | ||
| 
						 | 
					242823c9bc | ||
| 
						 | 
					0eae6cd5f2 | ||
| 
						 | 
					40efa67248 | ||
| 
						 | 
					0bf707e346 | ||
| 
						 | 
					769fedc3ad | ||
| 
						 | 
					9c3db400dc | ||
| 
						 | 
					96a2c35d91 | ||
| 
						 | 
					d9ec9d990f | ||
| 
						 | 
					f9fde13590 | ||
| 
						 | 
					74174b9d05 | ||
| 
						 | 
					b5148cf1f7 | ||
| 
						 | 
					90a617e050 | ||
| 
						 | 
					259cdf2af9 | ||
| 
						 | 
					6c950e0dc9 | ||
| 
						 | 
					62dd6f161a | ||
| 
						 | 
					6aba658cd8 | ||
| 
						 | 
					89eda1fc01 | ||
| 
						 | 
					accb0c6edb | ||
| 
						 | 
					bbec79a0c1 | ||
| 
						 | 
					e0db2eed8d | ||
| 
						 | 
					6f7ba4be1f | ||
| 
						 | 
					2ccb522c5b | ||
| 
						 | 
					00a357ab20 | ||
| 
						 | 
					8ee4845b65 | ||
| 
						 | 
					19b8d06a79 | ||
| 
						 | 
					5c6bf03117 | ||
| 
						 | 
					f72ed6153b | ||
| 
						 | 
					0bf76767b0 | ||
| 
						 | 
					d652a0957f | ||
| 
						 | 
					fbcd27907b | ||
| 
						 | 
					a551bea52e | ||
| 
						 | 
					6cb686208e | ||
| 
						 | 
					732c9fe179 | ||
| 
						 | 
					bd1fb77245 | ||
| 
						 | 
					d610d27f30 | ||
| 
						 | 
					4f99ab58f7 | ||
| 
						 | 
					339abc9bd9 | ||
| 
						 | 
					4407fbc2d4 | ||
| 
						 | 
					96b35c9e26 | ||
| 
						 | 
					27f08d6d48 | ||
| 
						 | 
					907a8f1e6e | ||
| 
						 | 
					e1c191fe44 | ||
| 
						 | 
					a9e0953900 | ||
| 
						 | 
					9597027693 | ||
| 
						 | 
					5aa3429c5d | ||
| 
						 | 
					ffd418f217 | ||
| 
						 | 
					78f41a4e89 | ||
| 
						 | 
					76dcae8020 | ||
| 
						 | 
					0711be1696 | ||
| 
						 | 
					190ef122b2 | ||
| 
						 | 
					7521ab3d0b | ||
| 
						 | 
					0587ec2645 | ||
| 
						 | 
					b76d66fbf6 | ||
| 
						 | 
					06f851f721 | ||
| 
						 | 
					f6661d391c | ||
| 
						 | 
					284b216b3a | ||
| 
						 | 
					dc74e7d5d7 | ||
| 
						 | 
					3d76ceddff | ||
| 
						 | 
					05dbe6ee1f | ||
| 
						 | 
					871d0f5126 | ||
| 
						 | 
					5be1264b7e | ||
| 
						 | 
					b963f807be | ||
| 
						 | 
					314c667050 | ||
| 
						 | 
					005bbb52ff | ||
| 
						 | 
					28c8a911bd | ||
| 
						 | 
					a690102da2 | ||
| 
						 | 
					437d1ed49f | ||
| 
						 | 
					12fd8be2c4 | ||
| 
						 | 
					8258f7b361 | ||
| 
						 | 
					e15ea3d9e1 | ||
| 
						 | 
					09db11783d | ||
| 
						 | 
					677532629d | ||
| 
						 | 
					f6733ae577 | ||
| 
						 | 
					57d8ff79b2 | ||
| 
						 | 
					2d2ca3aab1 | ||
| 
						 | 
					cfc7620572 | ||
| 
						 | 
					4b14ed760d | ||
| 
						 | 
					79a6260a11 | ||
| 
						 | 
					a0bf8f2008 | ||
| 
						 | 
					408bf2f0c4 | ||
| 
						 | 
					874fee478c | ||
| 
						 | 
					90d9a69bb1 | ||
| 
						 | 
					9a01bc0732 | ||
| 
						 | 
					4006c56036 | ||
| 
						 | 
					dbcc560717 | ||
| 
						 | 
					1729588435 | ||
| 
						 | 
					6f7c2cb31e | ||
| 
						 | 
					a4629f4136 | ||
| 
						 | 
					449d39f41c | ||
| 
						 | 
					56b5f687e4 | ||
| 
						 | 
					caa4f47f61 | ||
| 
						 | 
					36757b4438 | ||
| 
						 | 
					75871dda4b | ||
| 
						 | 
					506fec1a95 | ||
| 
						 | 
					aae329c447 | ||
| 
						 | 
					02acf1409e | ||
| 
						 | 
					6ac3309c74 | ||
| 
						 | 
					1b15cfa11d | ||
| 
						 | 
					76dfca879f | ||
| 
						 | 
					7cdc7bacea | ||
| 
						 | 
					fbd78b5c08 | ||
| 
						 | 
					fbcd0da597 | ||
| 
						 | 
					665dc3924d | ||
| 
						 | 
					4bdacff25b | ||
| 
						 | 
					ecd45314b8 | ||
| 
						 | 
					3e06fb754e | ||
| 
						 | 
					84236041c1 | ||
| 
						 | 
					b2e20a31ea | ||
| 
						 | 
					38e19a4220 | ||
| 
						 | 
					f28164fefd | ||
| 
						 | 
					8d44d96ec3 | ||
| 
						 | 
					2eaabb718b | ||
| 
						 | 
					5572f482e7 | ||
| 
						 | 
					707e098687 | ||
| 
						 | 
					729f0a277e | ||
| 
						 | 
					88de74ad83 | ||
| 
						 | 
					c55d759168 | ||
| 
						 | 
					97b8718f15 | ||
| 
						 | 
					b7910992d8 | ||
| 
						 | 
					cf3b8b52f1 | ||
| 
						 | 
					388a6f937f | ||
| 
						 | 
					42b06fbaca | ||
| 
						 | 
					a61050ad96 | ||
| 
						 | 
					2245cd87d4 | ||
| 
						 | 
					c199837c54 | ||
| 
						 | 
					83699c4784 | ||
| 
						 | 
					30afcc072a | ||
| 
						 | 
					baaeac3036 | ||
| 
						 | 
					832f9304fd | ||
| 
						 | 
					fa4bde98d2 | ||
| 
						 | 
					d19370b617 | ||
| 
						 | 
					ca80756c70 | ||
| 
						 | 
					8376acbf7f | ||
| 
						 | 
					ef0baf60aa | ||
| 
						 | 
					12a2ff9625 | ||
| 
						 | 
					7ba3a4c3d2 | ||
| 
						 | 
					29e48c18b7 | ||
| 
						 | 
					292a217b51 | ||
| 
						 | 
					982dfb7d10 | ||
| 
						 | 
					104117c5e7 | ||
| 
						 | 
					7ab3c662e3 | ||
| 
						 | 
					8c4b69d3ab | ||
| 
						 | 
					4fd5e85a18 | ||
| 
						 | 
					0e2cc42cfb | ||
| 
						 | 
					e9a9211e75 | ||
| 
						 | 
					1e5c205ccb | ||
| 
						 | 
					4c82171a8e | ||
| 
						 | 
					88c80b3e75 | ||
| 
						 | 
					d438845ac8 | ||
| 
						 | 
					b1d495b2c4 | ||
| 
						 | 
					27bad5ad3d | ||
| 
						 | 
					6b7a46b721 | ||
| 
						 | 
					6a89a25c27 | ||
| 
						 | 
					001ab3abad | ||
| 
						 | 
					ff90d659e6 | ||
| 
						 | 
					ec8ad2bb96 | ||
| 
						 | 
					8f841c70c4 | ||
| 
						 | 
					5fbb02fcb1 | ||
| 
						 | 
					4e1b50e219 | ||
| 
						 | 
					052c0f276e | ||
| 
						 | 
					d7b2342a6a | ||
| 
						 | 
					7e9db7cefc | ||
| 
						 | 
					d30e4c5b0b | ||
| 
						 | 
					9de6bb8abc | ||
| 
						 | 
					72e04bd13f | ||
| 
						 | 
					4ec0448122 | ||
| 
						 | 
					842d8e209b | ||
| 
						 | 
					292fcd5c7b | ||
| 
						 | 
					74e3931f84 | ||
| 
						 | 
					12dadc555f | ||
| 
						 | 
					1e7e392419 | ||
| 
						 | 
					b75b2225e5 | ||
| 
						 | 
					12f27bd414 | ||
| 
						 | 
					e11b82c337 | ||
| 
						 | 
					69deec58fb | ||
| 
						 | 
					1e976bdc46 | ||
| 
						 | 
					9946fceb9d | ||
| 
						 | 
					6fed88113b | ||
| 
						 | 
					04ad43af9e | ||
| 
						 | 
					97ebe047d0 | ||
| 
						 | 
					fc6a6a1030 | ||
| 
						 | 
					3d840c827f | ||
| 
						 | 
					a2a1a04e53 | ||
| 
						 | 
					f86abc2e80 | ||
| 
						 | 
					227aec9a0f | ||
| 
						 | 
					7104c376ae | ||
| 
						 | 
					b0165ce439 | ||
| 
						 | 
					0638ced5cc | ||
| 
						 | 
					3c8756f024 | ||
| 
						 | 
					e984b2af64 | ||
| 
						 | 
					70e96dcf59 | ||
| 
						 | 
					2c696b2ddc | ||
| 
						 | 
					1801bc0658 | ||
| 
						 | 
					ebbad107bf | ||
| 
						 | 
					9a48b07ee4 | ||
| 
						 | 
					230fd6b7b6 | ||
| 
						 | 
					20b33a015f | ||
| 
						 | 
					293d5082c7 | ||
| 
						 | 
					fc0ab2eac2 | ||
| 
						 | 
					64cb996206 | ||
| 
						 | 
					929f116733 | ||
| 
						 | 
					ba5ba5490d | ||
| 
						 | 
					413f2b2247 | ||
| 
						 | 
					b8565a9af9 | ||
| 
						 | 
					fbf4c7b4f1 | ||
| 
						 | 
					99542d8763 | ||
| 
						 | 
					94960c8421 | ||
| 
						 | 
					b3c1d18d03 | ||
| 
						 | 
					6859cf7459 | ||
| 
						 | 
					6c8aec60ca | ||
| 
						 | 
					2018681b33 | ||
| 
						 | 
					c0ca52952e | ||
| 
						 | 
					e204516178 | ||
| 
						 | 
					39d727d0c3 | ||
| 
						 | 
					153aecf91a | ||
| 
						 | 
					6319853811 | ||
| 
						 | 
					cd98ab6491 | ||
| 
						 | 
					6b3a385f85 | ||
| 
						 | 
					b3823ac64b | ||
| 
						 | 
					27a80b7906 | ||
| 
						 | 
					5d9470ff8e | ||
| 
						 | 
					4e33db9a3f | ||
| 
						 | 
					e78f137899 | ||
| 
						 | 
					ca9a114f7a | ||
| 
						 | 
					40e66398db | ||
| 
						 | 
					ce1dc2e9b2 | ||
| 
						 | 
					b4b62004a6 | ||
| 
						 | 
					6e32d0a74b | ||
| 
						 | 
					f7eb95852c | ||
| 
						 | 
					a4f53a1c73 | ||
| 
						 | 
					a90ae02454 | ||
| 
						 | 
					4c8f79a33e | ||
| 
						 | 
					7cc6ec7af7 | ||
| 
						 | 
					c2bbf275b2 | ||
| 
						 | 
					9226e2187c | ||
| 
						 | 
					12a296edfc | ||
| 
						 | 
					48921e00fc | ||
| 
						 | 
					e696a05791 | ||
| 
						 | 
					f804930150 | ||
| 
						 | 
					3403caf3da | ||
| 
						 | 
					4a13e4b36c | ||
| 
						 | 
					b7fb041f31 | ||
| 
						 | 
					ba11121731 | ||
| 
						 | 
					ed5e37c309 | ||
| 
						 | 
					65b1d31df5 | ||
| 
						 | 
					a98beb3a2d | ||
| 
						 | 
					b499ed06d2 | ||
| 
						 | 
					f627c159b1 | ||
| 
						 | 
					6ff7c95843 | ||
| 
						 | 
					535cedf136 | ||
| 
						 | 
					3a00964dd3 | ||
| 
						 | 
					41cc7096b8 | ||
| 
						 | 
					c237de058f | ||
| 
						 | 
					e2aeb8174b | ||
| 
						 | 
					34f1f2a81c | ||
| 
						 | 
					c96f0fd2d1 | ||
| 
						 | 
					8aefe253a7 | ||
| 
						 | 
					7e31164ae0 | ||
| 
						 | 
					ad55f581f9 | ||
| 
						 | 
					d4a8f90cab | ||
| 
						 | 
					41ab00bedf | ||
| 
						 | 
					a69d50b02d | ||
| 
						 | 
					fc85ac20c7 | ||
| 
						 | 
					e88479243c | ||
| 
						 | 
					c787525ac8 | ||
| 
						 | 
					ed7443661c | ||
| 
						 | 
					9a2601033d | ||
| 
						 | 
					3d2aa62cb6 | ||
| 
						 | 
					9925249ba5 | ||
| 
						 | 
					fbb311a7d2 | ||
| 
						 | 
					d7041ea5de | ||
| 
						 | 
					f309c1ae50 | ||
| 
						 | 
					82a20fb0f0 | ||
| 
						 | 
					68a9ee13e8 | ||
| 
						 | 
					a64f08f3dd | ||
| 
						 | 
					428112ef10 | ||
| 
						 | 
					64376cd8ff | ||
| 
						 | 
					384897f46b | ||
| 
						 | 
					cc8aa08b02 | ||
| 
						 | 
					08e60fc0ff | ||
| 
						 | 
					1c4e4e4f56 | ||
| 
						 | 
					3f6db7f518 | ||
| 
						 | 
					ea050a6eb3 | ||
| 
						 | 
					bde63f803a | ||
| 
						 | 
					8435a755fd | ||
| 
						 | 
					52c29b7b99 | ||
| 
						 | 
					e73308638a | ||
| 
						 | 
					1ac3419ef6 | ||
| 
						 | 
					c6bf63da7c | ||
| 
						 | 
					0fd05a2f0f | ||
| 
						 | 
					1e9858a28b | ||
| 
						 | 
					1fd0338b49 | ||
| 
						 | 
					8f4a09e531 | ||
| 
						 | 
					b2be73e4e8 | ||
| 
						 | 
					3b2f77d88e | ||
| 
						 | 
					52ccf9e1c1 | ||
| 
						 | 
					37f5fcf85c | ||
| 
						 | 
					5e947727a9 | ||
| 
						 | 
					f742e497dd | ||
| 
						 | 
					d7bd58cf36 | ||
| 
						 | 
					dcc426fcfe | ||
| 
						 | 
					7eb18f1237 | ||
| 
						 | 
					b84e473d63 | ||
| 
						 | 
					265e892fed | ||
| 
						 | 
					4aecd67d04 | ||
| 
						 | 
					623e9e66c0 | ||
| 
						 | 
					74a25e9cd9 | ||
| 
						 | 
					90f5a2b6fe | ||
| 
						 | 
					bf625abe29 | ||
| 
						 | 
					d020139db7 | ||
| 
						 | 
					b44069730b | ||
| 
						 | 
					749d055eba | ||
| 
						 | 
					49a0f77867 | ||
| 
						 | 
					f84acec8ea | ||
| 
						 | 
					2af52de7b5 | ||
| 
						 | 
					d3b282e01f | ||
| 
						 | 
					85d9e2f2f0 | ||
| 
						 | 
					629d860cbc | ||
| 
						 | 
					056cc163f5 | ||
| 
						 | 
					04ed3994e2 | ||
| 
						 | 
					6100502726 | ||
| 
						 | 
					e09efcf71a | ||
| 
						 | 
					763b4dcc66 | ||
| 
						 | 
					a1f09ea8f8 | ||
| 
						 | 
					83348e0b80 | ||
| 
						 | 
					bce625987d | ||
| 
						 | 
					f13ddd5d0a | ||
| 
						 | 
					18a31aa861 | ||
| 
						 | 
					b2a4e959c9 | ||
| 
						 | 
					f17ef241d1 | ||
| 
						 | 
					aa1e56b0b9 | ||
| 
						 | 
					7ef524ea1c | ||
| 
						 | 
					0c7141a343 | ||
| 
						 | 
					5488bb6197 | ||
| 
						 | 
					8e28c67155 | ||
| 
						 | 
					3c1a6f441b | ||
| 
						 | 
					97d640e1f0 | ||
| 
						 | 
					36969082bb | ||
| 
						 | 
					ddf7602425 | ||
| 
						 | 
					4fde69b066 | ||
| 
						 | 
					fd9a4dbe94 | ||
| 
						 | 
					f0db0ed35d | ||
| 
						 | 
					6d24cbf452 | ||
| 
						 | 
					5454829ae6 | ||
| 
						 | 
					da0bca6466 | ||
| 
						 | 
					4705bd9b37 | ||
| 
						 | 
					5bd90983bc | ||
| 
						 | 
					329f981582 | ||
| 
						 | 
					cece7adcee | ||
| 
						 | 
					74cc4903ef | ||
| 
						 | 
					41fdcfa71e | ||
| 
						 | 
					60cc56b1a9 | ||
| 
						 | 
					f912e9293f | ||
| 
						 | 
					56939728b7 | ||
| 
						 | 
					ea26226046 | ||
| 
						 | 
					17f6279317 | ||
| 
						 | 
					d3c32ffbcc | ||
| 
						 | 
					e172d60ddb | ||
| 
						 | 
					1d2a3fe246 | ||
| 
						 | 
					f8fe7fa491 | ||
| 
						 | 
					00c8546d21 | ||
| 
						 | 
					fbe792f0ac | ||
| 
						 | 
					14a7cfb32a | ||
| 
						 | 
					7a8645d171 | ||
| 
						 | 
					31e441a805 | ||
| 
						 | 
					5bf738737d | ||
| 
						 | 
					c4a28caa32 | ||
| 
						 | 
					415e03aa6f | ||
| 
						 | 
					c3eb0c1e7f | ||
| 
						 | 
					ac120e20e3 | ||
| 
						 | 
					d18f681310 | ||
| 
						 | 
					ea5214328b | ||
| 
						 | 
					3f90e45079 | ||
| 
						 | 
					9dcc441a5f | ||
| 
						 | 
					0833a40d13 | ||
| 
						 | 
					ab1a01e9b2 | ||
| 
						 | 
					db4f691f9f | ||
| 
						 | 
					d28735a05b | ||
| 
						 | 
					183847747a | ||
| 
						 | 
					bac6012308 | ||
| 
						 | 
					f1e1d6d6af | ||
| 
						 | 
					aaa384ca1a | ||
| 
						 | 
					f908226898 | ||
| 
						 | 
					b012127a99 | ||
| 
						 | 
					909abce800 | ||
| 
						 | 
					33d4e690cc | ||
| 
						 | 
					848c849584 | ||
| 
						 | 
					102c8f47bf | ||
| 
						 | 
					d3bcbba45c | ||
| 
						 | 
					0903e56196 | ||
| 
						 | 
					95ecacf8a2 | ||
| 
						 | 
					be8a280e0b | ||
| 
						 | 
					6fb60a84dd | ||
| 
						 | 
					5af7d1a3b8 | ||
| 
						 | 
					35b73a1f20 | ||
| 
						 | 
					9e4f9b36fc | ||
| 
						 | 
					84d7e365a0 | ||
| 
						 | 
					64c3da230f | ||
| 
						 | 
					7793f30e09 | ||
| 
						 | 
					714df32e33 | ||
| 
						 | 
					1dc920c8de | ||
| 
						 | 
					16dc1cfb5c | ||
| 
						 | 
					819ff32dc4 | ||
| 
						 | 
					5574e0ed41 | ||
| 
						 | 
					265a9e2c5d | ||
| 
						 | 
					b0b3b11dbf | ||
| 
						 | 
					042e57d562 | ||
| 
						 | 
					c578208d63 | ||
| 
						 | 
					ba8fb52183 | ||
| 
						 | 
					038461a61b | ||
| 
						 | 
					f6f9961819 | ||
| 
						 | 
					716c94492a | ||
| 
						 | 
					e74e9c48de | ||
| 
						 | 
					a4f335ba3e | ||
| 
						 | 
					179add2b07 | ||
| 
						 | 
					456bc309d8 | ||
| 
						 | 
					90832c891e | ||
| 
						 | 
					dc2ab9f4fa | ||
| 
						 | 
					a7535a2727 | ||
| 
						 | 
					162d858a90 | ||
| 
						 | 
					44c09667ff | ||
| 
						 | 
					da9b972466 | ||
| 
						 | 
					13ac37d01a | ||
| 
						 | 
					c2decc56b0 | ||
| 
						 | 
					bd45950f4a | ||
| 
						 | 
					1649d5fee1 | ||
| 
						 | 
					f70cf11819 | ||
| 
						 | 
					f8279b8ea3 | ||
| 
						 | 
					5575f781ad | ||
| 
						 | 
					76b8f839c2 | ||
| 
						 | 
					0472883cc2 | ||
| 
						 | 
					8d37f07e09 | ||
| 
						 | 
					87e8feca95 | ||
| 
						 | 
					450c73d98b | ||
| 
						 | 
					e70a39830c | ||
| 
						 | 
					2ead4a5df6 | ||
| 
						 | 
					ba25198517 | ||
| 
						 | 
					6297bcd74c | ||
| 
						 | 
					dd7ab82e75 | ||
| 
						 | 
					addafc08a5 | ||
| 
						 | 
					c046fffa16 | ||
| 
						 | 
					3aecef7697 | ||
| 
						 | 
					b218af2b27 | ||
| 
						 | 
					e970fa0022 | ||
| 
						 | 
					458bb156bf | ||
| 
						 | 
					bca9dc2a51 | ||
| 
						 | 
					3720ea24f0 | ||
| 
						 | 
					77c46bbf29 | ||
| 
						 | 
					72a37c03be | ||
| 
						 | 
					02750ff56f | ||
| 
						 | 
					93d1969c78 | ||
| 
						 | 
					0bee0e6294 | ||
| 
						 | 
					6178bb8fe9 | ||
| 
						 | 
					12593e6f45 | ||
| 
						 | 
					819a040f44 | ||
| 
						 | 
					5b195b5a0e | ||
| 
						 | 
					546405bece | ||
| 
						 | 
					4289131ae6 | ||
| 
						 | 
					b721e1e239 | ||
| 
						 | 
					f013c7f2a6 | ||
| 
						 | 
					6cf2012a4d | ||
| 
						 | 
					e459ebaed1 | ||
| 
						 | 
					1cc67fa80c | ||
| 
						 | 
					eefa6e4e2b | ||
| 
						 | 
					6d9116f83d | ||
| 
						 | 
					e9e3ce40c5 | ||
| 
						 | 
					56d84db1d4 | ||
| 
						 | 
					8be4e173e8 | ||
| 
						 | 
					648765ba2f | ||
| 
						 | 
					16758de0a2 | ||
| 
						 | 
					c6ccf055ba | ||
| 
						 | 
					f19b6474fe | ||
| 
						 | 
					1649d85d10 | ||
| 
						 | 
					2f6f2970c4 | ||
| 
						 | 
					f227a1af7d | ||
| 
						 | 
					cd72dcd925 | ||
| 
						 | 
					7a5ed919ad | ||
| 
						 | 
					799d7a34cf | ||
| 
						 | 
					20adcfa058 | ||
| 
						 | 
					4408572079 | ||
| 
						 | 
					31b5b999c7 | ||
| 
						 | 
					f8bcfb5d5a | ||
| 
						 | 
					44e9c2617a | ||
| 
						 | 
					b61739874e | ||
| 
						 | 
					73957bd323 | ||
| 
						 | 
					81f1338613 | ||
| 
						 | 
					90baf2a92d | ||
| 
						 | 
					13793a0ddf | ||
| 
						 | 
					b334853d72 | ||
| 
						 | 
					4b5d50e26b | ||
| 
						 | 
					6d454e6ab2 | ||
| 
						 | 
					4f0e09aa67 | ||
| 
						 | 
					e921bbf9f6 | ||
| 
						 | 
					205a4a9571 | ||
| 
						 | 
					44279d4638 | ||
| 
						 | 
					9f1c3d7392 | ||
| 
						 | 
					362be34a2f | ||
| 
						 | 
					ec7f13d375 | ||
| 
						 | 
					ec27c2ac97 | ||
| 
						 | 
					b97c854e15 | ||
| 
						 | 
					bdbbf930aa | ||
| 
						 | 
					5254b53e97 | ||
| 
						 | 
					8adc3e5db7 | ||
| 
						 | 
					4810644f65 | ||
| 
						 | 
					d24d873e17 | ||
| 
						 | 
					7728770623 | ||
| 
						 | 
					279c36564f | ||
| 
						 | 
					50d1c3fd85 | ||
| 
						 | 
					ed712101ea | ||
| 
						 | 
					015eb65963 | ||
| 
						 | 
					afafa3e15c | ||
| 
						 | 
					150f2d8d24 | ||
| 
						 | 
					a6545f0566 | ||
| 
						 | 
					5fc041cca0 | ||
| 
						 | 
					089cd046af | ||
| 
						 | 
					7e8852c549 | ||
| 
						 | 
					4064a85205 | ||
| 
						 | 
					3a9fef60a1 | ||
| 
						 | 
					be9419edf4 | ||
| 
						 | 
					a729d47d41 | ||
| 
						 | 
					6abf827f25 | ||
| 
						 | 
					5af9fcaf35 | ||
| 
						 | 
					5736d40dad | ||
| 
						 | 
					0dfd83b9f4 | ||
| 
						 | 
					8e10dea8ec | ||
| 
						 | 
					a69e8ea1a1 | ||
| 
						 | 
					1f656724f6 | ||
| 
						 | 
					ca55c617e5 | ||
| 
						 | 
					9063e375e8 | ||
| 
						 | 
					97c9760f61 | ||
| 
						 | 
					df60710ea8 | ||
| 
						 | 
					5d2edd2659 | ||
| 
						 | 
					a558ae9496 | ||
| 
						 | 
					d58a949aae | ||
| 
						 | 
					00e608c89d | ||
| 
						 | 
					b4dfd76a4c | ||
| 
						 | 
					ea9a52d124 | ||
| 
						 | 
					75cc5e05ad | ||
| 
						 | 
					84ae14d754 | ||
| 
						 | 
					a9e897adc3 | ||
| 
						 | 
					fc0f3ad254 | ||
| 
						 | 
					a1fbe27123 | ||
| 
						 | 
					1c45b1fef3 | ||
| 
						 | 
					e003386793 | ||
| 
						 | 
					a533b89c9f | ||
| 
						 | 
					a2ffad81c8 | ||
| 
						 | 
					081cdf3f63 | ||
| 
						 | 
					dbf5b18a99 | ||
| 
						 | 
					0b3f7afaed | ||
| 
						 | 
					d6e8f6ae2b | ||
| 
						 | 
					af629a19d7 | ||
| 
						 | 
					9a3eaa1117 | ||
| 
						 | 
					7a68e6aad1 | ||
| 
						 | 
					f27fa54388 | ||
| 
						 | 
					48acb9e08a | ||
| 
						 | 
					e5706ccbde | ||
| 
						 | 
					9a82ef5255 | ||
| 
						 | 
					4a1dcb2d03 | ||
| 
						 | 
					ef92312b41 | ||
| 
						 | 
					4673461789 | ||
| 
						 | 
					2f8275c52d | ||
| 
						 | 
					39ebb51bba | ||
| 
						 | 
					d7227da9a8 | ||
| 
						 | 
					ab805194a6 | ||
| 
						 | 
					4fac53a757 | ||
| 
						 | 
					11198b78a2 | ||
| 
						 | 
					573a568dd0 | ||
| 
						 | 
					ff3dd00370 | ||
| 
						 | 
					2028c2800a | ||
| 
						 | 
					fd8766b67e | ||
| 
						 | 
					7d210e5194 | ||
| 
						 | 
					2e674fc611 | ||
| 
						 | 
					5cfd3419c6 | ||
| 
						 | 
					9efd4fb891 | ||
| 
						 | 
					b2e85f9d93 | ||
| 
						 | 
					f10581829d | ||
| 
						 | 
					78af3b274f | ||
| 
						 | 
					facd9a2024 | ||
| 
						 | 
					461f00dd53 | ||
| 
						 | 
					22f03eaedf | ||
| 
						 | 
					d467c74954 | ||
| 
						 | 
					c4c745ccb8 | ||
| 
						 | 
					3b66e34e74 | ||
| 
						 | 
					2250f475fc | ||
| 
						 | 
					ed703912b2 | ||
| 
						 | 
					2cddcd1dbb | ||
| 
						 | 
					231360a3b7 | ||
| 
						 | 
					65ac3faff6 | ||
| 
						 | 
					778252741e | ||
| 
						 | 
					96e40d97cc | ||
| 
						 | 
					4b3743c85a | ||
| 
						 | 
					5795665a7d | ||
| 
						 | 
					88f1be140c | ||
| 
						 | 
					fc16b228fd | ||
| 
						 | 
					a5b2ccaaad | ||
| 
						 | 
					5dd352c916 | ||
| 
						 | 
					3c204aaf50 | ||
| 
						 | 
					3ae184d31f | ||
| 
						 | 
					3e975124f3 | ||
| 
						 | 
					74c467f9f2 | ||
| 
						 | 
					1b97c938e9 | ||
| 
						 | 
					b3e2acac4e | ||
| 
						 | 
					403fa0dc53 | ||
| 
						 | 
					f918c330a9 | ||
| 
						 | 
					7f52f77efe | ||
| 
						 | 
					90b480f2af | ||
| 
						 | 
					578c33c010 | ||
| 
						 | 
					d6a821b9d7 | ||
| 
						 | 
					7d8b5c530f | ||
| 
						 | 
					2033da0b23 | ||
| 
						 | 
					c4ac954c59 | ||
| 
						 | 
					2640aec227 | ||
| 
						 | 
					a1037ce3bc | ||
| 
						 | 
					249737e53d | ||
| 
						 | 
					c70573dee1 | ||
| 
						 | 
					6c98ed520d | ||
| 
						 | 
					37ceea7333 | ||
| 
						 | 
					374b227226 | ||
| 
						 | 
					8c4a5016ce | ||
| 
						 | 
					1056275825 | ||
| 
						 | 
					9634acedaf | ||
| 
						 | 
					3a4b0bed49 | ||
| 
						 | 
					84f4e33ea3 | ||
| 
						 | 
					b093ef7445 | ||
| 
						 | 
					405ac901c9 | ||
| 
						 | 
					721ccb6cf5 | ||
| 
						 | 
					ba05727773 | ||
| 
						 | 
					f9332da521 | ||
| 
						 | 
					156516ce44 | ||
| 
						 | 
					157e44a799 | ||
| 
						 | 
					7d2ff3f081 | ||
| 
						 | 
					25a87e82d4 | ||
| 
						 | 
					e400753ed8 | ||
| 
						 | 
					0984fcf118 | ||
| 
						 | 
					18cc99ac17 | ||
| 
						 | 
					1522c23470 | ||
| 
						 | 
					2341e303da | ||
| 
						 | 
					dca142029c | ||
| 
						 | 
					7448f5e5ed | ||
| 
						 | 
					45caf9c50c | ||
| 
						 | 
					ace2ca484b | ||
| 
						 | 
					7dc584ed91 | ||
| 
						 | 
					855f0b4f2f | ||
| 
						 | 
					2bf30d6b47 | ||
| 
						 | 
					685e7d7225 | ||
| 
						 | 
					38dbcb2248 | ||
| 
						 | 
					bb3a69f801 | ||
| 
						 | 
					55db40d3e0 | ||
| 
						 | 
					f1fbf15116 | ||
| 
						 | 
					9bdbdda261 | ||
| 
						 | 
					ad2057500a | ||
| 
						 | 
					d0e3726ca4 | ||
| 
						 | 
					75a46764e5 | ||
| 
						 | 
					4eceda658b | ||
| 
						 | 
					1c511bdb7c | ||
| 
						 | 
					f9bd76e4f7 | ||
| 
						 | 
					e74e0dedcd | ||
| 
						 | 
					dcf6eb2a9e | ||
| 
						 | 
					7d2980f09e | ||
| 
						 | 
					f1fe6fa6e4 | ||
| 
						 | 
					ecb7a9c73a | ||
| 
						 | 
					aebe0396e9 | ||
| 
						 | 
					4e9a77cf26 | ||
| 
						 | 
					14ef32631c | ||
| 
						 | 
					500f07c8de | ||
| 
						 | 
					ae936dae90 | ||
| 
						 | 
					67166dc05c | ||
| 
						 | 
					aa9fed8cc2 | ||
| 
						 | 
					442eb8a4c3 | ||
| 
						 | 
					46805f696d | ||
| 
						 | 
					29f6a99432 | ||
| 
						 | 
					1f13793b1a | ||
| 
						 | 
					08130eb158 | ||
| 
						 | 
					b27dfeacc9 | ||
| 
						 | 
					fb0f53b2e0 | ||
| 
						 | 
					baa521bef5 | ||
| 
						 | 
					7bcf65a125 | ||
| 
						 | 
					306009bb6a | ||
| 
						 | 
					dfc5336975 | ||
| 
						 | 
					4cea95a547 | ||
| 
						 | 
					b23b3272dc | ||
| 
						 | 
					1696aa1891 | ||
| 
						 | 
					52407725c9 | ||
| 
						 | 
					81da3c3319 | ||
| 
						 | 
					7729bc2634 | ||
| 
						 | 
					69a305d434 | ||
| 
						 | 
					ab5b1cf86b | ||
| 
						 | 
					c33387749b | ||
| 
						 | 
					c9ca65b469 | ||
| 
						 | 
					8e078f45e0 | ||
| 
						 | 
					f84ffd0130 | ||
| 
						 | 
					300e3d7c73 | ||
| 
						 | 
					365c6e4661 | ||
| 
						 | 
					1dc03ef706 | ||
| 
						 | 
					d4a67e3186 | ||
| 
						 | 
					18e10315e5 | ||
| 
						 | 
					e9caaa4ad9 | ||
| 
						 | 
					a6198b9ed1 | ||
| 
						 | 
					a7be294ed7 | ||
| 
						 | 
					617f461c9d | ||
| 
						 | 
					1dcb6c994f | ||
| 
						 | 
					a9ab63c01c | ||
| 
						 | 
					f89db4020f | ||
| 
						 | 
					393c09659e | ||
| 
						 | 
					2d96549cd0 | ||
| 
						 | 
					b48892d403 | ||
| 
						 | 
					7b907f0bb5 | ||
| 
						 | 
					9dfcad117c | ||
| 
						 | 
					7018feed88 | ||
| 
						 | 
					9be529f12d | ||
| 
						 | 
					f5e5277908 | ||
| 
						 | 
					c991c6e710 | ||
| 
						 | 
					e1f4319279 | ||
| 
						 | 
					2826fcc851 | ||
| 
						 | 
					37562f753a | ||
| 
						 | 
					248252682c | ||
| 
						 | 
					cc3586028e | ||
| 
						 | 
					f60df86c89 | ||
| 
						 | 
					bc7a3a9e99 | ||
| 
						 | 
					d3cbf7d86a | ||
| 
						 | 
					313bf45e42 | ||
| 
						 | 
					ce34d0ac09 | ||
| 
						 | 
					4e9dd6b0f5 | ||
| 
						 | 
					b6ccbffe2b | ||
| 
						 | 
					1aecc34e9e | ||
| 
						 | 
					75b9c0044c | ||
| 
						 | 
					600b77a93f | ||
| 
						 | 
					39335c356b | ||
| 
						 | 
					a3c62bb737 | ||
| 
						 | 
					2f6263a696 | ||
| 
						 | 
					35748f40d6 | ||
| 
						 | 
					ed62478192 | ||
| 
						 | 
					9e7733a743 | ||
| 
						 | 
					fc0bdd1aa8 | ||
| 
						 | 
					e9dad4048f | ||
| 
						 | 
					ddba94214f | ||
| 
						 | 
					e9f970891d | ||
| 
						 | 
					a89cf50c59 | ||
| 
						 | 
					f90c544039 | ||
| 
						 | 
					afcf54a5c9 | ||
| 
						 | 
					3671e38af4 | ||
| 
						 | 
					4fc3946111 | ||
| 
						 | 
					59a941e4a4 | ||
| 
						 | 
					a7cd5f3f38 | ||
| 
						 | 
					0bdbc5a86e | ||
| 
						 | 
					abecef77cf | ||
| 
						 | 
					b74dfe6e8e | ||
| 
						 | 
					d80f6e0f8c | ||
| 
						 | 
					13962f0b15 | ||
| 
						 | 
					2fc1f3dd48 | ||
| 
						 | 
					f2cbb15468 | ||
| 
						 | 
					e38e8b29f8 | ||
| 
						 | 
					c03ceadfbd | ||
| 
						 | 
					e50baf58ab | ||
| 
						 | 
					1750ec5c52 | ||
| 
						 | 
					c77bd28775 | ||
| 
						 | 
					1619add90c | ||
| 
						 | 
					a1a4e8b6bb | ||
| 
						 | 
					25f350a058 | ||
| 
						 | 
					121cb9ee38 | ||
| 
						 | 
					bc173b9fb0 | ||
| 
						 | 
					4fd9c70f06 | ||
| 
						 | 
					91aeab0de3 | ||
| 
						 | 
					c913cf446f | ||
| 
						 | 
					a88f39457b | ||
| 
						 | 
					2bbaab4a24 | ||
| 
						 | 
					1a8f4b57a9 | ||
| 
						 | 
					022b31a8c8 | ||
| 
						 | 
					dd6b494eb3 | ||
| 
						 | 
					c9bea5bad3 | ||
| 
						 | 
					296324ea03 | ||
| 
						 | 
					fa41e86a28 | ||
| 
						 | 
					9e77b7075a | ||
| 
						 | 
					5c7f9a627f | ||
| 
						 | 
					bc3e3472c1 | ||
| 
						 | 
					66bd86e2c2 | ||
| 
						 | 
					487fe20490 | ||
| 
						 | 
					80d9b1ccd7 | ||
| 
						 | 
					69c48301e0 | ||
| 
						 | 
					2be9b88135 | ||
| 
						 | 
					98fa4fce09 | ||
| 
						 | 
					1ec1d17e16 | ||
| 
						 | 
					1e11df0dc3 | ||
| 
						 | 
					421d474332 | ||
| 
						 | 
					58060fa11b | ||
| 
						 | 
					cea698f19c | ||
| 
						 | 
					48781ef7f7 | ||
| 
						 | 
					6d1a837df7 | ||
| 
						 | 
					21f422ca5e | ||
| 
						 | 
					291ae60b52 | ||
| 
						 | 
					3b79d2789d | ||
| 
						 | 
					bb9dcc99cf | ||
| 
						 | 
					3d59821134 | ||
| 
						 | 
					cae111287b | ||
| 
						 | 
					e36e473859 | ||
| 
						 | 
					d7fb66aa82 | ||
| 
						 | 
					344b3b5ce1 | ||
| 
						 | 
					3f7cf29124 | ||
| 
						 | 
					63dc69fef6 | ||
| 
						 | 
					cfe1c195c4 | ||
| 
						 | 
					0cd8572b2d | ||
| 
						 | 
					7c2831ac90 | ||
| 
						 | 
					de603b75fc | ||
| 
						 | 
					1244be2eda | ||
| 
						 | 
					9f0a373b51 | ||
| 
						 | 
					b0701709c1 | ||
| 
						 | 
					34aa216a65 | ||
| 
						 | 
					a76a29f233 | ||
| 
						 | 
					4e06ab75e8 | ||
| 
						 | 
					26147fb954 | ||
| 
						 | 
					bd53a054b1 | ||
| 
						 | 
					211b8685d3 | ||
| 
						 | 
					9c75b2d931 | ||
| 
						 | 
					54d11e6057 | ||
| 
						 | 
					3d7ba69a05 | ||
| 
						 | 
					58133d22a8 | ||
| 
						 | 
					330e5c5460 | ||
| 
						 | 
					ab519c8262 | ||
| 
						 | 
					65f29a78b2 | ||
| 
						 | 
					c363b5a62f | ||
| 
						 | 
					60ed0f94ed | ||
| 
						 | 
					f38f8d94a9 | ||
| 
						 | 
					679eb352e0 | ||
| 
						 | 
					80bbb6578e | ||
| 
						 | 
					19cc0f0ab4 | ||
| 
						 | 
					14e14ea68c | ||
| 
						 | 
					834d37ed86 | ||
| 
						 | 
					adcc235ef6 | ||
| 
						 | 
					86a0d0234d | ||
| 
						 | 
					4598be561a | ||
| 
						 | 
					af5db47e99 | ||
| 
						 | 
					fb67f40f04 | ||
| 
						 | 
					48033c3242 | ||
| 
						 | 
					aa1f5b3581 | ||
| 
						 | 
					d9d3a69595 | ||
| 
						 | 
					f9adfa6d4e | ||
| 
						 | 
					85b1fce1ef | ||
| 
						 | 
					da566db150 | ||
| 
						 | 
					be37dc73f6 | ||
| 
						 | 
					976b2c9c2f | ||
| 
						 | 
					b74d2cda28 | ||
| 
						 | 
					cc5dd9f14e | ||
| 
						 | 
					fbfcdc4cef | 
@@ -1,3 +1,4 @@
 | 
			
		||||
openssl.pc
 | 
			
		||||
Makefile.ssl
 | 
			
		||||
MINFO
 | 
			
		||||
makefile.one
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										369
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										369
									
								
								CHANGES
									
									
									
									
									
								
							@@ -2,104 +2,170 @@
 | 
			
		||||
 OpenSSL CHANGES
 | 
			
		||||
 _______________
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7 and 0.9.8  [xx XXX 2002]
 | 
			
		||||
 Changes between 0.9.6h and 0.9.7  [31 Dec 2002]
 | 
			
		||||
 | 
			
		||||
  *) Change default behaviour of 'openssl asn1parse' so that more
 | 
			
		||||
     information is visible when viewing, e.g., a certificate:
 | 
			
		||||
  *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
 | 
			
		||||
     code (06) was taken as the first octet of the session ID and the last
 | 
			
		||||
     octet was ignored consequently. As a result SSLv2 client side session
 | 
			
		||||
     caching could not have worked due to the session ID mismatch between
 | 
			
		||||
     client and server.
 | 
			
		||||
     Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
 | 
			
		||||
     PR #377.
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
     Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump'
 | 
			
		||||
     mode the content of non-printable OCTET STRINGs is output in a
 | 
			
		||||
     style similar to INTEGERs, but with '[HEX DUMP]' prepended to
 | 
			
		||||
     avoid the appearance of a printable string.
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
  *) Change the declaration of needed Kerberos libraries to use EX_LIBS
 | 
			
		||||
     instead of the special (and badly supported) LIBKRB5.  LIBKRB5 is
 | 
			
		||||
     removed entirely.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access
 | 
			
		||||
     functions
 | 
			
		||||
          EC_GROUP_set_asn1_flag()
 | 
			
		||||
          EC_GROUP_get_asn1_flag()
 | 
			
		||||
          EC_GROUP_set_point_conversion_form()
 | 
			
		||||
          EC_GROUP_get_point_conversion_form()
 | 
			
		||||
     These control ASN1 encoding details:
 | 
			
		||||
     - Curves (i.e., groups) are encoded explicitly unless asn1_flag
 | 
			
		||||
       has been set to OPENSSL_EC_NAMED_CURVE.
 | 
			
		||||
     - Points are encoded in uncompressed form by default; options for
 | 
			
		||||
       asn1_for are as for point2oct, namely
 | 
			
		||||
          POINT_CONVERSION_COMPRESSED
 | 
			
		||||
          POINT_CONVERSION_UNCOMPRESSED
 | 
			
		||||
          POINT_CONVERSION_HYBRID
 | 
			
		||||
  *) The hw_ncipher.c engine requires dynamic locks.  Unfortunately, it
 | 
			
		||||
     seems that in spite of existing for more than a year, many application
 | 
			
		||||
     author have done nothing to provide the necessary callbacks, which
 | 
			
		||||
     means that this particular engine will not work properly anywhere.
 | 
			
		||||
     This is a very unfortunate situation which forces us, in the name
 | 
			
		||||
     of usability, to give the hw_ncipher.c a static lock, which is part
 | 
			
		||||
     of libcrypto.
 | 
			
		||||
     NOTE: This is for the 0.9.7 series ONLY.  This hack will never
 | 
			
		||||
     appear in 0.9.8 or later.  We EXPECT application authors to have
 | 
			
		||||
     dealt properly with this when 0.9.8 is released (unless we actually
 | 
			
		||||
     make such changes in the libcrypto locking code that changes will
 | 
			
		||||
     have to be made anyway).
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
     Also add 'seed' and 'seed_len' members to EC_GROUP with access
 | 
			
		||||
     functions
 | 
			
		||||
          EC_GROUP_set_seed()
 | 
			
		||||
          EC_GROUP_get0_seed()
 | 
			
		||||
          EC_GROUP_get_seed_len()
 | 
			
		||||
     This is used only for ASN1 purposes (so far).
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
  *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content
 | 
			
		||||
     octets have been read, EOF or an error occurs. Without this change
 | 
			
		||||
     some truncated ASN1 structures will not produce an error.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Add 'field_type' member to EC_METHOD, which holds the NID
 | 
			
		||||
     of the appropriate field type OID.  The new function
 | 
			
		||||
     EC_METHOD_get_field_type() returns this value.
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
  *) Disable Heimdal support, since it hasn't been fully implemented.
 | 
			
		||||
     Still give the possibility to force the use of Heimdal, but with
 | 
			
		||||
     warnings and a request that patches get sent to openssl-dev.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add functions 
 | 
			
		||||
          EC_POINT_point2bn()
 | 
			
		||||
          EC_POINT_bn2point()
 | 
			
		||||
          EC_POINT_point2hex()
 | 
			
		||||
          EC_POINT_hex2point()
 | 
			
		||||
     providing useful interfaces to EC_POINT_point2oct() and
 | 
			
		||||
     EC_POINT_oct2point().
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
  *) Add the VC-CE target, introduce the WINCE sysname, and add
 | 
			
		||||
     INSTALL.WCE and appropriate conditionals to make it build.
 | 
			
		||||
     [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change internals of the EC library so that the functions
 | 
			
		||||
          EC_GROUP_set_generator()
 | 
			
		||||
          EC_GROUP_get_generator()
 | 
			
		||||
          EC_GROUP_get_order()
 | 
			
		||||
          EC_GROUP_get_cofactor()
 | 
			
		||||
     are implemented directly in crypto/ec/ec_lib.c and not dispatched
 | 
			
		||||
     to methods, which would lead to unnecessary code duplication when
 | 
			
		||||
     adding different types of curves.
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller]
 | 
			
		||||
  *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and
 | 
			
		||||
     cygssl-x.y.z.dll, where x, y and z are the major, minor and
 | 
			
		||||
     edit numbers of the version.
 | 
			
		||||
     [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM
 | 
			
		||||
     arithmetic, and such that modified wNAFs are generated
 | 
			
		||||
     (which avoid length expansion in many cases).
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
  *) Introduce safe string copy and catenation functions
 | 
			
		||||
     (BUF_strlcpy() and BUF_strlcat()).
 | 
			
		||||
     [Ben Laurie (CHATS) and Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add a function EC_GROUP_check_discriminant() (defined via
 | 
			
		||||
     EC_METHOD) that verifies that the curve discriminant is non-zero.
 | 
			
		||||
  *) Avoid using fixed-size buffers for one-line DNs.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
     Add a function EC_GROUP_check() that makes some sanity tests
 | 
			
		||||
     on a EC_GROUP, its generator and order.  This includes
 | 
			
		||||
     EC_GROUP_check_discriminant().
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
  *) Add BUF_MEM_grow_clean() to avoid information leakage when
 | 
			
		||||
     resizing buffers containing secrets, and use where appropriate.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add ECDSA in new directory crypto/ecdsa/.
 | 
			
		||||
  *) Avoid using fixed size buffers for configuration file location.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
     Add applications 'openssl ecparam' and 'openssl ecdsa'
 | 
			
		||||
     (these are based on 'openssl dsaparam' and 'openssl dsa').
 | 
			
		||||
  *) Avoid filename truncation for various CA files.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
     ECDSA support is also included in various other files across the
 | 
			
		||||
     library.  Most notably,
 | 
			
		||||
     - 'openssl req' now has a '-newkey ecdsa:file' option;
 | 
			
		||||
     - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
 | 
			
		||||
     - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
 | 
			
		||||
       d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
 | 
			
		||||
       them suitable for ECDSA where domain parameters must be
 | 
			
		||||
       extracted before the specific public key.
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
  *) Use sizeof in preference to magic numbers.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Include some named elliptic curves, and add OIDs from X9.62,
 | 
			
		||||
     SECG, and WAP/WTLS.  The curves can be obtained from the new
 | 
			
		||||
     functions
 | 
			
		||||
          EC_GROUP_new_by_nid()
 | 
			
		||||
          EC_GROUP_new_by_name()
 | 
			
		||||
     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]
 | 
			
		||||
 
 | 
			
		||||
 Changes between 0.9.6e and 0.9.7  [XX xxx 2002]
 | 
			
		||||
  *) Avoid filename truncation in cert requests.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add assertions to check for (supposedly impossible) buffer
 | 
			
		||||
     overflows.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Don't cache truncated DNS entries in the local cache (this could
 | 
			
		||||
     potentially lead to a spoofing attack).
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Fix various buffers to be large enough for hex/decimal
 | 
			
		||||
     representations in a platform independent manner.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add CRYPTO_realloc_clean() to avoid information leakage when
 | 
			
		||||
     resizing buffers containing secrets, and use where appropriate.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add BIO_indent() to avoid much slightly worrying code to do
 | 
			
		||||
     indents.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Convert sprintf()/BIO_puts() to BIO_printf().
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) buffer_gets() could terminate with the buffer only half
 | 
			
		||||
     full. Fixed.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add assertions to prevent user-supplied crypto functions from
 | 
			
		||||
     overflowing internal buffers by having large block sizes, etc.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) New OPENSSL_assert() macro (similar to assert(), but enabled
 | 
			
		||||
     unconditionally).
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused copy of key in RC4.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Fix off-by-one error in EGD path.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) If RANDFILE path is too long, ignore instead of truncating.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and incorrectly sized X.509 structure
 | 
			
		||||
     CBCParameter.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and dangerous function knumber().
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and dangerous structure, KSSL_ERR.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Protect against overlong session ID context length in an encoded
 | 
			
		||||
     session object. Since these are local, this does not appear to be
 | 
			
		||||
     exploitable.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Change from security patch (see 0.9.6e below) that did not affect
 | 
			
		||||
     the 0.9.6 release series:
 | 
			
		||||
 | 
			
		||||
     Remote buffer overflow in SSL3 protocol - an attacker could
 | 
			
		||||
     supply an oversized master key in Kerberos-enabled versions.
 | 
			
		||||
     (CAN-2002-0657)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Change the SSL kerb5 codes to match RFC 2712.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Make -nameopt work fully for req and add -reqopt switch.
 | 
			
		||||
     [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) The "block size" for block ciphers in CFB and OFB mode should be 1.
 | 
			
		||||
     [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>]
 | 
			
		||||
 | 
			
		||||
  *) Make sure tests can be performed even if the corresponding algorithms
 | 
			
		||||
     have been removed entirely.  This was also the last step to make
 | 
			
		||||
     OpenSSL compilable with DJGPP under all reasonable conditions.
 | 
			
		||||
     [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>]
 | 
			
		||||
 | 
			
		||||
  *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT
 | 
			
		||||
     to allow version independent disabling of normally unselected ciphers,
 | 
			
		||||
     which may be activated as a side-effect of selecting a single cipher.
 | 
			
		||||
 | 
			
		||||
     (E.g., cipher list string "RSA" enables ciphersuites that are left
 | 
			
		||||
     out of "ALL" because they do not provide symmetric encryption.
 | 
			
		||||
     "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.)
 | 
			
		||||
     [Lutz Jaenicke, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Add appropriate support for separate platform-dependent build
 | 
			
		||||
     directories.  The recommended way to make a platform-dependent
 | 
			
		||||
@@ -109,8 +175,8 @@
 | 
			
		||||
	# Place yourself outside of the OpenSSL source tree.  In
 | 
			
		||||
	# this example, the environment variable OPENSSL_SOURCE
 | 
			
		||||
	# is assumed to contain the absolute OpenSSL source directory.
 | 
			
		||||
	mkdir -p objtree/`uname -s`-`uname -r`-`uname -m`
 | 
			
		||||
	cd objtree/`uname -s`-`uname -r`-`uname -m`
 | 
			
		||||
	mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
			
		||||
	cd objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
			
		||||
	(cd $OPENSSL_SOURCE; find . -type f -o -type l) | while read F; do
 | 
			
		||||
		mkdir -p `dirname $F`
 | 
			
		||||
		ln -s $OPENSSL_SOURCE/$F $F
 | 
			
		||||
@@ -1750,7 +1816,101 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
  *) Clean old EAY MD5 hack from e_os.h.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6d and 0.9.6e  [XX xxx XXXX]
 | 
			
		||||
 Changes between 0.9.6g and 0.9.6h  [5 Dec 2002]
 | 
			
		||||
 | 
			
		||||
  *) New function OPENSSL_cleanse(), which is used to cleanse a section of
 | 
			
		||||
     memory from it's contents.  This is done with a counter that will
 | 
			
		||||
     place alternating values in each byte.  This can be used to solve
 | 
			
		||||
     two issues: 1) the removal of calls to memset() by highly optimizing
 | 
			
		||||
     compilers, and 2) cleansing with other values than 0, since those can
 | 
			
		||||
     be read through on certain media, for example a swap space on disk.
 | 
			
		||||
     [Geoff Thorpe]
 | 
			
		||||
 | 
			
		||||
  *) Bugfix: client side session caching did not work with external caching,
 | 
			
		||||
     because the session->cipher setting was not restored when reloading
 | 
			
		||||
     from the external cache. This problem was masked, when
 | 
			
		||||
     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set.
 | 
			
		||||
     (Found by Steve Haslam <steve@araqnid.ddts.net>.)
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Fix client_certificate (ssl/s2_clnt.c): The permissible total
 | 
			
		||||
     length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33.
 | 
			
		||||
     [Zeev Lieber <zeev-l@yahoo.com>]
 | 
			
		||||
 | 
			
		||||
  *) Undo an undocumented change introduced in 0.9.6e which caused
 | 
			
		||||
     repeated calls to OpenSSL_add_all_ciphers() and 
 | 
			
		||||
     OpenSSL_add_all_digests() to be ignored, even after calling
 | 
			
		||||
     EVP_cleanup().
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change the default configuration reader to deal with last line not
 | 
			
		||||
     being properly terminated.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change X509_NAME_cmp() so it applies the special rules on handling
 | 
			
		||||
     DN values that are of type PrintableString, as well as RDNs of type
 | 
			
		||||
     emailAddress where the value has the type ia5String.
 | 
			
		||||
     [stefank@valicert.com via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add a SSL_SESS_CACHE_NO_INTERNAL_STORE flag to take over half
 | 
			
		||||
     the job SSL_SESS_CACHE_NO_INTERNAL_LOOKUP was inconsistently
 | 
			
		||||
     doing, define a new flag (SSL_SESS_CACHE_NO_INTERNAL) to be
 | 
			
		||||
     the bitwise-OR of the two for use by the majority of applications
 | 
			
		||||
     wanting this behaviour, and update the docs. The documented
 | 
			
		||||
     behaviour and actual behaviour were inconsistent and had been
 | 
			
		||||
     changing anyway, so this is more a bug-fix than a behavioural
 | 
			
		||||
     change.
 | 
			
		||||
     [Geoff Thorpe, diagnosed by Nadav Har'El]
 | 
			
		||||
 | 
			
		||||
  *) Don't impose a 16-byte length minimum on session IDs in ssl/s3_clnt.c
 | 
			
		||||
     (the SSL 3.0 and TLS 1.0 specifications allow any length up to 32 bytes).
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Fix initialization code race conditions in
 | 
			
		||||
        SSLv23_method(),  SSLv23_client_method(),   SSLv23_server_method(),
 | 
			
		||||
        SSLv2_method(),   SSLv2_client_method(),    SSLv2_server_method(),
 | 
			
		||||
        SSLv3_method(),   SSLv3_client_method(),    SSLv3_server_method(),
 | 
			
		||||
        TLSv1_method(),   TLSv1_client_method(),    TLSv1_server_method(),
 | 
			
		||||
        ssl2_get_cipher_by_char(),
 | 
			
		||||
        ssl3_get_cipher_by_char().
 | 
			
		||||
     [Patrick McCormick <patrick@tellme.com>, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after
 | 
			
		||||
     the cached sessions are flushed, as the remove_cb() might use ex_data
 | 
			
		||||
     contents. Bug found by Sam Varshavchik <mrsam@courier-mta.com>
 | 
			
		||||
     (see [openssl.org #212]).
 | 
			
		||||
     [Geoff Thorpe, Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Fix typo in OBJ_txt2obj which incorrectly passed the content
 | 
			
		||||
     length, instead of the encoding length to d2i_ASN1_OBJECT.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6f and 0.9.6g  [9 Aug 2002]
 | 
			
		||||
 | 
			
		||||
  *) [In 0.9.6g-engine release:]
 | 
			
		||||
     Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall').
 | 
			
		||||
     [Lynn Gazis <lgazis@rainbow.com>]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6e and 0.9.6f  [8 Aug 2002]
 | 
			
		||||
 | 
			
		||||
  *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
 | 
			
		||||
     and get fix the header length calculation.
 | 
			
		||||
     [Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>,
 | 
			
		||||
	Alon Kantor <alonk@checkpoint.com> (and others),
 | 
			
		||||
	Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Use proper error handling instead of 'assertions' in buffer
 | 
			
		||||
     overflow checks added in 0.9.6e.  This prevents DoS (the
 | 
			
		||||
     assertions could call abort()).
 | 
			
		||||
     [Arne Ansper <arne@ats.cyber.ee>, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6d and 0.9.6e  [30 Jul 2002]
 | 
			
		||||
 | 
			
		||||
  *) 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.
 | 
			
		||||
     [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
 | 
			
		||||
 | 
			
		||||
  *) Fix cipher selection routines: ciphers without encryption had no flags
 | 
			
		||||
     for the cipher strength set and where therefore not handled correctly
 | 
			
		||||
@@ -1773,6 +1933,35 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     applications.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Changes in security patch:
 | 
			
		||||
 | 
			
		||||
     Changes marked "(CHATS)" were sponsored by the Defense Advanced
 | 
			
		||||
     Research Projects Agency (DARPA) and Air Force Research Laboratory,
 | 
			
		||||
     Air Force Materiel Command, USAF, under agreement number
 | 
			
		||||
     F30602-01-2-0537.
 | 
			
		||||
 | 
			
		||||
  *) 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)
 | 
			
		||||
     [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
 | 
			
		||||
 | 
			
		||||
  *) Assertions for various potential buffer overflows, not known to
 | 
			
		||||
     happen in practice.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Various temporary buffers to hold ASCII versions of integers were
 | 
			
		||||
     too small for 64 bit platforms. (CAN-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)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Remote buffer overflow in SSL2 protocol - an attacker could
 | 
			
		||||
     supply an oversized client master key. (CAN-2002-0656)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6c and 0.9.6d  [9 May 2002]
 | 
			
		||||
 | 
			
		||||
  *) Fix crypto/asn1/a_sign.c so that 'parameters' is omitted (not
 | 
			
		||||
@@ -1859,13 +2048,13 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     value is 0.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add the configuration target linux-s390x.
 | 
			
		||||
     [Neale Ferguson <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) [In 0.9.6d-engine release:]
 | 
			
		||||
     Fix a crashbug and a logic bug in hwcrhk_load_pubkey().
 | 
			
		||||
     [Toomas Kiisk <vix@cyber.ee> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add the configuration target linux-s390x.
 | 
			
		||||
     [Neale Ferguson <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) The earlier bugfix for the SSL3_ST_SW_HELLO_REQ_C case of
 | 
			
		||||
     ssl3_accept (ssl/s3_srvr.c) incorrectly used a local flag
 | 
			
		||||
     variable as an indication that a ClientHello message has been
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										126
									
								
								Configure
									
									
									
									
									
								
							
							
						
						
									
										126
									
								
								Configure
									
									
									
									
									
								
							@@ -120,7 +120,7 @@ my $alpha_asm="::::::::";
 | 
			
		||||
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
 | 
			
		||||
# So the md5_locl.h file has an undef B_ENDIAN if sun is defined
 | 
			
		||||
 | 
			
		||||
#config-string	$cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib
 | 
			
		||||
#config-string	$cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags
 | 
			
		||||
 | 
			
		||||
my %table=(
 | 
			
		||||
# File 'TABLE' (created by 'make TABLE') contains the data from this list,
 | 
			
		||||
@@ -145,8 +145,10 @@ my %table=(
 | 
			
		||||
"debug-ulf",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT:::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
			
		||||
"debug-steve",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"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::dlfcn",
 | 
			
		||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wid-clash-31 -Wcast-align -Wconversion -Wno-long-long -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_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wid-clash-31 -Wcast-align -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -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_CTX_DEBUG -DCRYPTO_MDEBUG -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 -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wconversion -Wno-long-long -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_CTX_DEBUG -DCRYPTO_MDEBUG -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 -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::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
 | 
			
		||||
@@ -159,25 +161,25 @@ 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_sol_asm}:dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"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_sol_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### 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::::::::::dlfcn:solaris-shared:-KPIC::.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::::::::::dlfcn:solaris-shared:-fPIC::.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:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"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::::::::::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:asm/sparcv8.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:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -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::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64:.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:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -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::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
 | 
			
		||||
# but keep the assembler modules.
 | 
			
		||||
"solaris-sparcv9-gcc27","gcc:-mv8 -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:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC::.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::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc27","gcc:-mv8 -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:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.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::::asm/md5-sparcv9.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:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC::.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:asm/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 -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with Sun C setups
 | 
			
		||||
# DO NOT use /xO[34] on sparc with SC3.0.  It is broken, and will not pass the tests
 | 
			
		||||
@@ -201,13 +203,12 @@ my %table=(
 | 
			
		||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
 | 
			
		||||
# -Wa,-Av8plus should do the trick no matter what.
 | 
			
		||||
"linux-sparcv9","gcc:-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:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# !!!Folowing can't be even tested yet!!!
 | 
			
		||||
#    We have to wait till 64-bit glibc for SPARC is operational!!!
 | 
			
		||||
#"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:ULTRASPARC::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
 | 
			
		||||
# 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::::asm/md5-sparcv9.o::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# Sunos configs, assuming sparc for the gcc one.
 | 
			
		||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):::DES_UNROLL:::",
 | 
			
		||||
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
 | 
			
		||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:::",
 | 
			
		||||
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
 | 
			
		||||
 | 
			
		||||
#### IRIX 5.x configs
 | 
			
		||||
# -mips2 flag is added by ./config when appropriate.
 | 
			
		||||
@@ -387,9 +388,10 @@ my %table=(
 | 
			
		||||
"linux-mips",   "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
 | 
			
		||||
"linux-ppc",    "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-m68k",   "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
 | 
			
		||||
"linux-s390",	"gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
 | 
			
		||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-s390",	"gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-s390x",	"gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::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 RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-m68",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-x86",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
@@ -437,7 +439,8 @@ my %table=(
 | 
			
		||||
"aix-cc",   "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 | 
			
		||||
"aix-gcc",  "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 | 
			
		||||
"aix43-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
 | 
			
		||||
"aix43-gcc",  "gcc:-O3 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
 | 
			
		||||
"aix43-gcc",  "gcc:-O1 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
 | 
			
		||||
"aix64-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn::::::-X 64",
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Cray T90 and similar (SDSC)
 | 
			
		||||
@@ -477,7 +480,7 @@ my %table=(
 | 
			
		||||
# SCO cc.
 | 
			
		||||
"sco5-cc",  "cc:-belf::(unknown)::-lsocket -lresolv -lnsl:${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:svr3-shared:-Kpic", # des options?
 | 
			
		||||
"sco5-cc-pentium",  "cc:-Kpentium::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
 | 
			
		||||
"sco5-gcc",  "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC", # the SCO assembler doesn't seem to like our assembler files ...
 | 
			
		||||
"sco5-gcc",  "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:svr3-shared:-fPIC",
 | 
			
		||||
 | 
			
		||||
# Sinix/ReliantUNIX RM400
 | 
			
		||||
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g  */
 | 
			
		||||
@@ -497,6 +500,7 @@ my %table=(
 | 
			
		||||
# Windows NT, Microsoft Visual C++ 4.0
 | 
			
		||||
 | 
			
		||||
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::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:::",
 | 
			
		||||
@@ -517,13 +521,13 @@ 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}::::::::::win32",
 | 
			
		||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
 | 
			
		||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
 | 
			
		||||
 | 
			
		||||
# DJGPP
 | 
			
		||||
"DJGPP", "gcc:-I/dev/env/DJDIR/watt32/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/DJDIR/watt32/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
 | 
			
		||||
"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}::::::::::",
 | 
			
		||||
 | 
			
		||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 | 
			
		||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
 | 
			
		||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
@@ -542,10 +546,13 @@ my %table=(
 | 
			
		||||
"OpenBSD-hppa",		"gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
 | 
			
		||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(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:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
 | 
			
		||||
##### A/UX
 | 
			
		||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
 | 
			
		||||
##### Sony NEWS-OS 4.x
 | 
			
		||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
 | 
			
		||||
 | 
			
		||||
@@ -557,11 +564,16 @@ 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:::::",
 | 
			
		||||
 | 
			
		||||
##### Compaq Non-Stop Kernel (Tandem)
 | 
			
		||||
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
 | 
			
		||||
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
 | 
			
		||||
	BC-16 Mingw32 OS2-EMX);
 | 
			
		||||
my @WinTargets=qw(VC-NT VC-CE VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS
 | 
			
		||||
	BC-32 BC-16 Mingw32 OS2-EMX);
 | 
			
		||||
 | 
			
		||||
my $idx = 0;
 | 
			
		||||
my $idx_cc = $idx++;
 | 
			
		||||
@@ -586,6 +598,7 @@ my $idx_shared_cflag = $idx++;
 | 
			
		||||
my $idx_shared_ldflag = $idx++;
 | 
			
		||||
my $idx_shared_extension = $idx++;
 | 
			
		||||
my $idx_ranlib = $idx++;
 | 
			
		||||
my $idx_arflags = $idx++;
 | 
			
		||||
 | 
			
		||||
my $prefix="";
 | 
			
		||||
my $openssldir="";
 | 
			
		||||
@@ -705,7 +718,7 @@ PROCESS_ARGS:
 | 
			
		||||
			{ $threads=1; }
 | 
			
		||||
		elsif (/^no-shared$/)
 | 
			
		||||
			{ $no_shared=1; }
 | 
			
		||||
		elsif (/^shared$/)
 | 
			
		||||
		elsif (/^shared$/ || /^-shared$/ || /^--shared$/)
 | 
			
		||||
			{ $no_shared=0; }
 | 
			
		||||
		elsif (/^no-zlib$/)
 | 
			
		||||
			{ $zlib=0; }
 | 
			
		||||
@@ -733,6 +746,7 @@ PROCESS_ARGS:
 | 
			
		||||
			$openssl_algorithm_defines .= "#define OPENSSL_NO_$algo\n";
 | 
			
		||||
			if ($algo eq "RIJNDAEL")
 | 
			
		||||
				{
 | 
			
		||||
				push @skip, "aes";
 | 
			
		||||
				$flags .= "-DOPENSSL_NO_AES ";
 | 
			
		||||
				$depflags .= "-DOPENSSL_NO_AES ";
 | 
			
		||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_AES\n";
 | 
			
		||||
@@ -745,14 +759,6 @@ PROCESS_ARGS:
 | 
			
		||||
				$depflags .= "-DOPENSSL_NO_MDC2 ";
 | 
			
		||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n";
 | 
			
		||||
				}
 | 
			
		||||
			if ($algo eq "EC" || $algo eq "SHA" || $algo eq "SHA1")
 | 
			
		||||
				{
 | 
			
		||||
				push @skip, "ecdsa";
 | 
			
		||||
				$options .= " no-ecdsa";
 | 
			
		||||
				$flags .= "-DOPENSSL_NO_ECDSA ";
 | 
			
		||||
				$depflags .= "-DOPENSSL_NO_ECDSA ";
 | 
			
		||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_ECDSA\n";
 | 
			
		||||
				}
 | 
			
		||||
			if ($algo eq "MD5")
 | 
			
		||||
				{
 | 
			
		||||
				$no_md5 = 1;
 | 
			
		||||
@@ -948,6 +954,7 @@ my $shared_cflag = $fields[$idx_shared_cflag];
 | 
			
		||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
 | 
			
		||||
my $shared_extension = $fields[$idx_shared_extension];
 | 
			
		||||
my $ranlib = $fields[$idx_ranlib];
 | 
			
		||||
my $arflags = $fields[$idx_arflags];
 | 
			
		||||
 | 
			
		||||
$cflags="$flags$cflags" if ($flags ne "");
 | 
			
		||||
 | 
			
		||||
@@ -966,6 +973,17 @@ else
 | 
			
		||||
	my ($lresolv, $lpath, $lext);
 | 
			
		||||
	if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/)
 | 
			
		||||
		{
 | 
			
		||||
		die "Sorry, Heimdal is currently not supported\n";
 | 
			
		||||
		}
 | 
			
		||||
	##### HACK to force use of Heimdal.
 | 
			
		||||
	##### WARNING: Since we don't really have adequate support for Heimdal,
 | 
			
		||||
	#####          using this will break the build.  You'll have to make
 | 
			
		||||
	#####          changes to the source, and if you do, please send
 | 
			
		||||
	#####          patches to openssl-dev@openssl.org
 | 
			
		||||
	if ($withargs{"krb5-flavor"} =~ /^force-[Hh]eimdal$/)
 | 
			
		||||
		{
 | 
			
		||||
		warn "Heimdal isn't really supported.  Your build WILL break\n";
 | 
			
		||||
		warn "If you fix the problems, please send a patch to openssl-dev\@openssl.org\n";
 | 
			
		||||
		$withargs{"krb5-dir"} = "/usr/heimdal"
 | 
			
		||||
			if $withargs{"krb5-dir"} eq "";
 | 
			
		||||
		$withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}.
 | 
			
		||||
@@ -998,10 +1016,12 @@ else
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	$withargs{"krb5-lib"} .= " -lresolv"
 | 
			
		||||
		if ("$lresolv");
 | 
			
		||||
		if ("$lresolv" ne "");
 | 
			
		||||
	$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
 | 
			
		||||
		if $withargs{"krb5-include"} eq "" &&
 | 
			
		||||
		   $withargs{"krb5-dir"} ne "";
 | 
			
		||||
 | 
			
		||||
	$libs.=$withargs{"krb5-lib"}." " if $withargs{"krb5-lib"} ne "";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# The DSO code currently always implements all functions so that no
 | 
			
		||||
@@ -1057,7 +1077,7 @@ else
 | 
			
		||||
#		}
 | 
			
		||||
	}	
 | 
			
		||||
 | 
			
		||||
$lflags="$libs$lflags"if ($libs ne "");
 | 
			
		||||
$lflags="$libs$lflags" if ($libs ne "");
 | 
			
		||||
 | 
			
		||||
if ($no_asm)
 | 
			
		||||
	{
 | 
			
		||||
@@ -1065,6 +1085,11 @@ if ($no_asm)
 | 
			
		||||
	$sha1_obj=$md5_obj=$rmd160_obj="";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if (!$no_shared)
 | 
			
		||||
	{
 | 
			
		||||
	$cast_obj="";	# CAST assembler is not PIC
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($threads)
 | 
			
		||||
	{
 | 
			
		||||
	$cflags=$thread_cflags;
 | 
			
		||||
@@ -1075,25 +1100,21 @@ if ($zlib)
 | 
			
		||||
	{
 | 
			
		||||
	$cflags = "-DZLIB $cflags";
 | 
			
		||||
	$cflags = "-DZLIB_SHARED $cflags" if $zlib == 2;
 | 
			
		||||
	$lflags = "$lflags -lz" if $zlib == 2;
 | 
			
		||||
	$lflags = "$lflags -lz" if $zlib == 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
 | 
			
		||||
my $shared_mark = "";
 | 
			
		||||
if ($shared_target ne "")
 | 
			
		||||
if ($shared_target eq "")
 | 
			
		||||
	{
 | 
			
		||||
	$no_shared = 1;
 | 
			
		||||
	}
 | 
			
		||||
if (!$no_shared)
 | 
			
		||||
	{
 | 
			
		||||
	if ($shared_cflag ne "")
 | 
			
		||||
		{
 | 
			
		||||
		$cflags = "$shared_cflag $cflags";
 | 
			
		||||
		}
 | 
			
		||||
	if (!$no_shared)
 | 
			
		||||
		{
 | 
			
		||||
		#$shared_mark = "\$(SHARED_LIBS)";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
else
 | 
			
		||||
	{
 | 
			
		||||
	$no_shared = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($sys_id ne "")
 | 
			
		||||
@@ -1216,9 +1237,9 @@ while (<IN>)
 | 
			
		||||
	s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
 | 
			
		||||
	s/^PROCESSOR=.*/PROCESSOR= $processor/;
 | 
			
		||||
	s/^RANLIB=.*/RANLIB= $ranlib/;
 | 
			
		||||
	s/^ARFLAGS=.*/ARFLAGS= $arflags/;
 | 
			
		||||
	s/^PERL=.*/PERL= $perl/;
 | 
			
		||||
	s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
 | 
			
		||||
	s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
 | 
			
		||||
	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);
 | 
			
		||||
@@ -1262,11 +1283,10 @@ print "SHA1_OBJ_ASM  =$sha1_obj\n";
 | 
			
		||||
print "RMD160_OBJ_ASM=$rmd160_obj\n";
 | 
			
		||||
print "PROCESSOR     =$processor\n";
 | 
			
		||||
print "RANLIB        =$ranlib\n";
 | 
			
		||||
print "ARFLAGS       =$arflags\n";
 | 
			
		||||
print "PERL          =$perl\n";
 | 
			
		||||
print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n"
 | 
			
		||||
	if $withargs{"krb5-include"} ne "";
 | 
			
		||||
print "LIBKRB5       =",$withargs{"krb5-lib"},"\n"
 | 
			
		||||
	if $withargs{"krb5-lib"} ne "";
 | 
			
		||||
 | 
			
		||||
my $des_ptr=0;
 | 
			
		||||
my $des_risc1=0;
 | 
			
		||||
@@ -1457,6 +1477,7 @@ EOF
 | 
			
		||||
	my $make_targets = "";
 | 
			
		||||
	$make_targets .= " links" if $symlink;
 | 
			
		||||
	$make_targets .= " depend" if $depflags ne "" && $make_depend;
 | 
			
		||||
	$make_targets .= " gentests" if $symlink;
 | 
			
		||||
	(system $make_command.$make_targets) == 0 or exit $?
 | 
			
		||||
		if $make_targets ne "";
 | 
			
		||||
	if ( $perl =~ m@^/@) {
 | 
			
		||||
@@ -1568,7 +1589,7 @@ sub print_table_entry
 | 
			
		||||
	my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
 | 
			
		||||
	my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
 | 
			
		||||
	my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
 | 
			
		||||
	my $shared_ldflag,my $shared_extension,my $ranlib)=
 | 
			
		||||
	my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)=
 | 
			
		||||
	split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
 | 
			
		||||
			
 | 
			
		||||
	print <<EOF
 | 
			
		||||
@@ -1596,6 +1617,7 @@ sub print_table_entry
 | 
			
		||||
\$shared_ldflag = $shared_ldflag
 | 
			
		||||
\$shared_extension = $shared_extension
 | 
			
		||||
\$ranlib       = $ranlib
 | 
			
		||||
\$arflags      = $arflags
 | 
			
		||||
EOF
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										60
									
								
								FAQ
									
									
									
									
									
								
							
							
						
						
									
										60
									
								
								FAQ
									
									
									
									
									
								
							@@ -9,6 +9,7 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Where can I get a compiled version of OpenSSL?
 | 
			
		||||
* Why aren't tools like 'autoconf' and 'libtool' used?
 | 
			
		||||
* What is an 'engine' version?
 | 
			
		||||
* How do I check the authenticity of the OpenSSL distribution?
 | 
			
		||||
 | 
			
		||||
[LEGAL] Legal questions
 | 
			
		||||
 | 
			
		||||
@@ -36,12 +37,15 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Why does the linker complain about undefined symbols?
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: command not found"?
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: stack empty"?
 | 
			
		||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
 | 
			
		||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
 | 
			
		||||
* Why does the OpenSSL compilation fail on Win32 with VC++?
 | 
			
		||||
* What is special about OpenSSL on Redhat?
 | 
			
		||||
* Why does the OpenSSL compilation fail on MacOS X?
 | 
			
		||||
* 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"?
 | 
			
		||||
 | 
			
		||||
[PROG] Questions about programming with OpenSSL
 | 
			
		||||
 | 
			
		||||
@@ -64,7 +68,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.6d was released on May 9, 2002.
 | 
			
		||||
OpenSSL 0.9.7 was released on December 31, 2002.
 | 
			
		||||
 | 
			
		||||
In addition to the current stable release, you can also access daily
 | 
			
		||||
snapshots of the OpenSSL development version at <URL:
 | 
			
		||||
@@ -135,6 +139,19 @@ 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.
 | 
			
		||||
 | 
			
		||||
* How do I check the authenticity of the OpenSSL distribution?
 | 
			
		||||
 | 
			
		||||
We provide MD5 digests and ASC signatures of each tarball.
 | 
			
		||||
Use MD5 to check that a tarball from a mirror site is identical:
 | 
			
		||||
 | 
			
		||||
   md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5
 | 
			
		||||
 | 
			
		||||
You can check authenticity using pgp or gpg. You need the OpenSSL team
 | 
			
		||||
member public key used to sign it (download it from a key server). Then
 | 
			
		||||
just do:
 | 
			
		||||
 | 
			
		||||
   pgp TARBALL.asc
 | 
			
		||||
 | 
			
		||||
[LEGAL] =======================================================================
 | 
			
		||||
 | 
			
		||||
* Do I need patent licenses to use OpenSSL?
 | 
			
		||||
@@ -225,6 +242,8 @@ support can be found at
 | 
			
		||||
  http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski
 | 
			
		||||
However, be warned that /dev/random is usually a blocking device, which
 | 
			
		||||
may have some effects on OpenSSL.
 | 
			
		||||
A third party /dev/random solution for Solaris is available at
 | 
			
		||||
  http://www.cosy.sbg.ac.at/~andi/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why do I get an "unable to write 'random state'" error message?
 | 
			
		||||
@@ -402,6 +421,17 @@ and compile/install it.  GNU bc (see http://www.gnu.org/software/software.html
 | 
			
		||||
for download instructions) can be safely used, for example.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: stack empty"?
 | 
			
		||||
 | 
			
		||||
On some DG/ux versions, bc seems to have a too small stack for calculations
 | 
			
		||||
that the OpenSSL bntest throws at it.  This gets triggered when you run the
 | 
			
		||||
test suite (using "make test").  The message returned is "bc: stack empty".
 | 
			
		||||
 | 
			
		||||
The best way to deal with this is to find another implementation of bc
 | 
			
		||||
and compile/install it.  GNU bc (see http://www.gnu.org/software/software.html
 | 
			
		||||
for download instructions) can be safely used, for example.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
 | 
			
		||||
 | 
			
		||||
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
 | 
			
		||||
@@ -524,6 +554,34 @@ libraries you just built.
 | 
			
		||||
Look in the file PROBLEMS for a more detailed explanation and for possible
 | 
			
		||||
solutions.
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
 | 
			
		||||
 | 
			
		||||
Failure in BN_sqr test is most likely caused by a failure to configure the
 | 
			
		||||
toolkit for current platform or lack of support for the platform in question.
 | 
			
		||||
Run './config -t' and './apps/openssl version -p'. Do these platform
 | 
			
		||||
identifiers match? If they don't, then you most likely failed to run
 | 
			
		||||
./config and you're hereby advised to do so before filing a bug report.
 | 
			
		||||
If ./config itself fails to run, then it's most likely problem with your
 | 
			
		||||
local environment and you should turn to your system administrator (or
 | 
			
		||||
similar). If identifiers match (and/or no alternative identifier is
 | 
			
		||||
suggested by ./config script), then the platform is unsupported. There might
 | 
			
		||||
or might not be a workaround. Most notably on SPARC64 platforms with GNU
 | 
			
		||||
C compiler you should be able to produce a working build by running
 | 
			
		||||
'./config -m32'. I understand that -m32 might not be what you want/need,
 | 
			
		||||
but the build should be operational. For further details turn to
 | 
			
		||||
<openssl-dev@openssl.org>.
 | 
			
		||||
 | 
			
		||||
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
 | 
			
		||||
 | 
			
		||||
As of 0.9.7 assembler routines were overhauled for position independence
 | 
			
		||||
of the machine code, which is essential for shared library support. For
 | 
			
		||||
some reason OpenBSD is equipped with an out-of-date GNU assembler which
 | 
			
		||||
finds the new code offensive. To work around the problem, configure with
 | 
			
		||||
no-asm (and sacrifice a great deal of performance) or upgrade /usr/bin/as.
 | 
			
		||||
For your convenience a pre-compiled replacement binary is provided at
 | 
			
		||||
http://www.openssl.org/~appro/i386-openbsd3-as, which is compiled from
 | 
			
		||||
binutils-2.8 released in 1997.
 | 
			
		||||
 | 
			
		||||
[PROG] ========================================================================
 | 
			
		||||
 | 
			
		||||
* Is OpenSSL thread-safe?
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								INSTALL
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								INSTALL
									
									
									
									
									
								
							@@ -140,8 +140,8 @@
 | 
			
		||||
     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/rt2.html and will be forwarded to a public
 | 
			
		||||
     mailing list). Include the output of "make report" in your message.
 | 
			
		||||
     via http://www.openssl.org/support/rt2.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.
 | 
			
		||||
 | 
			
		||||
@@ -162,7 +162,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/rt2.html.
 | 
			
		||||
     http://www.openssl.org/support/rt2.html.
 | 
			
		||||
 | 
			
		||||
  4. If everything tests ok, install OpenSSL with
 | 
			
		||||
 | 
			
		||||
@@ -296,3 +296,15 @@
 | 
			
		||||
 targets for shared library creation, like linux-shared.  Those targets
 | 
			
		||||
 can currently be used on their own just as well, but this is expected
 | 
			
		||||
 to change in future versions of OpenSSL.
 | 
			
		||||
 | 
			
		||||
 Note on random number generation
 | 
			
		||||
 --------------------------------
 | 
			
		||||
 | 
			
		||||
 Availability of cryptographically secure random numbers is required for
 | 
			
		||||
 secret key generation. OpenSSL provides several options to seed the
 | 
			
		||||
 internal PRNG. If not properly seeded, the internal PRNG will refuse
 | 
			
		||||
 to deliver random bytes and a "PRNG not seeded error" will occur.
 | 
			
		||||
 On systems without /dev/urandom (or similar) device, it may be necessary
 | 
			
		||||
 to install additional support software to obtain random seed.
 | 
			
		||||
 Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
 | 
			
		||||
 and the FAQ for more information.
 | 
			
		||||
 
 | 
			
		||||
@@ -12,12 +12,14 @@
 | 
			
		||||
 latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
 | 
			
		||||
 requires that PERL and BC also be installed.
 | 
			
		||||
 | 
			
		||||
 All of these can be obtained from the usual DJGPP mirror sites, such as
 | 
			
		||||
 "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to have
 | 
			
		||||
 the WATT-32 networking package installed before you try to compile
 | 
			
		||||
 openssl. This can be obtained from "http://www.bgnett.no/~giva/". The
 | 
			
		||||
 Makefile assumes that the WATT-32 code is in directory "watt32" under
 | 
			
		||||
 /dev/env/DJDIR.
 | 
			
		||||
 All of these can be obtained from the usual DJGPP mirror sites, such
 | 
			
		||||
 as "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to
 | 
			
		||||
 have the WATT-32 networking package installed before you try to compile
 | 
			
		||||
 openssl. This can be obtained from "http://www.bgnett.no/~giva/".
 | 
			
		||||
 The Makefile assumes that the WATT-32 code is in the directory
 | 
			
		||||
 specified by the environment variable WATT_ROOT. If you have watt-32
 | 
			
		||||
 in directory "watt32" under your main DJGPP directory, specify
 | 
			
		||||
 WATT_ROOT="/dev/env/DJDIR/watt32".
 | 
			
		||||
 | 
			
		||||
 To compile openssl, start your BASH shell. Then configure for DOS by
 | 
			
		||||
 running "./Configure" with appropriate arguments. The basic syntax for
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,8 @@
 | 
			
		||||
 INSTALLATION ON THE WIN32 PLATFORM
 | 
			
		||||
 ----------------------------------
 | 
			
		||||
 | 
			
		||||
 [Instructions for building for Windows CE can be found in INSTALL.WCE]
 | 
			
		||||
 | 
			
		||||
 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
 | 
			
		||||
 modification.
 | 
			
		||||
@@ -82,7 +84,8 @@
 | 
			
		||||
 There are various changes you can make to the Win32 compile environment. By
 | 
			
		||||
 default the library is not compiled with debugging symbols. If you add 'debug'
 | 
			
		||||
 to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
 | 
			
		||||
 compiled in.
 | 
			
		||||
 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.
 | 
			
		||||
 | 
			
		||||
 The default Win32 environment is to leave out any Windows NT specific
 | 
			
		||||
 features.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										71
									
								
								INSTALL.WCE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								INSTALL.WCE
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
			
		||||
 
 | 
			
		||||
 INSTALLATION FOR THE WINDOWS CE PLATFORM
 | 
			
		||||
 ----------------------------------------
 | 
			
		||||
 | 
			
		||||
 Building OpenSSL for Windows CE requires the following external tools:
 | 
			
		||||
 | 
			
		||||
  * Microsoft eMbedded Visual C++ 3.0
 | 
			
		||||
  * wcecompat compatibility library (www.essemer.com.au)
 | 
			
		||||
  * Optionally ceutils for running automated tests (www.essemer.com.au)
 | 
			
		||||
 | 
			
		||||
 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.
 | 
			
		||||
 | 
			
		||||
 The C Runtime Library implementation for Windows CE that is included with
 | 
			
		||||
 Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
 | 
			
		||||
 incorrect.  wcecompat plugs the holes and tries to bring the Windows CE
 | 
			
		||||
 CRT to a level that is more compatible with ANSI C.  wcecompat goes further
 | 
			
		||||
 and provides low-level IO and stream IO support for stdin/stdout/stderr
 | 
			
		||||
 (which Windows CE does not provide).  This IO functionality is not needed
 | 
			
		||||
 by the OpenSSL library itself but is used for the tests and openssl.exe.
 | 
			
		||||
 More information is available at www.essemer.com.au.
 | 
			
		||||
 | 
			
		||||
 Building
 | 
			
		||||
 --------
 | 
			
		||||
 | 
			
		||||
 Setup the eMbedded Visual C++ environment.  There are batch files for doing
 | 
			
		||||
 this installed with eVC++.  For an ARM processor, for example, execute:
 | 
			
		||||
 | 
			
		||||
 > "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
 | 
			
		||||
 | 
			
		||||
 Next indicate where wcecompat is located:
 | 
			
		||||
 | 
			
		||||
 > set WCECOMPAT=C:\wcecompat
 | 
			
		||||
 | 
			
		||||
 Next you should run Configure:
 | 
			
		||||
 | 
			
		||||
 > perl Configure VC-CE
 | 
			
		||||
 | 
			
		||||
 Next you need to build the Makefiles:
 | 
			
		||||
 | 
			
		||||
 > ms\do_ms
 | 
			
		||||
 | 
			
		||||
 If you get errors about things not having numbers assigned then check the
 | 
			
		||||
 troubleshooting section in INSTALL.W32: you probably won't be able to compile
 | 
			
		||||
 it as it stands.
 | 
			
		||||
 | 
			
		||||
 Then from the VC++ environment at a prompt do:
 | 
			
		||||
 | 
			
		||||
 - to build static libraries:
 | 
			
		||||
 | 
			
		||||
   > nmake -f ms\ce.mak
 | 
			
		||||
 | 
			
		||||
 - or to build DLLs:
 | 
			
		||||
 | 
			
		||||
   > nmake -f ms\cedll.mak
 | 
			
		||||
 | 
			
		||||
 If all is well it should compile and you will have some static libraries and
 | 
			
		||||
 executables in out32, or some DLLs and executables in out32dll.  If you want
 | 
			
		||||
 to try the tests then make sure the ceutils are in the path and do:
 | 
			
		||||
 
 | 
			
		||||
 > cd out32
 | 
			
		||||
 > ..\ms\testce
 | 
			
		||||
 | 
			
		||||
 This will copy each of the test programs to the Windows CE device and execute
 | 
			
		||||
 them, displaying the output of the tests on this computer.  The output should
 | 
			
		||||
 look similar to the output produced by running the tests for a regular Windows
 | 
			
		||||
 build.
 | 
			
		||||
 | 
			
		||||
@@ -1287,7 +1287,7 @@ EXITPOINT:
 | 
			
		||||
 | 
			
		||||
//	Send some bytes
 | 
			
		||||
 | 
			
		||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength)
 | 
			
		||||
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength)
 | 
			
		||||
{
 | 
			
		||||
OSErr			errCode = noErr;
 | 
			
		||||
int				bytesSent = 0;
 | 
			
		||||
@@ -1604,4 +1604,4 @@ EPInfo* epi = (EPInfo*) context;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
*/
 | 
			
		||||
*/
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,7 @@ int MacSocket_recv(const int inSocketNum,void *outBuff,int outBuffLength,const B
 | 
			
		||||
 | 
			
		||||
//	Call this to send data on a socket
 | 
			
		||||
 | 
			
		||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength);
 | 
			
		||||
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//	If zero bytes were read in a call to MacSocket_recv(), it may be that the remote end has done a half-close
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										130
									
								
								Makefile.org
									
									
									
									
									
								
							
							
						
						
									
										130
									
								
								Makefile.org
									
									
									
									
									
								
							@@ -15,6 +15,11 @@ OPTIONS=
 | 
			
		||||
CONFIGURE_ARGS=
 | 
			
		||||
SHLIB_TARGET=
 | 
			
		||||
 | 
			
		||||
# HERE indicates where this Makefile lives.  This can be used to indicate
 | 
			
		||||
# where sub-Makefiles are expected to be.  Currently has very limited usage,
 | 
			
		||||
# and should probably not be bothered with at all.
 | 
			
		||||
HERE=.
 | 
			
		||||
 | 
			
		||||
# INSTALL_PREFIX is for package builders so that they can configure
 | 
			
		||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
 | 
			
		||||
# Normally it is left empty.
 | 
			
		||||
@@ -59,7 +64,8 @@ DEPFLAG=
 | 
			
		||||
PEX_LIBS= 
 | 
			
		||||
EX_LIBS= 
 | 
			
		||||
EXE_EXT= 
 | 
			
		||||
AR=ar r
 | 
			
		||||
ARFLAGS=
 | 
			
		||||
AR=ar $(ARFLAGS) r
 | 
			
		||||
RANLIB= ranlib
 | 
			
		||||
PERL= perl
 | 
			
		||||
TAR= tar
 | 
			
		||||
@@ -153,7 +159,6 @@ RMD160_ASM_OBJ= asm/rm86-out.o
 | 
			
		||||
 | 
			
		||||
# KRB5 stuff
 | 
			
		||||
KRB5_INCLUDES=
 | 
			
		||||
LIBKRB5=
 | 
			
		||||
 | 
			
		||||
# When we're prepared to use shared libraries in the programs we link here
 | 
			
		||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
 | 
			
		||||
@@ -166,7 +171,7 @@ SHLIBDIRS= crypto ssl
 | 
			
		||||
SDIRS=  \
 | 
			
		||||
	md2 md4 md5 sha mdc2 hmac ripemd \
 | 
			
		||||
	des rc2 rc4 rc5 idea bf cast \
 | 
			
		||||
	bn ec rsa dsa ecdsa dh dso engine aes \
 | 
			
		||||
	bn ec rsa dsa dh dso engine aes \
 | 
			
		||||
	buffer bio stack lhash rand err objects \
 | 
			
		||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
			
		||||
 | 
			
		||||
@@ -204,7 +209,7 @@ HEADER=         e_os.h
 | 
			
		||||
# When we're prepared to use shared libraries in the programs we link here
 | 
			
		||||
# we might remove 'clean-shared' from the targets to perform at this stage
 | 
			
		||||
 | 
			
		||||
all: Makefile.ssl sub_all
 | 
			
		||||
all: Makefile.ssl sub_all openssl.pc
 | 
			
		||||
 | 
			
		||||
sub_all:
 | 
			
		||||
	@for i in $(DIRS); \
 | 
			
		||||
@@ -241,7 +246,7 @@ clean-shared:
 | 
			
		||||
		fi; \
 | 
			
		||||
		( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
 | 
			
		||||
		if [ "$(PLATFORM)" = "Cygwin" ]; then \
 | 
			
		||||
			( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
 | 
			
		||||
			( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
 | 
			
		||||
		fi; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
@@ -251,7 +256,8 @@ link-shared:
 | 
			
		||||
		for i in $(SHLIBDIRS); do \
 | 
			
		||||
			prev=lib$$i$(SHLIB_EXT); \
 | 
			
		||||
			for j in $${tmp:-x}; do \
 | 
			
		||||
				( set -x; ln -f -s $$prev lib$$i$$j ); \
 | 
			
		||||
				( set -x; \
 | 
			
		||||
				rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
 | 
			
		||||
				prev=lib$$i$$j; \
 | 
			
		||||
			done; \
 | 
			
		||||
		done; \
 | 
			
		||||
@@ -272,12 +278,7 @@ do_gnu-shared:
 | 
			
		||||
	libs="$$libs -l$$i"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
 | 
			
		||||
	collect2=`gcc -print-prog-name=collect2 2>&1` && \
 | 
			
		||||
	[ -n "$$collect2" ] && \
 | 
			
		||||
	my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
 | 
			
		||||
	[ -n "$$my_ld" ] && \
 | 
			
		||||
	$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
 | 
			
		||||
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
 | 
			
		||||
 | 
			
		||||
# For Darwin AKA Mac OS/X (dyld)
 | 
			
		||||
do_darwin-shared: 
 | 
			
		||||
@@ -292,7 +293,7 @@ do_darwin-shared:
 | 
			
		||||
 | 
			
		||||
do_cygwin-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; ${CC}  -shared -o cyg$$i.dll \
 | 
			
		||||
	( set -x; ${CC}  -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \
 | 
			
		||||
		-Wl,-Bsymbolic \
 | 
			
		||||
		-Wl,--whole-archive lib$$i.a \
 | 
			
		||||
		-Wl,--out-implib,lib$$i.dll.a \
 | 
			
		||||
@@ -355,10 +356,13 @@ do_solaris-shared:
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		  MINUSZ='-z '; \
 | 
			
		||||
		  (${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \
 | 
			
		||||
			-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
			$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
 | 
			
		||||
			$$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
@@ -514,6 +518,19 @@ do_reliantunix-shared:
 | 
			
		||||
	libs="$$libs -l$$i"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
openssl.pc: Makefile.ssl
 | 
			
		||||
	@ ( 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 and tools'; \
 | 
			
		||||
	    echo 'Version: '$(VERSION); \
 | 
			
		||||
	    echo 'Requires: '; \
 | 
			
		||||
	    echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
 | 
			
		||||
	    echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
 | 
			
		||||
 | 
			
		||||
Makefile.ssl: Makefile.org
 | 
			
		||||
	@echo "Makefile.ssl is older than Makefile.org."
 | 
			
		||||
	@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
 | 
			
		||||
@@ -532,6 +549,7 @@ clean:
 | 
			
		||||
		rm -f $(LIBS); \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	rm -f openssl.pc
 | 
			
		||||
	rm -f *.a *.o speed.* *.map *.so .pure core
 | 
			
		||||
	rm -f $(TARFILE)
 | 
			
		||||
	@for i in $(ONEDIRS) ;\
 | 
			
		||||
@@ -564,6 +582,10 @@ links:
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
gentests:
 | 
			
		||||
	@(cd test && echo "generating dummy tests (if needed)..." && \
 | 
			
		||||
	$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' 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}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
	rm -f *.bak
 | 
			
		||||
	@for i in $(DIRS) ;\
 | 
			
		||||
@@ -579,7 +601,9 @@ rehash.time: certs
 | 
			
		||||
	@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
 | 
			
		||||
		export OPENSSL OPENSSL_DEBUG_MEMORY; \
 | 
			
		||||
		LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
 | 
			
		||||
		export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
 | 
			
		||||
		if [ "$(PLATFORM)" = "DJGPP" ]; then PATH="`pwd`\;$$PATH";  \
 | 
			
		||||
		elif [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
 | 
			
		||||
		export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
 | 
			
		||||
		$(PERL) tools/c_rehash certs)
 | 
			
		||||
	touch rehash.time
 | 
			
		||||
 | 
			
		||||
@@ -589,7 +613,9 @@ tests: rehash
 | 
			
		||||
	@(cd test && echo "testing..." && \
 | 
			
		||||
	$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' 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}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
 | 
			
		||||
	@LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
 | 
			
		||||
		export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
 | 
			
		||||
		if [ "$(PLATFORM)" = "DJGPP" ]; then PATH="`pwd`\;$$PATH";  \
 | 
			
		||||
		elif [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
 | 
			
		||||
		export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
 | 
			
		||||
		apps/openssl version -a
 | 
			
		||||
 | 
			
		||||
report:
 | 
			
		||||
@@ -652,6 +678,9 @@ update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_
 | 
			
		||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
 | 
			
		||||
# tar does not support the --files-from option.
 | 
			
		||||
tar:
 | 
			
		||||
	find . -type d -print | xargs chmod 755
 | 
			
		||||
	find . -type f -print | xargs chmod a+r
 | 
			
		||||
	find . -type f -perm -0100 -print | xargs chmod a+x
 | 
			
		||||
	find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
 | 
			
		||||
	$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
 | 
			
		||||
	tardy --user_number=0  --user_name=openssl \
 | 
			
		||||
@@ -681,6 +710,7 @@ dist_pem_h:
 | 
			
		||||
install: all install_docs
 | 
			
		||||
	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
 | 
			
		||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
 | 
			
		||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
 | 
			
		||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
 | 
			
		||||
@@ -702,9 +732,10 @@ install: all install_docs
 | 
			
		||||
	do \
 | 
			
		||||
		if [ -f "$$i" ]; then \
 | 
			
		||||
		(       echo installing $$i; \
 | 
			
		||||
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
			$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
			chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
			
		||||
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
			$(RANLIB) $(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; \
 | 
			
		||||
	done;
 | 
			
		||||
	@if [ -n "$(SHARED_LIBS)" ]; then \
 | 
			
		||||
@@ -714,21 +745,26 @@ install: all install_docs
 | 
			
		||||
			if [ -f "$$i" -o -f "$$i.a" ]; then \
 | 
			
		||||
			(       echo installing $$i; \
 | 
			
		||||
				if [ "$(PLATFORM)" != "Cygwin" ]; then \
 | 
			
		||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
					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/'`; \
 | 
			
		||||
					cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
					c=`echo $$i | sed 's/^lib\(.*\)/cyg\1-$(SHLIB_VERSION_NUMBER)/'`; \
 | 
			
		||||
					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; \
 | 
			
		||||
				fi ); \
 | 
			
		||||
			fi; \
 | 
			
		||||
		done; \
 | 
			
		||||
		(	here="`pwd`"; \
 | 
			
		||||
			cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
			make -f $$here/Makefile link-shared ); \
 | 
			
		||||
			set $(MAKE); \
 | 
			
		||||
			$$1 -f $$here/Makefile link-shared ); \
 | 
			
		||||
	fi
 | 
			
		||||
	cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
 | 
			
		||||
 | 
			
		||||
install_docs:
 | 
			
		||||
	@$(PERL) $(TOP)/util/mkdir-p.pl \
 | 
			
		||||
@@ -736,25 +772,43 @@ install_docs:
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man3 \
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man5 \
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man7
 | 
			
		||||
	@for i in doc/apps/*.pod; do \
 | 
			
		||||
	@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
 | 
			
		||||
	here="`pwd`"; \
 | 
			
		||||
	filecase=; \
 | 
			
		||||
	if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
 | 
			
		||||
		filecase=-i; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	for i in doc/apps/*.pod; do \
 | 
			
		||||
		fn=`basename $$i .pod`; \
 | 
			
		||||
		if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
 | 
			
		||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
			
		||||
		echo "installing man$$sec/$$fn.$$sec"; \
 | 
			
		||||
		(cd `$(PERL) util/dirname.pl $$i`; \
 | 
			
		||||
		sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
 | 
			
		||||
		sh -c "$$pod2man \
 | 
			
		||||
			--section=$$sec --center=OpenSSL \
 | 
			
		||||
			--release=$(VERSION) `basename $$i`") \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
			
		||||
	done
 | 
			
		||||
	@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
 | 
			
		||||
		$(PERL) util/extract-names.pl < $$i | \
 | 
			
		||||
			grep -v $$filecase "^$$fn\$$" | \
 | 
			
		||||
			(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
 | 
			
		||||
			 while read n; do \
 | 
			
		||||
				$$here/util/point.sh $$fn.$$sec $$n.$$sec; \
 | 
			
		||||
			 done); \
 | 
			
		||||
	done; \
 | 
			
		||||
	for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
			
		||||
		fn=`basename $$i .pod`; \
 | 
			
		||||
		if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
 | 
			
		||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
			
		||||
		echo "installing man$$sec/$$fn.$$sec"; \
 | 
			
		||||
		(cd `$(PERL) util/dirname.pl $$i`; \
 | 
			
		||||
		sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
 | 
			
		||||
		sh -c "$$pod2man \
 | 
			
		||||
			--section=$$sec --center=OpenSSL \
 | 
			
		||||
			--release=$(VERSION) `basename $$i`") \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
 | 
			
		||||
		$(PERL) util/extract-names.pl < $$i | \
 | 
			
		||||
			grep -v $$filecase "^$$fn\$$" | \
 | 
			
		||||
			(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
 | 
			
		||||
			 while read n; do \
 | 
			
		||||
				$$here/util/point.sh $$fn.$$sec $$n.$$sec; \
 | 
			
		||||
			 done); \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										38
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								NEWS
									
									
									
									
									
								
							@@ -17,6 +17,15 @@
 | 
			
		||||
        a separate distribution.
 | 
			
		||||
      o New elliptic curve library section.
 | 
			
		||||
      o New AES (Rijndael) library section.
 | 
			
		||||
      o Support for new platforms: Windows CE, Tandem OSS, A/UX, AIX 64-bit,
 | 
			
		||||
        Linux x86_64, Linux 64-bit on Sparc v9
 | 
			
		||||
      o Extended support for some platforms: VxWorks
 | 
			
		||||
      o Enhanced support for shared libraries.
 | 
			
		||||
      o Now only builds PIC code when shared library support is requested.
 | 
			
		||||
      o Support for pkg-config.
 | 
			
		||||
      o Lots of new manuals.
 | 
			
		||||
      o Makes symbolic links to or copies of manuals to cover all described
 | 
			
		||||
        functions.
 | 
			
		||||
      o Change DES API to clean up the namespace (some applications link also
 | 
			
		||||
        against libdes providing similar functions having the same name).
 | 
			
		||||
        Provide macros for backward compatibility (will be removed in the
 | 
			
		||||
@@ -30,16 +39,45 @@
 | 
			
		||||
      o Reworked parts of the BIGNUM code.
 | 
			
		||||
      o Support for new engines: Broadcom ubsec, Accelerated Encryption
 | 
			
		||||
        Processing, IBM 4758.
 | 
			
		||||
      o A few new engines added in the demos area.
 | 
			
		||||
      o Extended and corrected OID (object identifier) table.
 | 
			
		||||
      o PRNG: query at more locations for a random device, automatic query for
 | 
			
		||||
        EGD style random sources at several locations.
 | 
			
		||||
      o SSL/TLS: allow optional cipher choice according to server's preference.
 | 
			
		||||
      o SSL/TLS: allow server to explicitly set new session ids.
 | 
			
		||||
      o SSL/TLS: support Kerberos cipher suites (RFC2712).
 | 
			
		||||
	Only supports MIT Kerberos for now.
 | 
			
		||||
      o SSL/TLS: allow more precise control of renegotiations and sessions.
 | 
			
		||||
      o SSL/TLS: add callback to retrieve SSL/TLS messages.
 | 
			
		||||
      o SSL/TLS: support AES cipher suites (RFC3268).
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
 | 
			
		||||
 | 
			
		||||
      o New configuration targets for Tandem OSS and A/UX.
 | 
			
		||||
      o New OIDs for Microsoft attributes.
 | 
			
		||||
      o Better handling of SSL session caching.
 | 
			
		||||
      o Better comparison of distinguished names.
 | 
			
		||||
      o Better handling of shared libraries in a mixed GNU/non-GNU environment.
 | 
			
		||||
      o Support assembler code with Borland C.
 | 
			
		||||
      o Fixes for length problems.
 | 
			
		||||
      o Fixes for uninitialised variables.
 | 
			
		||||
      o Fixes for memory leaks, some unusual crashes and some race conditions.
 | 
			
		||||
      o Fixes for smaller building problems.
 | 
			
		||||
      o Updates of manuals, FAQ and other instructive documents.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g:
 | 
			
		||||
 | 
			
		||||
      o Important building fixes on Unix.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f:
 | 
			
		||||
 | 
			
		||||
      o Various important bugfixes.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e:
 | 
			
		||||
 | 
			
		||||
      o Important security related bugfixes.
 | 
			
		||||
      o Various SSL/TLS library bugfixes.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
 | 
			
		||||
 | 
			
		||||
      o Various SSL/TLS library bugfixes.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										32
									
								
								PROBLEMS
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								PROBLEMS
									
									
									
									
									
								
							@@ -38,3 +38,35 @@ may differ on your machine.
 | 
			
		||||
As long as Apple doesn't fix the problem with ld, this problem building
 | 
			
		||||
OpenSSL will remain as is.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Parallell make leads to errors
 | 
			
		||||
 | 
			
		||||
While running tests, running a parallell make is a bad idea.  Many test
 | 
			
		||||
scripts use the same name for output and input files, which means different
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
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'.
 | 
			
		||||
 | 
			
		||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
 | 
			
		||||
 | 
			
		||||
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
 | 
			
		||||
 | 
			
		||||
As subject suggests SHA-1 might perform poorly (4 times slower)
 | 
			
		||||
if compiled with WorkShop 6 compiler and -xarch=v9. The cause for
 | 
			
		||||
this seems to be the fact that compiler emits multiplication to
 | 
			
		||||
perform shift operations:-( To work the problem around configure
 | 
			
		||||
with './Configure solaris64-sparcv9-cc -DMD32_REG_T=int'.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								README
									
									
									
									
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
 OpenSSL 0.9.8-dev XX xxx XXXX
 | 
			
		||||
 OpenSSL 0.9.7 31 Dec 2002
 | 
			
		||||
 | 
			
		||||
 Copyright (c) 1998-2002 The OpenSSL Project
 | 
			
		||||
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 | 
			
		||||
@@ -154,7 +154,7 @@
 | 
			
		||||
    - Stack Traceback (if the application dumps core)
 | 
			
		||||
 | 
			
		||||
 Report the bug to the OpenSSL project via the Request Tracker
 | 
			
		||||
 (http://www.openssl.org/rt2.html) by mail to:
 | 
			
		||||
 (http://www.openssl.org/support/rt2.html) by mail to:
 | 
			
		||||
 | 
			
		||||
    openssl-bugs@openssl.org
 | 
			
		||||
 | 
			
		||||
@@ -173,7 +173,9 @@
 | 
			
		||||
 textual explanation of what your patch does.
 | 
			
		||||
 | 
			
		||||
 Note: For legal reasons, contributions from the US can be accepted only
 | 
			
		||||
 if a copy of the patch is sent to crypt@bxa.doc.gov
 | 
			
		||||
 if a TSA notification and a copy of the patch is sent to crypt@bis.doc.gov;
 | 
			
		||||
 see http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic]
 | 
			
		||||
 and http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)).
 | 
			
		||||
 | 
			
		||||
 The preferred format for changes is "diff -u" output. You might
 | 
			
		||||
 generate it like this:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								STATUS
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								STATUS
									
									
									
									
									
								
							@@ -1,12 +1,15 @@
 | 
			
		||||
 | 
			
		||||
  OpenSSL STATUS                           Last modified at
 | 
			
		||||
  ______________                           $Date: 2002/06/16 18:20:28 $
 | 
			
		||||
  ______________                           $Date: 2002/12/30 23:54:11 $
 | 
			
		||||
 | 
			
		||||
  DEVELOPMENT STATE
 | 
			
		||||
 | 
			
		||||
    o  OpenSSL 0.9.8:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.7-beta2: Released on June 16th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.7-beta1: Released on June  1st, 2002
 | 
			
		||||
    o  OpenSSL 0.9.7:  Released on December  31st, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6h: Released on December   5th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6g: Released on August     9th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6f: Released on August     8th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6e: Released on July      30th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6d: Released on May        9th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6c: Released on December  21st, 2001
 | 
			
		||||
    o  OpenSSL 0.9.6b: Released on July       9th, 2001
 | 
			
		||||
@@ -24,8 +27,17 @@
 | 
			
		||||
 | 
			
		||||
  RELEASE SHOWSTOPPERS
 | 
			
		||||
 | 
			
		||||
    o BN_mod_mul verification fails for mips3-sgi-irix
 | 
			
		||||
      unless configured with no-asm
 | 
			
		||||
    o [2002-11-21]
 | 
			
		||||
      PR 343 mentions that scrubbing memory with 'memset(ptr, 0, n)' may
 | 
			
		||||
      be optimized away in modern compilers.  This is definitely not good
 | 
			
		||||
      and needs to be fixed immediately.  The formula to use is presented
 | 
			
		||||
      in:
 | 
			
		||||
 | 
			
		||||
      http://online.securityfocus.com/archive/82/297918/2002-10-27/2002-11-02/0
 | 
			
		||||
 | 
			
		||||
      The problem report that mentions this is:
 | 
			
		||||
 | 
			
		||||
      https://www.aet.TU-Cottbus.DE/rt2/Ticket/Display.html?id=343
 | 
			
		||||
 | 
			
		||||
  AVAILABLE PATCHES
 | 
			
		||||
 | 
			
		||||
@@ -48,9 +60,8 @@
 | 
			
		||||
	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
 | 
			
		||||
	Kerberos 5 authentication (Heimdal)
 | 
			
		||||
	Constification
 | 
			
		||||
	OCSP
 | 
			
		||||
 | 
			
		||||
  NEEDS PATCH
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								VMS/tcpip_shr_decc.opt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								VMS/tcpip_shr_decc.opt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
sys$share:tcpip$ipc_shr.exe/share
 | 
			
		||||
							
								
								
									
										1961
									
								
								apps/Makefile.ssl
									
									
									
									
									
								
							
							
						
						
									
										1961
									
								
								apps/Makefile.ssl
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										135
									
								
								apps/apps.c
									
									
									
									
									
								
							
							
						
						
									
										135
									
								
								apps/apps.c
									
									
									
									
									
								
							@@ -114,9 +114,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#define NON_MAIN
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#undef NON_MAIN
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/x509v3.h>
 | 
			
		||||
@@ -136,6 +134,10 @@
 | 
			
		||||
#  endif /* NO_STRINGS_H */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define NON_MAIN
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#undef NON_MAIN
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#  include "bss_file.c"
 | 
			
		||||
#endif
 | 
			
		||||
@@ -335,8 +337,7 @@ void program_name(char *in, char *out, int size)
 | 
			
		||||
		p++;
 | 
			
		||||
	else
 | 
			
		||||
		p=in;
 | 
			
		||||
	strncpy(out,p,size-1);
 | 
			
		||||
	out[size-1]='\0';
 | 
			
		||||
	BUF_strlcpy(out,p,size);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
@@ -344,6 +345,7 @@ void program_name(char *in, char *out, int size)
 | 
			
		||||
#ifdef OPENSSL_SYS_WIN32
 | 
			
		||||
int WIN32_rename(char *from, char *to)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_SYS_WINCE
 | 
			
		||||
	/* Windows rename gives an error if 'to' exists, so delete it
 | 
			
		||||
	 * first and ignore file not found errror
 | 
			
		||||
	 */
 | 
			
		||||
@@ -351,6 +353,46 @@ int WIN32_rename(char *from, char *to)
 | 
			
		||||
		return -1;
 | 
			
		||||
#undef rename
 | 
			
		||||
	return rename(from, to);
 | 
			
		||||
#else
 | 
			
		||||
	/* convert strings to UNICODE */
 | 
			
		||||
	{
 | 
			
		||||
	BOOL result = FALSE;
 | 
			
		||||
	WCHAR* wfrom;
 | 
			
		||||
	WCHAR* wto;
 | 
			
		||||
	int i;
 | 
			
		||||
	wfrom = malloc((strlen(from)+1)*2);
 | 
			
		||||
	wto = malloc((strlen(to)+1)*2);
 | 
			
		||||
	if (wfrom != NULL && wto != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		for (i=0; i<(int)strlen(from)+1; i++)
 | 
			
		||||
			wfrom[i] = (short)from[i];
 | 
			
		||||
		for (i=0; i<(int)strlen(to)+1; i++)
 | 
			
		||||
			wto[i] = (short)to[i];
 | 
			
		||||
		result = MoveFile(wfrom, wto);
 | 
			
		||||
		}
 | 
			
		||||
	if (wfrom != NULL)
 | 
			
		||||
		free(wfrom);
 | 
			
		||||
	if (wto != NULL)
 | 
			
		||||
		free(wto);
 | 
			
		||||
	return result;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
int VMS_strcasecmp(const char *str1, const char *str2)
 | 
			
		||||
	{
 | 
			
		||||
	while (*str1 && *str2)
 | 
			
		||||
		{
 | 
			
		||||
		int res = toupper(*str1) - toupper(*str2);
 | 
			
		||||
		if (res) return res < 0 ? -1 : 1;
 | 
			
		||||
		}
 | 
			
		||||
	if (*str1)
 | 
			
		||||
		return 1;
 | 
			
		||||
	if (*str2)
 | 
			
		||||
		return -1;
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -429,16 +471,20 @@ int app_init(long mesgwin)
 | 
			
		||||
 | 
			
		||||
int dump_cert_text (BIO *out, X509 *x)
 | 
			
		||||
{
 | 
			
		||||
	char buf[256];
 | 
			
		||||
	X509_NAME_oneline(X509_get_subject_name(x),buf,256);
 | 
			
		||||
	BIO_puts(out,"subject=");
 | 
			
		||||
	BIO_puts(out,buf);
 | 
			
		||||
	char *p;
 | 
			
		||||
 | 
			
		||||
	X509_NAME_oneline(X509_get_issuer_name(x),buf,256);
 | 
			
		||||
	BIO_puts(out,"\nissuer= ");
 | 
			
		||||
	BIO_puts(out,buf);
 | 
			
		||||
	p=X509_NAME_oneline(X509_get_subject_name(x),NULL,0);
 | 
			
		||||
	BIO_puts(out,"subject=");
 | 
			
		||||
	BIO_puts(out,p);
 | 
			
		||||
	OPENSSL_free(p);
 | 
			
		||||
 | 
			
		||||
	p=X509_NAME_oneline(X509_get_issuer_name(x),NULL,0);
 | 
			
		||||
	BIO_puts(out,"\nissuer=");
 | 
			
		||||
	BIO_puts(out,p);
 | 
			
		||||
	BIO_puts(out,"\n");
 | 
			
		||||
        return 0;
 | 
			
		||||
	OPENSSL_free(p);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int ui_open(UI *ui)
 | 
			
		||||
@@ -569,7 +615,7 @@ int password_callback(char *buf, int bufsiz, int verify,
 | 
			
		||||
 | 
			
		||||
		if (buff)
 | 
			
		||||
			{
 | 
			
		||||
			memset(buff,0,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_cleanse(buff,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_free(buff);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
@@ -579,13 +625,13 @@ int password_callback(char *buf, int bufsiz, int verify,
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "User interface error\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			memset(buf,0,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_cleanse(buf,(unsigned int)bufsiz);
 | 
			
		||||
			res = 0;
 | 
			
		||||
			}
 | 
			
		||||
		if (ok == -2)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"aborted!\n");
 | 
			
		||||
			memset(buf,0,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_cleanse(buf,(unsigned int)bufsiz);
 | 
			
		||||
			res = 0;
 | 
			
		||||
			}
 | 
			
		||||
		UI_free(ui);
 | 
			
		||||
@@ -798,7 +844,7 @@ end:
 | 
			
		||||
	return(x);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *key=NULL;
 | 
			
		||||
@@ -808,7 +854,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
	cb_data.password = pass;
 | 
			
		||||
	cb_data.prompt_info = file;
 | 
			
		||||
 | 
			
		||||
	if (file == NULL)
 | 
			
		||||
	if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err,"no keyfile specified\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
@@ -828,12 +874,19 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
	if (BIO_read_filename(key,file) <= 0)
 | 
			
		||||
	if (file == NULL && maybe_stdin)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		setvbuf(stdin, NULL, _IONBF, 0);
 | 
			
		||||
		BIO_set_fp(key,stdin,BIO_NOCLOSE);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		if (BIO_read_filename(key,file) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(err, "Error opening %s %s\n",
 | 
			
		||||
				key_descrip, file);
 | 
			
		||||
			ERR_print_errors(err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
	if (format == FORMAT_ASN1)
 | 
			
		||||
		{
 | 
			
		||||
		pkey=d2i_PrivateKey_bio(key, NULL);
 | 
			
		||||
@@ -867,7 +920,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
	return(pkey);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *key=NULL;
 | 
			
		||||
@@ -877,7 +930,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
	cb_data.password = pass;
 | 
			
		||||
	cb_data.prompt_info = file;
 | 
			
		||||
 | 
			
		||||
	if (file == NULL)
 | 
			
		||||
	if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err,"no keyfile specified\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
@@ -897,11 +950,18 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
	if (BIO_read_filename(key,file) <= 0)
 | 
			
		||||
	if (file == NULL && maybe_stdin)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		setvbuf(stdin, NULL, _IONBF, 0);
 | 
			
		||||
		BIO_set_fp(key,stdin,BIO_NOCLOSE);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		if (BIO_read_filename(key,file) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(err, "Error opening %s %s\n",
 | 
			
		||||
				key_descrip, file);
 | 
			
		||||
			ERR_print_errors(err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
	if (format == FORMAT_ASN1)
 | 
			
		||||
		{
 | 
			
		||||
@@ -946,7 +1006,7 @@ load_netscape_key(BIO *err, BIO *key, const char *file,
 | 
			
		||||
		goto error;
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		if (!BUF_MEM_grow(buf,size+1024*10))
 | 
			
		||||
		if (!BUF_MEM_grow_clean(buf,size+1024*10))
 | 
			
		||||
			goto error;
 | 
			
		||||
		i = BIO_read(key, &(buf->data[size]), 1024*10);
 | 
			
		||||
		size += i;
 | 
			
		||||
@@ -1074,6 +1134,7 @@ int set_cert_ex(unsigned long *flags, const char *arg)
 | 
			
		||||
		{ "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
 | 
			
		||||
		{ "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
 | 
			
		||||
		{ "no_aux", X509_FLAG_NO_AUX, 0},
 | 
			
		||||
		{ "no_attributes", X509_FLAG_NO_ATTRIBUTES, 0},
 | 
			
		||||
		{ "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
@@ -1220,6 +1281,7 @@ void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
 | 
			
		||||
	char *buf;
 | 
			
		||||
	char mline = 0;
 | 
			
		||||
	int indent = 0;
 | 
			
		||||
 | 
			
		||||
	if(title) BIO_puts(out, title);
 | 
			
		||||
	if((lflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
 | 
			
		||||
		mline = 1;
 | 
			
		||||
@@ -1341,3 +1403,18 @@ int load_config(BIO *err, CONF *cnf)
 | 
			
		||||
		}
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
char *make_config_name()
 | 
			
		||||
	{
 | 
			
		||||
	const char *t=X509_get_default_cert_area();
 | 
			
		||||
	char *p;
 | 
			
		||||
 | 
			
		||||
	p=OPENSSL_malloc(strlen(t)+strlen(OPENSSL_CONF)+2);
 | 
			
		||||
	strcpy(p,t);
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
	strcat(p,"/");
 | 
			
		||||
#endif
 | 
			
		||||
	strcat(p,OPENSSL_CONF);
 | 
			
		||||
 | 
			
		||||
	return p;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								apps/apps.h
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								apps/apps.h
									
									
									
									
									
								
							@@ -139,13 +139,21 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read,
 | 
			
		||||
int WIN32_rename(char *oldname,char *newname);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* VMS below version 7.0 doesn't have strcasecmp() */
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
#define strcasecmp(str1,str2) VMS_strcasecmp((str1),(str2))
 | 
			
		||||
int VMS_strcasecmp(const char *str1, const char *str2);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
 | 
			
		||||
#define MAIN(a,v)	main(a,v)
 | 
			
		||||
 | 
			
		||||
#ifndef NON_MAIN
 | 
			
		||||
CONF *config=NULL;
 | 
			
		||||
BIO *bio_err=NULL;
 | 
			
		||||
#else
 | 
			
		||||
extern CONF *config;
 | 
			
		||||
extern BIO *bio_err;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -233,9 +241,9 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
 | 
			
		||||
int add_oid_section(BIO *err, CONF *conf);
 | 
			
		||||
X509 *load_cert(BIO *err, const char *file, int format,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *cert_descrip);
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip);
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip);
 | 
			
		||||
STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *cert_descrip);
 | 
			
		||||
@@ -243,6 +251,7 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
 | 
			
		||||
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
 | 
			
		||||
 | 
			
		||||
int load_config(BIO *err, CONF *cnf);
 | 
			
		||||
char *make_config_name(void);
 | 
			
		||||
 | 
			
		||||
/* Functions defined in ca.c and also used in ocsp.c */
 | 
			
		||||
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
 | 
			
		||||
 
 | 
			
		||||
@@ -332,6 +332,6 @@ end:
 | 
			
		||||
	if (osk != NULL) sk_free(osk);
 | 
			
		||||
	OBJ_cleanup();
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										154
									
								
								apps/ca.c
									
									
									
									
									
								
							
							
						
						
									
										154
									
								
								apps/ca.c
									
									
									
									
									
								
							@@ -64,7 +64,6 @@
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/conf.h>
 | 
			
		||||
#include <openssl/bio.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
@@ -94,11 +93,13 @@
 | 
			
		||||
#    else
 | 
			
		||||
#      include <unixlib.h>
 | 
			
		||||
#    endif
 | 
			
		||||
#  elif !defined(OPENSSL_SYS_VXWORKS)
 | 
			
		||||
#  elif !defined(OPENSSL_SYS_VXWORKS) && !defined(OPENSSL_SYS_WINDOWS)
 | 
			
		||||
#    include <sys/file.h>
 | 
			
		||||
#  endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
 | 
			
		||||
#ifndef W_OK
 | 
			
		||||
#  define F_OK 0
 | 
			
		||||
#  define X_OK 1
 | 
			
		||||
@@ -333,6 +334,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	MS_STATIC char buf[3][BSIZE];
 | 
			
		||||
	char *randfile=NULL;
 | 
			
		||||
	char *engine = NULL;
 | 
			
		||||
	char *tofree=NULL;
 | 
			
		||||
 | 
			
		||||
#ifdef EFENCE
 | 
			
		||||
EF_PROTECT_FREE=1;
 | 
			
		||||
@@ -560,25 +562,26 @@ bad:
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
	e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
 | 
			
		||||
	/*****************************************************************/
 | 
			
		||||
	tofree=NULL;
 | 
			
		||||
	if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
 | 
			
		||||
	if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
 | 
			
		||||
	if (configfile == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		/* We will just use 'buf[0]' as a temporary buffer.  */
 | 
			
		||||
		const char *s=X509_get_default_cert_area();
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		strncpy(buf[0],X509_get_default_cert_area(),
 | 
			
		||||
			sizeof(buf[0])-1-sizeof(CONFIG_FILE));
 | 
			
		||||
		tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE));
 | 
			
		||||
		strcpy(tofree,s);
 | 
			
		||||
#else
 | 
			
		||||
		strncpy(buf[0],X509_get_default_cert_area(),
 | 
			
		||||
			sizeof(buf[0])-2-sizeof(CONFIG_FILE));
 | 
			
		||||
		buf[0][sizeof(buf[0])-2-sizeof(CONFIG_FILE)]='\0';
 | 
			
		||||
		strcat(buf[0],"/");
 | 
			
		||||
		tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE)+1);
 | 
			
		||||
		strcpy(tofree,s);
 | 
			
		||||
		strcat(tofree,"/");
 | 
			
		||||
#endif
 | 
			
		||||
		strcat(buf[0],CONFIG_FILE);
 | 
			
		||||
		configfile=buf[0];
 | 
			
		||||
		strcat(tofree,CONFIG_FILE);
 | 
			
		||||
		configfile=tofree;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	BIO_printf(bio_err,"Using configuration from %s\n",configfile);
 | 
			
		||||
@@ -593,6 +596,8 @@ bad:
 | 
			
		||||
				,errorline,configfile);
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(tofree)
 | 
			
		||||
		OPENSSL_free(tofree);
 | 
			
		||||
 | 
			
		||||
	if (!load_config(bio_err, conf))
 | 
			
		||||
		goto err;
 | 
			
		||||
@@ -699,9 +704,9 @@ bad:
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	pkey = load_key(bio_err, keyfile, keyform, key, e, 
 | 
			
		||||
	pkey = load_key(bio_err, keyfile, keyform, 0, key, e, 
 | 
			
		||||
		"CA private key");
 | 
			
		||||
	if (key) memset(key,0,strlen(key));
 | 
			
		||||
	if (key) OPENSSL_cleanse(key,strlen(key));
 | 
			
		||||
	if (pkey == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		/* load_key() has already printed an appropriate message */
 | 
			
		||||
@@ -1016,7 +1021,7 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (verbose)
 | 
			
		||||
			BIO_printf(bio_err, "Succesfully loaded extensions file %s\n", extfile);
 | 
			
		||||
			BIO_printf(bio_err, "Successfully loaded extensions file %s\n", extfile);
 | 
			
		||||
 | 
			
		||||
		/* We can have sections in the ext file */
 | 
			
		||||
		if (!extensions && !(extensions = NCONF_get_string(extconf, "default", "extensions")))
 | 
			
		||||
@@ -1158,9 +1163,14 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
		if (verbose)
 | 
			
		||||
			{
 | 
			
		||||
			if ((f=BN_bn2hex(serial)) == NULL) goto err;
 | 
			
		||||
			BIO_printf(bio_err,"next serial number is %s\n",f);
 | 
			
		||||
			OPENSSL_free(f);
 | 
			
		||||
			if (BN_is_zero(serial))
 | 
			
		||||
				BIO_printf(bio_err,"next serial number is 00\n");
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				if ((f=BN_bn2hex(serial)) == NULL) goto err;
 | 
			
		||||
				BIO_printf(bio_err,"next serial number is %s\n",f);
 | 
			
		||||
				OPENSSL_free(f);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if ((attribs=NCONF_get_section(conf,policy)) == NULL)
 | 
			
		||||
@@ -1280,8 +1290,13 @@ bad:
 | 
			
		||||
 | 
			
		||||
			BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk));
 | 
			
		||||
 | 
			
		||||
			strncpy(buf[0],serialfile,BSIZE-4);
 | 
			
		||||
			buf[0][BSIZE-4]='\0';
 | 
			
		||||
			if(strlen(serialfile) > BSIZE-5 || strlen(dbfile) > BSIZE-5)
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"file name too long\n");
 | 
			
		||||
				goto err;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			strcpy(buf[0],serialfile);
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
			strcat(buf[0],"-new");
 | 
			
		||||
@@ -1291,8 +1306,7 @@ bad:
 | 
			
		||||
 | 
			
		||||
			if (!save_serial(buf[0],serial)) goto err;
 | 
			
		||||
 | 
			
		||||
			strncpy(buf[1],dbfile,BSIZE-4);
 | 
			
		||||
			buf[1][BSIZE-4]='\0';
 | 
			
		||||
			strcpy(buf[1],dbfile);
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
			strcat(buf[1],"-new");
 | 
			
		||||
@@ -1322,8 +1336,13 @@ bad:
 | 
			
		||||
			j=x->cert_info->serialNumber->length;
 | 
			
		||||
			p=(char *)x->cert_info->serialNumber->data;
 | 
			
		||||
			
 | 
			
		||||
			strncpy(buf[2],outdir,BSIZE-(j*2)-6);
 | 
			
		||||
			buf[2][BSIZE-(j*2)-6]='\0';
 | 
			
		||||
			if(strlen(outdir) >= (size_t)(j ? BSIZE-j*2-6 : BSIZE-8))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"certificate file name too long\n");
 | 
			
		||||
				goto err;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			strcpy(buf[2],outdir);
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
			strcat(buf[2],"/");
 | 
			
		||||
@@ -1513,11 +1532,6 @@ bad:
 | 
			
		||||
			if (pkey->type == EVP_PKEY_DSA) 
 | 
			
		||||
				dgst=EVP_dss1();
 | 
			
		||||
			else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
			if (pkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
				dgst=EVP_ecdsa();
 | 
			
		||||
			else
 | 
			
		||||
#endif
 | 
			
		||||
				dgst=EVP_md5();
 | 
			
		||||
			}
 | 
			
		||||
@@ -1562,8 +1576,13 @@ bad:
 | 
			
		||||
			if (j <= 0) goto err;
 | 
			
		||||
			X509_free(revcert);
 | 
			
		||||
 | 
			
		||||
			strncpy(buf[0],dbfile,BSIZE-4);
 | 
			
		||||
			buf[0][BSIZE-4]='\0';
 | 
			
		||||
			if(strlen(dbfile) > BSIZE-5)
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"filename too long\n");
 | 
			
		||||
				goto err;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			strcpy(buf[0],dbfile);
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
			strcat(buf[0],".new");
 | 
			
		||||
#else
 | 
			
		||||
@@ -1577,6 +1596,10 @@ bad:
 | 
			
		||||
				}
 | 
			
		||||
			j=TXT_DB_write(out,db);
 | 
			
		||||
			if (j <= 0) goto err;
 | 
			
		||||
			BIO_free_all(out);
 | 
			
		||||
			out = NULL;
 | 
			
		||||
			BIO_free_all(in);
 | 
			
		||||
			in = NULL;
 | 
			
		||||
			strncpy(buf[1],dbfile,BSIZE-4);
 | 
			
		||||
			buf[1][BSIZE-4]='\0';
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
@@ -1584,10 +1607,6 @@ bad:
 | 
			
		||||
#else
 | 
			
		||||
			strcat(buf[1],"-old");
 | 
			
		||||
#endif
 | 
			
		||||
			BIO_free(in);
 | 
			
		||||
			in = NULL;
 | 
			
		||||
			BIO_free(out);
 | 
			
		||||
			out = NULL;
 | 
			
		||||
			if (rename(dbfile,buf[1]) < 0)
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err,"unable to rename %s to %s\n", dbfile, buf[1]);
 | 
			
		||||
@@ -1607,6 +1626,8 @@ bad:
 | 
			
		||||
	/*****************************************************************/
 | 
			
		||||
	ret=0;
 | 
			
		||||
err:
 | 
			
		||||
	if(tofree)
 | 
			
		||||
		OPENSSL_free(tofree);
 | 
			
		||||
	BIO_free_all(Cout);
 | 
			
		||||
	BIO_free_all(Sout);
 | 
			
		||||
	BIO_free_all(out);
 | 
			
		||||
@@ -1626,7 +1647,7 @@ err:
 | 
			
		||||
	NCONF_free(conf);
 | 
			
		||||
	OBJ_cleanup();
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void lookup_fail(char *name, char *tag)
 | 
			
		||||
@@ -1691,7 +1712,7 @@ static BIGNUM *load_serial(char *serialfile)
 | 
			
		||||
	ret=ASN1_INTEGER_to_BN(ai,NULL);
 | 
			
		||||
	if (ret == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err,"error converting number from bin to BIGNUM");
 | 
			
		||||
		BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
err:
 | 
			
		||||
@@ -2094,9 +2115,11 @@ again2:
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	row[DB_name]=X509_NAME_oneline(dn_subject,NULL,0);
 | 
			
		||||
	row[DB_serial]=BN_bn2hex(serial);
 | 
			
		||||
	if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
 | 
			
		||||
	if (BN_is_zero(serial))
 | 
			
		||||
		row[DB_serial]=BUF_strdup("00");
 | 
			
		||||
	else
 | 
			
		||||
		row[DB_serial]=BN_bn2hex(serial);
 | 
			
		||||
	if (row[DB_serial] == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err,"Memory allocation failure\n");
 | 
			
		||||
		goto err;
 | 
			
		||||
@@ -2293,16 +2316,6 @@ again2:
 | 
			
		||||
		EVP_PKEY_copy_parameters(pktmp,pkey);
 | 
			
		||||
	EVP_PKEY_free(pktmp);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	if (pkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
		dgst = EVP_ecdsa();
 | 
			
		||||
	pktmp = X509_get_pubkey(ret);
 | 
			
		||||
	if (EVP_PKEY_missing_parameters(pktmp) &&
 | 
			
		||||
		!EVP_PKEY_missing_parameters(pkey))
 | 
			
		||||
		EVP_PKEY_copy_parameters(pktmp, pkey);
 | 
			
		||||
	EVP_PKEY_free(pktmp);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	if (!X509_sign(ret,pkey,dgst))
 | 
			
		||||
		goto err;
 | 
			
		||||
@@ -2319,10 +2332,10 @@ again2:
 | 
			
		||||
 | 
			
		||||
	/* row[DB_serial] done already */
 | 
			
		||||
	row[DB_file]=(char *)OPENSSL_malloc(8);
 | 
			
		||||
	/* row[DB_name] done already */
 | 
			
		||||
	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(ret),NULL,0);
 | 
			
		||||
 | 
			
		||||
	if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
 | 
			
		||||
		(row[DB_file] == NULL))
 | 
			
		||||
		(row[DB_file] == NULL) || (row[DB_name] == NULL))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err,"Memory allocation failure\n");
 | 
			
		||||
		goto err;
 | 
			
		||||
@@ -2589,7 +2602,10 @@ static int do_revoke(X509 *x509, TXT_DB *db, int type, char *value)
 | 
			
		||||
		row[i]=NULL;
 | 
			
		||||
	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
 | 
			
		||||
	bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
 | 
			
		||||
	row[DB_serial]=BN_bn2hex(bn);
 | 
			
		||||
	if (BN_is_zero(bn))
 | 
			
		||||
		row[DB_serial]=BUF_strdup("00");
 | 
			
		||||
	else
 | 
			
		||||
		row[DB_serial]=BN_bn2hex(bn);
 | 
			
		||||
	BN_free(bn);
 | 
			
		||||
	if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
 | 
			
		||||
		{
 | 
			
		||||
@@ -3058,55 +3074,59 @@ X509_NAME *do_subject(char *subject, long chtype)
 | 
			
		||||
	sp++; /* skip leading / */
 | 
			
		||||
 | 
			
		||||
	while (*sp)
 | 
			
		||||
	{
 | 
			
		||||
		{
 | 
			
		||||
		/* collect type */
 | 
			
		||||
		ne_types[ne_num] = bp;
 | 
			
		||||
		while (*sp)
 | 
			
		||||
		{
 | 
			
		||||
			{
 | 
			
		||||
			if (*sp == '\\') /* is there anything to escape in the type...? */
 | 
			
		||||
				{
 | 
			
		||||
				if (*++sp)
 | 
			
		||||
					*bp++ = *sp++;
 | 
			
		||||
				else
 | 
			
		||||
				{
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err, "escape character at end of string\n");
 | 
			
		||||
					goto error;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			else if (*sp == '=')
 | 
			
		||||
			{
 | 
			
		||||
				{
 | 
			
		||||
				sp++;
 | 
			
		||||
				*bp++ = '\0';
 | 
			
		||||
				break;
 | 
			
		||||
			}
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				*bp++ = *sp++;
 | 
			
		||||
		}
 | 
			
		||||
			}
 | 
			
		||||
		if (!*sp)
 | 
			
		||||
		{
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "end of string encountered while processing type of subject name element #%d\n", ne_num);
 | 
			
		||||
			goto error;
 | 
			
		||||
		}
 | 
			
		||||
			}
 | 
			
		||||
		ne_values[ne_num] = bp;
 | 
			
		||||
		while (*sp)
 | 
			
		||||
		{
 | 
			
		||||
			{
 | 
			
		||||
			if (*sp == '\\')
 | 
			
		||||
				{
 | 
			
		||||
				if (*++sp)
 | 
			
		||||
					*bp++ = *sp++;
 | 
			
		||||
				else
 | 
			
		||||
				{
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err, "escape character at end of string\n");
 | 
			
		||||
					goto error;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			else if (*sp == '/')
 | 
			
		||||
			{
 | 
			
		||||
				{
 | 
			
		||||
				sp++;
 | 
			
		||||
				break;
 | 
			
		||||
			}
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				*bp++ = *sp++;
 | 
			
		||||
		}
 | 
			
		||||
			}
 | 
			
		||||
		*bp++ = '\0';
 | 
			
		||||
		ne_num++;
 | 
			
		||||
	}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (!(n = X509_NAME_new()))
 | 
			
		||||
		goto error;
 | 
			
		||||
 
 | 
			
		||||
@@ -187,7 +187,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(STDout,SSL_CIPHER_description(
 | 
			
		||||
				sk_SSL_CIPHER_value(sk,i),
 | 
			
		||||
				buf,512));
 | 
			
		||||
				buf,sizeof buf));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -203,6 +203,6 @@ end:
 | 
			
		||||
	if (ssl != NULL) SSL_free(ssl);
 | 
			
		||||
	if (STDout != NULL) BIO_free_all(STDout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -377,7 +377,7 @@ end:
 | 
			
		||||
		X509_STORE_free(store);
 | 
			
		||||
	}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static X509_CRL *load_crl(char *infile, int format)
 | 
			
		||||
 
 | 
			
		||||
@@ -280,7 +280,7 @@ end:
 | 
			
		||||
	if (crl != NULL) X509_CRL_free(crl);
 | 
			
		||||
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								apps/dgst.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								apps/dgst.c
									
									
									
									
									
								
							@@ -117,7 +117,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	/* first check the program name */
 | 
			
		||||
	program_name(argv[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
	program_name(argv[0],pname,sizeof pname);
 | 
			
		||||
 | 
			
		||||
	md=EVP_get_digestbyname(pname);
 | 
			
		||||
 | 
			
		||||
@@ -277,10 +277,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if(keyfile)
 | 
			
		||||
		{
 | 
			
		||||
		if (want_pub)
 | 
			
		||||
			sigkey = load_pubkey(bio_err, keyfile, keyform, NULL,
 | 
			
		||||
			sigkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL,
 | 
			
		||||
				e, "key file");
 | 
			
		||||
		else
 | 
			
		||||
			sigkey = load_key(bio_err, keyfile, keyform, NULL,
 | 
			
		||||
			sigkey = load_key(bio_err, keyfile, keyform, 0, NULL,
 | 
			
		||||
				e, "key file");
 | 
			
		||||
		if (!sigkey)
 | 
			
		||||
			{
 | 
			
		||||
@@ -356,7 +356,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
end:
 | 
			
		||||
	if (buf != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		memset(buf,0,BUFSIZE);
 | 
			
		||||
		OPENSSL_cleanse(buf,BUFSIZE);
 | 
			
		||||
		OPENSSL_free(buf);
 | 
			
		||||
		}
 | 
			
		||||
	if (in != NULL) BIO_free(in);
 | 
			
		||||
@@ -365,7 +365,7 @@ end:
 | 
			
		||||
	if(sigbuf) OPENSSL_free(sigbuf);
 | 
			
		||||
	if (bmd != NULL) BIO_free(bmd);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(err);
 | 
			
		||||
	OPENSSL_EXIT(err);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
 
 | 
			
		||||
@@ -333,6 +333,6 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dh != NULL) DH_free(dh);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -519,7 +519,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dh != NULL) DH_free(dh);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
 | 
			
		||||
 
 | 
			
		||||
@@ -314,6 +314,6 @@ end:
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -372,7 +372,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dsa != NULL) DSA_free(dsa);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										445
									
								
								apps/ecdsa.c
									
									
									
									
									
								
							
							
						
						
									
										445
									
								
								apps/ecdsa.c
									
									
									
									
									
								
							@@ -1,445 +0,0 @@
 | 
			
		||||
/* apps/ecdsa.c */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 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.
 | 
			
		||||
 * ====================================================================
 | 
			
		||||
 *
 | 
			
		||||
 * This product includes cryptographic software written by Eric Young
 | 
			
		||||
 * (eay@cryptsoft.com).  This product includes software written by Tim
 | 
			
		||||
 * Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 | 
			
		||||
 * All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * This package is an SSL implementation written
 | 
			
		||||
 * by Eric Young (eay@cryptsoft.com).
 | 
			
		||||
 * The implementation was written so as to conform with Netscapes SSL.
 | 
			
		||||
 * 
 | 
			
		||||
 * This library is free for commercial and non-commercial use as long as
 | 
			
		||||
 * the following conditions are aheared to.  The following conditions
 | 
			
		||||
 * apply to all code found in this distribution, be it the RC4, RSA,
 | 
			
		||||
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 | 
			
		||||
 * included with this distribution is covered by the same copyright terms
 | 
			
		||||
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright remains Eric Young's, and as such any Copyright notices in
 | 
			
		||||
 * the code are not to be removed.
 | 
			
		||||
 * If this package is used in a product, Eric Young should be given attribution
 | 
			
		||||
 * as the author of the parts of the library used.
 | 
			
		||||
 * This can be in the form of a textual message at program startup or
 | 
			
		||||
 * in documentation (online or textual) provided with the package.
 | 
			
		||||
 * 
 | 
			
		||||
 * 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 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 acknowledgement:
 | 
			
		||||
 *    "This product includes cryptographic software written by
 | 
			
		||||
 *     Eric Young (eay@cryptsoft.com)"
 | 
			
		||||
 *    The word 'cryptographic' can be left out if the rouines from the library
 | 
			
		||||
 *    being used are not cryptographic related :-).
 | 
			
		||||
 * 4. If you include any Windows specific code (or a derivative thereof) from 
 | 
			
		||||
 *    the apps directory (application code) you must include an acknowledgement:
 | 
			
		||||
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 | 
			
		||||
 * 
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 | 
			
		||||
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
			
		||||
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 | 
			
		||||
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 | 
			
		||||
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 | 
			
		||||
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 | 
			
		||||
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
			
		||||
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 | 
			
		||||
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 | 
			
		||||
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
			
		||||
 * SUCH DAMAGE.
 | 
			
		||||
 * 
 | 
			
		||||
 * The licence and distribution terms for any publically available version or
 | 
			
		||||
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 | 
			
		||||
 * copied and put under another distribution licence
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/bio.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#include <openssl/evp.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG	ecdsa_main
 | 
			
		||||
 | 
			
		||||
/* -inform arg	- input format - default PEM (one of DER, NET or PEM)
 | 
			
		||||
 * -outform arg - output format - default PEM
 | 
			
		||||
 * -in arg	- input file - default stdin
 | 
			
		||||
 * -out arg	- output file - default stdout
 | 
			
		||||
 * -des		- encrypt output if PEM format with DES in cbc mode
 | 
			
		||||
 * -des3	- encrypt output if PEM format
 | 
			
		||||
 * -idea	- encrypt output if PEM format
 | 
			
		||||
 * -aes128	- encrypt output if PEM format
 | 
			
		||||
 * -aes192	- encrypt output if PEM format
 | 
			
		||||
 * -aes256	- encrypt output if PEM format
 | 
			
		||||
 * -text	- print a text version
 | 
			
		||||
 * -pub		- print the ECDSA public key
 | 
			
		||||
 * -compressed  - print the public key in compressed form ( default )   
 | 
			
		||||
 * -hybrid 	- print the public key in hybrid form
 | 
			
		||||
 * -uncompressed - print the public key in uncompressed form
 | 
			
		||||
 *		  the last three options ( compressed, hybrid and uncompressed )
 | 
			
		||||
 *		  are only used if the "-pub" option is also selected.
 | 
			
		||||
 *	  	  For a precise description of the the meaning of compressed,
 | 
			
		||||
 *		  hybrid and uncompressed please refer to the X9.62 standart.
 | 
			
		||||
 *		  All three forms represents ways to express the ecdsa public
 | 
			
		||||
 *		  key ( a point on a elliptic curve ) as octet string. Let len be
 | 
			
		||||
 *		  the length ( in bytes ) of an element of the field over which
 | 
			
		||||
 *		  the curve is defined, then a compressed octet string has the form
 | 
			
		||||
 *		  0x02 + result of BN_bn2bin() of the x coordinate of the public key
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
	ENGINE 	*e = NULL;
 | 
			
		||||
	int 	ret = 1;
 | 
			
		||||
	ECDSA 	*ecdsa = NULL;
 | 
			
		||||
	int 	i, badops = 0;
 | 
			
		||||
	const EVP_CIPHER *enc = NULL;
 | 
			
		||||
	BIO 	*in = NULL, *out = NULL;
 | 
			
		||||
	int 	informat, outformat, text=0, noout=0;
 | 
			
		||||
	int  	pubin = 0, pubout = 0;
 | 
			
		||||
	char 	*infile, *outfile, *prog, *engine;
 | 
			
		||||
	char 	*passargin = NULL, *passargout = NULL;
 | 
			
		||||
	char 	*passin = NULL, *passout = NULL;
 | 
			
		||||
	int 	pub = 0, point_form = 0;
 | 
			
		||||
	unsigned char *buffer = NULL;
 | 
			
		||||
	unsigned int  buf_len = 0;
 | 
			
		||||
	BIGNUM	*tmp_bn = NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err, stderr, BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	if (!load_config(bio_err, NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	engine = NULL;
 | 
			
		||||
	infile = NULL;
 | 
			
		||||
	outfile = NULL;
 | 
			
		||||
	informat = FORMAT_PEM;
 | 
			
		||||
	outformat = FORMAT_PEM;
 | 
			
		||||
 | 
			
		||||
	prog = argv[0];
 | 
			
		||||
	argc--;
 | 
			
		||||
	argv++;
 | 
			
		||||
	while (argc >= 1)
 | 
			
		||||
	{
 | 
			
		||||
		if (strcmp(*argv,"-inform") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			informat=str2fmt(*(++argv));
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-outform") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outformat=str2fmt(*(++argv));
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-in") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			infile= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-out") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-passin") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargin= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-passout") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargout= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv, "-engine") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv, "-noout") == 0)
 | 
			
		||||
			noout = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-text") == 0)
 | 
			
		||||
			text = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-pub") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			pub = 1;
 | 
			
		||||
			buffer = (unsigned char *)(*(argv+1));
 | 
			
		||||
			if (strcmp((char *)buffer, "compressed") == 0)
 | 
			
		||||
				point_form = POINT_CONVERSION_COMPRESSED;
 | 
			
		||||
			else if (strcmp((char *)buffer, "hybrid") == 0)
 | 
			
		||||
				point_form = POINT_CONVERSION_HYBRID;
 | 
			
		||||
			else if (strcmp((char *)buffer, "uncompressed") == 0)
 | 
			
		||||
				point_form = POINT_CONVERSION_UNCOMPRESSED;
 | 
			
		||||
			if (point_form)
 | 
			
		||||
			{
 | 
			
		||||
				argc--;
 | 
			
		||||
				argv++;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv, "-pubin") == 0)
 | 
			
		||||
			pubin=1;
 | 
			
		||||
		else if (strcmp(*argv, "-pubout") == 0)
 | 
			
		||||
			pubout=1;
 | 
			
		||||
		else if ((enc=EVP_get_cipherbyname(&(argv[0][1]))) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
			
		||||
			badops=1;
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		argc--;
 | 
			
		||||
		argv++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (badops)
 | 
			
		||||
	{
 | 
			
		||||
bad:
 | 
			
		||||
		BIO_printf(bio_err, "%s [options] <infile >outfile\n",prog);
 | 
			
		||||
		BIO_printf(bio_err, "where options are\n");
 | 
			
		||||
		BIO_printf(bio_err, " -inform arg     input format - DER or PEM\n");
 | 
			
		||||
		BIO_printf(bio_err, " -outform arg    output format - DER or PEM\n");
 | 
			
		||||
		BIO_printf(bio_err, " -in arg         input file\n");
 | 
			
		||||
		BIO_printf(bio_err, " -passin arg     input file pass phrase source\n");
 | 
			
		||||
		BIO_printf(bio_err, " -out arg        output file\n");
 | 
			
		||||
		BIO_printf(bio_err, " -passout arg    output file pass phrase source\n");
 | 
			
		||||
		BIO_printf(bio_err, " -engine e       use engine e, possibly a hardware device.\n");
 | 
			
		||||
		BIO_printf(bio_err, " -des            encrypt PEM output with cbc des\n");
 | 
			
		||||
		BIO_printf(bio_err, " -des3           encrypt PEM output with ede cbc des using 168 bit key\n");
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
		BIO_printf(bio_err, " -idea           encrypt PEM output with cbc idea\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
 | 
			
		||||
		BIO_printf(bio_err, " -text           print the key in text\n");
 | 
			
		||||
		BIO_printf(bio_err, " -noout          don't print key out\n");
 | 
			
		||||
		BIO_printf(bio_err, " -pub [compressed | hybrid | uncompressed] \n");
 | 
			
		||||
		BIO_printf(bio_err, "         compressed     print the public key in compressed form ( default )\n");   
 | 
			
		||||
		BIO_printf(bio_err, "         hybrid         print the public key in hybrid form\n");
 | 
			
		||||
 		BIO_printf(bio_err, "         uncompressed   print the public key in uncompressed form\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
 | 
			
		||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) 
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	in = BIO_new(BIO_s_file());
 | 
			
		||||
	out = BIO_new(BIO_s_file());
 | 
			
		||||
	if ((in == NULL) || (out == NULL))
 | 
			
		||||
	{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (infile == NULL)
 | 
			
		||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		if (BIO_read_filename(in,infile) <= 0)
 | 
			
		||||
		{
 | 
			
		||||
			perror(infile);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	BIO_printf(bio_err,"read ECDSA key\n");
 | 
			
		||||
	if (informat == FORMAT_ASN1) 
 | 
			
		||||
	{
 | 
			
		||||
		if (pubin) 
 | 
			
		||||
			ecdsa = d2i_ECDSA_PUBKEY_bio(in, NULL);
 | 
			
		||||
		else 
 | 
			
		||||
			ecdsa = d2i_ECDSAPrivateKey_bio(in, NULL);
 | 
			
		||||
	} else if (informat == FORMAT_PEM) 
 | 
			
		||||
	{
 | 
			
		||||
		if (pubin) 
 | 
			
		||||
			ecdsa = PEM_read_bio_ECDSA_PUBKEY(in, NULL, NULL, NULL);
 | 
			
		||||
		else 
 | 
			
		||||
			ecdsa = PEM_read_bio_ECDSAPrivateKey(in, NULL, NULL, passin);
 | 
			
		||||
	} else
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "bad input format specified for key\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
	if (ecdsa == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err,"unable to load Key\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (outfile == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_set_fp(out, stdout, BIO_NOCLOSE);
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		{
 | 
			
		||||
			BIO *tmpbio = BIO_new(BIO_f_linebuffer());
 | 
			
		||||
			out = BIO_push(tmpbio, out);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		if (BIO_write_filename(out, outfile) <= 0)
 | 
			
		||||
		{
 | 
			
		||||
			perror(outfile);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (text) 
 | 
			
		||||
		if (!ECDSA_print(out, ecdsa, 0))
 | 
			
		||||
		{
 | 
			
		||||
			perror(outfile);
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (pub)
 | 
			
		||||
	{
 | 
			
		||||
		fprintf(stdout, "Public Key (");
 | 
			
		||||
		if (point_form == POINT_CONVERSION_COMPRESSED)
 | 
			
		||||
			fprintf(stdout, "COMPRESSED");
 | 
			
		||||
		else if (point_form == POINT_CONVERSION_UNCOMPRESSED)
 | 
			
		||||
			fprintf(stdout, "UNCOMPRESSED");
 | 
			
		||||
		else if (point_form == POINT_CONVERSION_HYBRID)
 | 
			
		||||
			fprintf(stdout, "HYBRID");
 | 
			
		||||
		fprintf(stdout, ")=");
 | 
			
		||||
		buf_len = EC_POINT_point2oct(ecdsa->group, EC_GROUP_get0_generator(ecdsa->group),
 | 
			
		||||
					     point_form, NULL, 0, NULL);
 | 
			
		||||
		if (!buf_len)
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"invalid public key length\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		if ((tmp_bn = BN_new()) == NULL ||
 | 
			
		||||
		    (buffer = OPENSSL_malloc(buf_len)) == NULL) goto end;
 | 
			
		||||
		if (!EC_POINT_point2oct(ecdsa->group, EC_GROUP_get0_generator(ecdsa->group),
 | 
			
		||||
					     point_form, buffer, buf_len, NULL) ||
 | 
			
		||||
		    !BN_bin2bn(buffer, buf_len, tmp_bn))
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"can not encode public key\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			OPENSSL_free(buffer);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		BN_print(out, tmp_bn);
 | 
			
		||||
		fprintf(stdout,"\n");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (noout) 
 | 
			
		||||
		goto end;
 | 
			
		||||
	BIO_printf(bio_err, "writing ECDSA key\n");
 | 
			
		||||
	if (outformat == FORMAT_ASN1) 
 | 
			
		||||
	{
 | 
			
		||||
		if(pubin || pubout) 
 | 
			
		||||
			i = i2d_ECDSA_PUBKEY_bio(out, ecdsa);
 | 
			
		||||
		else 
 | 
			
		||||
			i = i2d_ECDSAPrivateKey_bio(out, ecdsa);
 | 
			
		||||
	} else if (outformat == FORMAT_PEM) 
 | 
			
		||||
	{
 | 
			
		||||
		if(pubin || pubout)
 | 
			
		||||
			i = PEM_write_bio_ECDSA_PUBKEY(out, ecdsa);
 | 
			
		||||
		else 
 | 
			
		||||
			i = PEM_write_bio_ECDSAPrivateKey(out, ecdsa, enc,
 | 
			
		||||
							NULL, 0, NULL, passout);
 | 
			
		||||
	} else 
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "bad output format specified for outfile\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
	if (!i)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "unable to write private key\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
		ret=0;
 | 
			
		||||
end:
 | 
			
		||||
	if (in) 	BIO_free(in);
 | 
			
		||||
	if (out)	BIO_free_all(out);
 | 
			
		||||
	if (ecdsa) 	ECDSA_free(ecdsa);
 | 
			
		||||
	if (tmp_bn)	BN_free(tmp_bn);
 | 
			
		||||
	if (passin) 	OPENSSL_free(passin);
 | 
			
		||||
	if (passout) 	OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										688
									
								
								apps/ecparam.c
									
									
									
									
									
								
							
							
						
						
									
										688
									
								
								apps/ecparam.c
									
									
									
									
									
								
							@@ -1,688 +0,0 @@
 | 
			
		||||
/* apps/ecparam.c */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 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.
 | 
			
		||||
 * ====================================================================
 | 
			
		||||
 *
 | 
			
		||||
 * This product includes cryptographic software written by Eric Young
 | 
			
		||||
 * (eay@cryptsoft.com).  This product includes software written by Tim
 | 
			
		||||
 * Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/bio.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
#include <openssl/ec.h>
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG	ecparam_main
 | 
			
		||||
 | 
			
		||||
/* -inform arg            - input format - default PEM (DER or PEM)
 | 
			
		||||
 * -outform arg           - output format - default PEM
 | 
			
		||||
 * -in arg                - input file  - default stdin
 | 
			
		||||
 * -out arg               - output file - default stdout
 | 
			
		||||
 * -noout
 | 
			
		||||
 * -text
 | 
			
		||||
 * -check                 - validate the ec parameters
 | 
			
		||||
 * -C
 | 
			
		||||
 * -noout
 | 
			
		||||
 * -name file             - use the ecparameters with 'short name' name
 | 
			
		||||
 * -list_curves           - prints a list of all currently available curve
 | 
			
		||||
 *                          'short names' and exits
 | 
			
		||||
 * -conv_form                  - specifies the point conversion form 
 | 
			
		||||
 *                          possible values : compressed
 | 
			
		||||
 *                                            uncompressed (default)
 | 
			
		||||
 *                                            hybrid
 | 
			
		||||
 * -param_enc             - specifies the way the ec parameters are encoded
 | 
			
		||||
 *                          in the asn1 der encoding
 | 
			
		||||
 *                          possilbe values : named_curve (default)
 | 
			
		||||
 *                                            explicit
 | 
			
		||||
 * -no_seed               - if 'explicit' parameters are choosen do not
 | 
			
		||||
 *                          use the seed
 | 
			
		||||
 * -genkey                - generates a ecdsa private key
 | 
			
		||||
 * -rand file
 | 
			
		||||
 * -engine e              - use engine e, possible a hardware device
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static const char *curve_list[20] = {
 | 
			
		||||
	"prime192v1       - NIST recommended curve over a 192 bit prime field",
 | 
			
		||||
	"prime192v2       - 192 bit prime curve from the X9.62 draft",
 | 
			
		||||
	"prime192v3       - 192 bit prime curve from the X9.62 draft",
 | 
			
		||||
	"prime239v1       - 239 bit prime curve from the X9.62 draft",
 | 
			
		||||
	"prime239v2       - 239 bit prime curve from the X9.62 draft",
 | 
			
		||||
	"prime239v3       - 239 bit prime curve from the X9.62 draft", 
 | 
			
		||||
	"prime256v1       - NIST recommended curve over a 256 bit prime field",
 | 
			
		||||
	"secp112r1        - SECG recommended curve over a 112 bit prime field", 
 | 
			
		||||
	"secp112r2        - SECG recommended curve over a 112 bit prime field", 
 | 
			
		||||
	"secp128r1        - SECG recommended curve over a 128 bit prime field",
 | 
			
		||||
	"secp128r2        - SECG recommended curve over a 128 bit prime field", 
 | 
			
		||||
	"secp160k1        - SECG recommended curve over a 160 bit prime field", 
 | 
			
		||||
	"secp160r1        - SECG recommended curve over a 160 bit prime field", 
 | 
			
		||||
	"secp160r2        - SECG recommended curve over a 160 bit prime field", 
 | 
			
		||||
	"secp192k1        - SECG recommended curve over a 192 bit prime field",
 | 
			
		||||
	"secp224k1        - SECG recommended curve over a 224 bit prime field", 
 | 
			
		||||
	"secp224r1        - NIST recommended curve over a 224 bit prime field", 
 | 
			
		||||
	"secp256k1        - SECG recommended curve over a 256 bit prime field",
 | 
			
		||||
	"secp384r1        - NIST recommended curve over a 384 bit prime field", 
 | 
			
		||||
	"secp521r1        - NIST recommended curve over a 521 bit prime field"
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static int ecparam_print_var(BIO *,BIGNUM *,const char *,int,unsigned char *);
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
	EC_GROUP *group = NULL;
 | 
			
		||||
	point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; 
 | 
			
		||||
	int 	new_form = 0;
 | 
			
		||||
	int 	asn1_flag = OPENSSL_EC_NAMED_CURVE;
 | 
			
		||||
	int 	new_asn1_flag = 0;
 | 
			
		||||
	char 	*curve_name = NULL, *inrand = NULL;
 | 
			
		||||
	int	list_curves = 0, no_seed = 0, check = 0,
 | 
			
		||||
		badops = 0, text = 0, i, need_rand = 0, genkey = 0;
 | 
			
		||||
	char	*infile = NULL, *outfile = NULL, *prog;
 | 
			
		||||
	BIO 	*in = NULL, *out = NULL;
 | 
			
		||||
	int 	informat, outformat, noout = 0, C = 0, ret = 1;
 | 
			
		||||
	ENGINE	*e = NULL;
 | 
			
		||||
	char	*engine = NULL;
 | 
			
		||||
 | 
			
		||||
	BIGNUM	*ec_p = NULL, *ec_a = NULL, *ec_b = NULL,
 | 
			
		||||
		*ec_gen = NULL, *ec_order = NULL, *ec_cofactor = NULL;
 | 
			
		||||
	unsigned char *buffer = NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	if (!load_config(bio_err, NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	informat=FORMAT_PEM;
 | 
			
		||||
	outformat=FORMAT_PEM;
 | 
			
		||||
 | 
			
		||||
	prog=argv[0];
 | 
			
		||||
	argc--;
 | 
			
		||||
	argv++;
 | 
			
		||||
	while (argc >= 1)
 | 
			
		||||
		{
 | 
			
		||||
		if 	(strcmp(*argv,"-inform") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			informat=str2fmt(*(++argv));
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-outform") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outformat=str2fmt(*(++argv));
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-in") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			infile= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-out") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-text") == 0)
 | 
			
		||||
			text = 1;
 | 
			
		||||
		else if (strcmp(*argv,"-C") == 0)
 | 
			
		||||
			C = 1;
 | 
			
		||||
		else if (strcmp(*argv,"-check") == 0)
 | 
			
		||||
			check = 1;
 | 
			
		||||
		else if (strcmp (*argv, "-name") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				goto bad;
 | 
			
		||||
			curve_name = *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv, "-list_curves") == 0)
 | 
			
		||||
			list_curves = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-conv_form") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				goto bad;
 | 
			
		||||
			++argv;
 | 
			
		||||
			new_form = 1;
 | 
			
		||||
			if (strcmp(*argv, "compressed") == 0)
 | 
			
		||||
				form = POINT_CONVERSION_COMPRESSED;
 | 
			
		||||
			else if (strcmp(*argv, "uncompressed") == 0)
 | 
			
		||||
				form = POINT_CONVERSION_UNCOMPRESSED;
 | 
			
		||||
			else if (strcmp(*argv, "hybrid") == 0)
 | 
			
		||||
				form = POINT_CONVERSION_HYBRID;
 | 
			
		||||
			else
 | 
			
		||||
				goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv, "-param_enc") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				goto bad;
 | 
			
		||||
			++argv;
 | 
			
		||||
			new_asn1_flag = 1;
 | 
			
		||||
			if (strcmp(*argv, "named_curve") == 0)
 | 
			
		||||
				asn1_flag = OPENSSL_EC_NAMED_CURVE;
 | 
			
		||||
			else if (strcmp(*argv, "explicit") == 0)
 | 
			
		||||
				asn1_flag = 0;
 | 
			
		||||
			else
 | 
			
		||||
				goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv, "-no_seed") == 0)
 | 
			
		||||
			no_seed = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-noout") == 0)
 | 
			
		||||
			noout=1;
 | 
			
		||||
		else if (strcmp(*argv,"-genkey") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			genkey=1;
 | 
			
		||||
			need_rand=1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv, "-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			inrand= *(++argv);
 | 
			
		||||
			need_rand=1;
 | 
			
		||||
			}
 | 
			
		||||
		else if(strcmp(*argv, "-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine = *(++argv);
 | 
			
		||||
			}	
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
			
		||||
			badops=1;
 | 
			
		||||
			break;
 | 
			
		||||
			}
 | 
			
		||||
		argc--;
 | 
			
		||||
		argv++;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (badops)
 | 
			
		||||
		{
 | 
			
		||||
bad:
 | 
			
		||||
		BIO_printf(bio_err, "%s [options] <infile >outfile\n",prog);
 | 
			
		||||
		BIO_printf(bio_err, "where options are\n");
 | 
			
		||||
		BIO_printf(bio_err, " -inform arg             input format - "
 | 
			
		||||
				"default PEM (DER or PEM)\n");
 | 
			
		||||
		BIO_printf(bio_err, " -outform arg            output format - "
 | 
			
		||||
				"default PEM\n");
 | 
			
		||||
		BIO_printf(bio_err, " -in  arg                input file  - "
 | 
			
		||||
				"default stdin\n");
 | 
			
		||||
		BIO_printf(bio_err, " -out arg                output file - "
 | 
			
		||||
				"default stdout\n");
 | 
			
		||||
		BIO_printf(bio_err, " -noout                  do not print the "
 | 
			
		||||
				"ec parameter\n");
 | 
			
		||||
		BIO_printf(bio_err, " -text                   print the ec "
 | 
			
		||||
				"parameters in text form\n");
 | 
			
		||||
		BIO_printf(bio_err, " -check                  validate the ec "
 | 
			
		||||
				"parameters\n");
 | 
			
		||||
		BIO_printf(bio_err, " -C                      print a 'C' "
 | 
			
		||||
				"function creating the parameters\n");
 | 
			
		||||
		BIO_printf(bio_err, " -name arg               use the "
 | 
			
		||||
				"ec parameters with 'short name' name\n");
 | 
			
		||||
		BIO_printf(bio_err, " -list_curves            prints a list of "
 | 
			
		||||
				"all currently available curve\n");
 | 
			
		||||
		BIO_printf(bio_err, "                         'short names'\n");
 | 
			
		||||
		BIO_printf(bio_err, " -conv_form arg          specifies the "
 | 
			
		||||
				"point conversion form \n");
 | 
			
		||||
		BIO_printf(bio_err, "                         possible values :"
 | 
			
		||||
				" compressed\n");
 | 
			
		||||
		BIO_printf(bio_err, "                                          "
 | 
			
		||||
				" uncompressed (default)\n");
 | 
			
		||||
		BIO_printf(bio_err, "                                          "
 | 
			
		||||
				" hybrid\n");
 | 
			
		||||
		BIO_printf(bio_err, " -param_enc arg          specifies the way"
 | 
			
		||||
				" the ec parameters are encoded\n");
 | 
			
		||||
		BIO_printf(bio_err, "                         in the asn1 der "
 | 
			
		||||
				"encoding\n");
 | 
			
		||||
		BIO_printf(bio_err, "                         possilbe values :"
 | 
			
		||||
				" named_curve (default)\n");
 | 
			
		||||
		BIO_printf(bio_err,"                                      "
 | 
			
		||||
				"     explicit\n");
 | 
			
		||||
		BIO_printf(bio_err, " -no_seed                if 'explicit'"
 | 
			
		||||
				" parameters are choosen do not\n");
 | 
			
		||||
		BIO_printf(bio_err, "                         use the seed\n");
 | 
			
		||||
		BIO_printf(bio_err, " -genkey                 generate ecdsa"
 | 
			
		||||
				" key\n");
 | 
			
		||||
		BIO_printf(bio_err, " -rand file              files to use for"
 | 
			
		||||
				" random number input\n");
 | 
			
		||||
		BIO_printf(bio_err, " -engine e               use engine e, "
 | 
			
		||||
				"possible a hardware device\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
	in=BIO_new(BIO_s_file());
 | 
			
		||||
	out=BIO_new(BIO_s_file());
 | 
			
		||||
	if ((in == NULL) || (out == NULL))
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (infile == NULL)
 | 
			
		||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_read_filename(in,infile) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
			perror(infile);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	if (outfile == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_fp(out,stdout,BIO_NOCLOSE);
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		{
 | 
			
		||||
		BIO *tmpbio = BIO_new(BIO_f_linebuffer());
 | 
			
		||||
		out = BIO_push(tmpbio, out);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_write_filename(out,outfile) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
			perror(outfile);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
 | 
			
		||||
	if (list_curves)
 | 
			
		||||
		{
 | 
			
		||||
		int counter=0;
 | 
			
		||||
 | 
			
		||||
		for (; counter < sizeof(curve_list)/sizeof(char *); counter++)
 | 
			
		||||
			if (BIO_printf(bio_err, " %s\n", curve_list[counter]) 
 | 
			
		||||
				<= 0) 
 | 
			
		||||
				goto end;
 | 
			
		||||
		ret = 0;
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (curve_name != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		int nid = OBJ_sn2nid(curve_name);
 | 
			
		||||
	
 | 
			
		||||
		if (nid == 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "unknown curve name (%s)\n", 
 | 
			
		||||
				curve_name);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		group = EC_GROUP_new_by_nid(nid);
 | 
			
		||||
		if (group == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "unable to create curve (%s)\n", 
 | 
			
		||||
				curve_name);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		EC_GROUP_set_asn1_flag(group, asn1_flag);
 | 
			
		||||
		EC_GROUP_set_point_conversion_form(group, form);
 | 
			
		||||
		}
 | 
			
		||||
	else if (informat == FORMAT_ASN1)
 | 
			
		||||
		{
 | 
			
		||||
		group = d2i_ECPKParameters_bio(in, NULL);
 | 
			
		||||
		}
 | 
			
		||||
	else if (informat == FORMAT_PEM)
 | 
			
		||||
		{
 | 
			
		||||
		group = PEM_read_bio_ECPKParameters(in,NULL,NULL,NULL);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "bad input format specified\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (group == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, 
 | 
			
		||||
			"unable to load elliptic curve parameters\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (new_form)
 | 
			
		||||
		EC_GROUP_set_point_conversion_form(group, form);
 | 
			
		||||
 | 
			
		||||
	if (new_asn1_flag)
 | 
			
		||||
		EC_GROUP_set_asn1_flag(group, asn1_flag);
 | 
			
		||||
 | 
			
		||||
	if (no_seed)
 | 
			
		||||
		{
 | 
			
		||||
		EC_GROUP_set_seed(group, NULL, 0);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (text)
 | 
			
		||||
		{
 | 
			
		||||
		if (!ECPKParameters_print(out, group, 0))
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (check)
 | 
			
		||||
		{
 | 
			
		||||
		if (group == NULL)
 | 
			
		||||
			BIO_printf(bio_err, "no elliptic curve parameters\n");
 | 
			
		||||
		BIO_printf(bio_err, "checking elliptic curve parameters: ");
 | 
			
		||||
		if (!EC_GROUP_check(group, NULL))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "failed\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			BIO_printf(bio_err, "ok\n");
 | 
			
		||||
			
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (C)
 | 
			
		||||
		{
 | 
			
		||||
		size_t	buf_len = 0, tmp_len = 0;
 | 
			
		||||
		const EC_POINT *point;
 | 
			
		||||
		int	is_prime, len = 0;
 | 
			
		||||
		const EC_METHOD *meth = EC_GROUP_method_of(group);
 | 
			
		||||
 | 
			
		||||
		if ((ec_p = BN_new()) == NULL || (ec_a = BN_new()) == NULL ||
 | 
			
		||||
		    (ec_b = BN_new()) == NULL || (ec_gen = BN_new()) == NULL ||
 | 
			
		||||
		    (ec_order = BN_new()) == NULL || 
 | 
			
		||||
		    (ec_cofactor = BN_new()) == NULL )
 | 
			
		||||
			{
 | 
			
		||||
			perror("OPENSSL_malloc");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		is_prime = (EC_METHOD_get_field_type(meth) == 
 | 
			
		||||
			NID_X9_62_prime_field);
 | 
			
		||||
 | 
			
		||||
		if (is_prime)
 | 
			
		||||
			{
 | 
			
		||||
			if (!EC_GROUP_get_curve_GFp(group, ec_p, ec_a,
 | 
			
		||||
				ec_b, NULL))
 | 
			
		||||
				goto end;
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			/* TODO */
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if ((point = EC_GROUP_get0_generator(group)) == NULL)
 | 
			
		||||
			goto end;
 | 
			
		||||
		if (!EC_POINT_point2bn(group, point, 
 | 
			
		||||
			EC_GROUP_get_point_conversion_form(group), ec_gen, 
 | 
			
		||||
			NULL))
 | 
			
		||||
			goto end;
 | 
			
		||||
		if (!EC_GROUP_get_order(group, ec_order, NULL))
 | 
			
		||||
			goto end;
 | 
			
		||||
		if (!EC_GROUP_get_cofactor(group, ec_cofactor, NULL))
 | 
			
		||||
			goto end;
 | 
			
		||||
 | 
			
		||||
		if (!ec_p || !ec_a || !ec_b || !ec_gen || 
 | 
			
		||||
			!ec_order || !ec_cofactor)
 | 
			
		||||
			goto end;
 | 
			
		||||
 | 
			
		||||
		len = BN_num_bits(ec_order);
 | 
			
		||||
 | 
			
		||||
		if ((tmp_len = (size_t)BN_num_bytes(ec_p)) > buf_len)
 | 
			
		||||
			buf_len = tmp_len;
 | 
			
		||||
		if ((tmp_len = (size_t)BN_num_bytes(ec_a)) > buf_len)
 | 
			
		||||
			buf_len = tmp_len;
 | 
			
		||||
		if ((tmp_len = (size_t)BN_num_bytes(ec_b)) > buf_len)
 | 
			
		||||
			buf_len = tmp_len;
 | 
			
		||||
		if ((tmp_len = (size_t)BN_num_bytes(ec_gen)) > buf_len)
 | 
			
		||||
			buf_len = tmp_len;
 | 
			
		||||
		if ((tmp_len = (size_t)BN_num_bytes(ec_order)) > buf_len)
 | 
			
		||||
			buf_len = tmp_len;
 | 
			
		||||
		if ((tmp_len = (size_t)BN_num_bytes(ec_cofactor)) > buf_len)
 | 
			
		||||
			buf_len = tmp_len;
 | 
			
		||||
 | 
			
		||||
		buffer = (unsigned char *)OPENSSL_malloc(buf_len);
 | 
			
		||||
 | 
			
		||||
		if (buffer == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			perror("OPENSSL_malloc");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		ecparam_print_var(out, ec_p, "ec_p", len, buffer);
 | 
			
		||||
		ecparam_print_var(out, ec_a, "ec_a", len, buffer);
 | 
			
		||||
		ecparam_print_var(out, ec_b, "ec_b", len, buffer);
 | 
			
		||||
		ecparam_print_var(out, ec_gen, "ec_gen", len, buffer);
 | 
			
		||||
		ecparam_print_var(out, ec_order, "ec_order", len, buffer);
 | 
			
		||||
		ecparam_print_var(out, ec_cofactor, "ec_cofactor", len, 
 | 
			
		||||
			buffer);
 | 
			
		||||
 | 
			
		||||
		BIO_printf(out, "\n\n");
 | 
			
		||||
 | 
			
		||||
		BIO_printf(out, "EC_GROUP *get_ec_group_%d(void)\n\t{\n", len);
 | 
			
		||||
		BIO_printf(out, "\tint ok=0;\n");
 | 
			
		||||
		BIO_printf(out, "\tEC_GROUP *group = NULL;\n");
 | 
			
		||||
		BIO_printf(out, "\tEC_POINT *point = NULL;\n");
 | 
			
		||||
		BIO_printf(out, "\tBIGNUM   *tmp_1 = NULL, *tmp_2 = NULL, "
 | 
			
		||||
				"*tmp_3 = NULL;\n\n");
 | 
			
		||||
		BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_p_%d, "
 | 
			
		||||
				"sizeof(ec_p_%d), NULL)) == NULL)\n\t\t"
 | 
			
		||||
				"goto err;\n", len, len);
 | 
			
		||||
		BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_a_%d, "
 | 
			
		||||
				"sizeof(ec_a_%d), NULL)) == NULL)\n\t\t"
 | 
			
		||||
				"goto err;\n", len, len);
 | 
			
		||||
		BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_b_%d, "
 | 
			
		||||
				"sizeof(ec_b_%d), NULL)) == NULL)\n\t\t"
 | 
			
		||||
				"goto err;\n", len, len);
 | 
			
		||||
		if (is_prime)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_"
 | 
			
		||||
				"GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)"
 | 
			
		||||
				"\n\t\tgoto err;\n\n");
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			/* TODO */
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		BIO_printf(out, "\t/* build generator */\n");
 | 
			
		||||
		BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, "
 | 
			
		||||
				"sizeof(ec_gen_%d), tmp_1)) == NULL)"
 | 
			
		||||
				"\n\t\tgoto err;\n", len, len);
 | 
			
		||||
		BIO_printf(out, "\tpoint = EC_POINT_bn2point(group, tmp_1, "
 | 
			
		||||
				"NULL, NULL);\n");
 | 
			
		||||
		BIO_printf(out, "\tif (point == NULL)\n\t\tgoto err;\n");
 | 
			
		||||
		BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_order_%d, "
 | 
			
		||||
				"sizeof(ec_order_%d), tmp_2)) == NULL)"
 | 
			
		||||
				"\n\t\tgoto err;\n", len, len);
 | 
			
		||||
		BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_cofactor_%d, "
 | 
			
		||||
				"sizeof(ec_cofactor_%d), tmp_3)) == NULL)"
 | 
			
		||||
				"\n\t\tgoto err;\n", len, len);
 | 
			
		||||
		BIO_printf(out, "\tif (!EC_GROUP_set_generator(group, point,"
 | 
			
		||||
				" tmp_2, tmp_3))\n\t\tgoto err;\n");
 | 
			
		||||
		BIO_printf(out, "\n\tok=1;\n");
 | 
			
		||||
		BIO_printf(out, "err:\n");
 | 
			
		||||
		BIO_printf(out, "\tif (tmp_1)\n\t\tBN_free(tmp_1);\n");
 | 
			
		||||
		BIO_printf(out, "\tif (tmp_2)\n\t\tBN_free(tmp_2);\n");
 | 
			
		||||
		BIO_printf(out, "\tif (tmp_3)\n\t\tBN_free(tmp_3);\n");
 | 
			
		||||
		BIO_printf(out, "\tif (point)\n\t\tEC_POINT_free(point);\n");
 | 
			
		||||
		BIO_printf(out, "\tif (!ok)\n");
 | 
			
		||||
		BIO_printf(out, "\t\t{\n");
 | 
			
		||||
		BIO_printf(out, "\t\tEC_GROUP_free(group);\n");
 | 
			
		||||
		BIO_printf(out, "\t\tgroup = NULL;\n");
 | 
			
		||||
		BIO_printf(out, "\t\t}\n");
 | 
			
		||||
		BIO_printf(out, "\treturn(group);\n\t}\n");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (!noout)
 | 
			
		||||
		{
 | 
			
		||||
		if (outformat == FORMAT_ASN1)
 | 
			
		||||
			i = i2d_ECPKParameters_bio(out, group);
 | 
			
		||||
		else if (outformat == FORMAT_PEM)
 | 
			
		||||
			i = PEM_write_bio_ECPKParameters(out, group);
 | 
			
		||||
		else	
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"bad output format specified for"
 | 
			
		||||
				" outfile\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if (!i)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "unable to write elliptic "
 | 
			
		||||
				"curve parameters\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	
 | 
			
		||||
	if (need_rand)
 | 
			
		||||
		{
 | 
			
		||||
		app_RAND_load_file(NULL, bio_err, (inrand != NULL));
 | 
			
		||||
		if (inrand != NULL)
 | 
			
		||||
			BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
 | 
			
		||||
				app_RAND_load_files(inrand));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (genkey)
 | 
			
		||||
		{
 | 
			
		||||
		ECDSA *ecdsa = ECDSA_new();
 | 
			
		||||
 | 
			
		||||
		if (ecdsa == NULL)
 | 
			
		||||
			goto end;
 | 
			
		||||
 | 
			
		||||
		assert(need_rand);
 | 
			
		||||
 | 
			
		||||
		ecdsa->group = group;
 | 
			
		||||
		
 | 
			
		||||
		if (!ECDSA_generate_key(ecdsa))
 | 
			
		||||
			{
 | 
			
		||||
			ecdsa->group = NULL;
 | 
			
		||||
			ECDSA_free(ecdsa);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if (outformat == FORMAT_ASN1)
 | 
			
		||||
			i = i2d_ECDSAPrivateKey_bio(out, ecdsa);
 | 
			
		||||
		else if (outformat == FORMAT_PEM)
 | 
			
		||||
			i = PEM_write_bio_ECDSAPrivateKey(out, ecdsa, NULL,
 | 
			
		||||
				NULL, 0, NULL, NULL);
 | 
			
		||||
		else	
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "bad output format specified "
 | 
			
		||||
				"for outfile\n");
 | 
			
		||||
			ecdsa->group = NULL;
 | 
			
		||||
			ECDSA_free(ecdsa);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		ecdsa->group = NULL;
 | 
			
		||||
		ECDSA_free(ecdsa);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (need_rand)
 | 
			
		||||
		app_RAND_write_file(NULL, bio_err);
 | 
			
		||||
 | 
			
		||||
	ret=0;
 | 
			
		||||
end:
 | 
			
		||||
	if (ec_p)
 | 
			
		||||
		BN_free(ec_p);
 | 
			
		||||
	if (ec_a)
 | 
			
		||||
		BN_free(ec_a);
 | 
			
		||||
	if (ec_b)
 | 
			
		||||
		BN_free(ec_b);
 | 
			
		||||
	if (ec_gen)
 | 
			
		||||
		BN_free(ec_gen);
 | 
			
		||||
	if (ec_order)
 | 
			
		||||
		BN_free(ec_order);
 | 
			
		||||
	if (ec_cofactor)
 | 
			
		||||
		BN_free(ec_cofactor);
 | 
			
		||||
	if (buffer)
 | 
			
		||||
		OPENSSL_free(buffer);
 | 
			
		||||
	if (in != NULL)
 | 
			
		||||
		BIO_free(in);
 | 
			
		||||
	if (out != NULL)
 | 
			
		||||
		BIO_free_all(out);
 | 
			
		||||
	if (group != NULL)
 | 
			
		||||
		EC_GROUP_free(group);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
 | 
			
		||||
	int len, unsigned char *buffer)
 | 
			
		||||
	{
 | 
			
		||||
	BIO_printf(out, "static unsigned char %s_%d[] = {", var, len);
 | 
			
		||||
	if (BN_is_zero(in))
 | 
			
		||||
		BIO_printf(out, "\n\t0x00");
 | 
			
		||||
	else 
 | 
			
		||||
		{
 | 
			
		||||
		int i, l;
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(in, buffer);
 | 
			
		||||
		for (i=0; i<l-1; i++)
 | 
			
		||||
			{
 | 
			
		||||
			if ((i%12) == 0) 
 | 
			
		||||
				BIO_printf(out, "\n\t");
 | 
			
		||||
			BIO_printf(out, "0x%02X,", buffer[i]);
 | 
			
		||||
			}
 | 
			
		||||
		if ((i%12) == 0) 
 | 
			
		||||
			BIO_printf(out, "\n\t");
 | 
			
		||||
		BIO_printf(out, "0x%02X", buffer[i]);
 | 
			
		||||
		}
 | 
			
		||||
	BIO_printf(out, "\n\t};\n\n");
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										22
									
								
								apps/enc.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								apps/enc.c
									
									
									
									
									
								
							@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
	static const char magic[]="Salted__";
 | 
			
		||||
	char mbuf[8];	/* should be 1 smaller than magic */
 | 
			
		||||
	char mbuf[sizeof magic-1];
 | 
			
		||||
	char *strbuf=NULL;
 | 
			
		||||
	unsigned char *buff=NULL,*bufsize=NULL;
 | 
			
		||||
	int bsize=BSIZE,verbose=0;
 | 
			
		||||
@@ -131,7 +131,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	/* first check the program name */
 | 
			
		||||
	program_name(argv[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
	program_name(argv[0],pname,sizeof pname);
 | 
			
		||||
	if (strcmp(pname,"base64") == 0)
 | 
			
		||||
		base64=1;
 | 
			
		||||
 | 
			
		||||
@@ -216,7 +216,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				goto bad;
 | 
			
		||||
				}
 | 
			
		||||
			buf[0]='\0';
 | 
			
		||||
			fgets(buf,128,infile);
 | 
			
		||||
			fgets(buf,sizeof buf,infile);
 | 
			
		||||
			fclose(infile);
 | 
			
		||||
			i=strlen(buf);
 | 
			
		||||
			if ((i > 0) &&
 | 
			
		||||
@@ -442,12 +442,12 @@ bad:
 | 
			
		||||
			else {
 | 
			
		||||
				if(enc) {
 | 
			
		||||
					if(hsalt) {
 | 
			
		||||
						if(!set_hex(hsalt,salt,PKCS5_SALT_LEN)) {
 | 
			
		||||
						if(!set_hex(hsalt,salt,sizeof salt)) {
 | 
			
		||||
							BIO_printf(bio_err,
 | 
			
		||||
								"invalid hex salt value\n");
 | 
			
		||||
							goto end;
 | 
			
		||||
						}
 | 
			
		||||
					} else if (RAND_pseudo_bytes(salt, PKCS5_SALT_LEN) < 0)
 | 
			
		||||
					} else if (RAND_pseudo_bytes(salt, sizeof salt) < 0)
 | 
			
		||||
						goto end;
 | 
			
		||||
					/* If -P option then don't bother writing */
 | 
			
		||||
					if((printkey != 2)
 | 
			
		||||
@@ -455,14 +455,14 @@ bad:
 | 
			
		||||
							 sizeof magic-1) != sizeof magic-1
 | 
			
		||||
					       || BIO_write(wbio,
 | 
			
		||||
							    (char *)salt,
 | 
			
		||||
							    PKCS5_SALT_LEN) != PKCS5_SALT_LEN)) {
 | 
			
		||||
							    sizeof salt) != sizeof salt)) {
 | 
			
		||||
						BIO_printf(bio_err,"error writing output file\n");
 | 
			
		||||
						goto end;
 | 
			
		||||
					}
 | 
			
		||||
				} else if(BIO_read(rbio,mbuf,sizeof mbuf) != sizeof mbuf
 | 
			
		||||
					  || BIO_read(rbio,
 | 
			
		||||
						      (unsigned char *)salt,
 | 
			
		||||
				    PKCS5_SALT_LEN) != PKCS5_SALT_LEN) {
 | 
			
		||||
				    sizeof salt) != sizeof salt) {
 | 
			
		||||
					BIO_printf(bio_err,"error reading input file\n");
 | 
			
		||||
					goto end;
 | 
			
		||||
				} else if(memcmp(mbuf,magic,sizeof magic-1)) {
 | 
			
		||||
@@ -481,9 +481,9 @@ bad:
 | 
			
		||||
			 * bug picked up by
 | 
			
		||||
			 * Larry J. Hughes Jr. <hughes@indiana.edu> */
 | 
			
		||||
			if (str == strbuf)
 | 
			
		||||
				memset(str,0,SIZE);
 | 
			
		||||
				OPENSSL_cleanse(str,SIZE);
 | 
			
		||||
			else
 | 
			
		||||
				memset(str,0,strlen(str));
 | 
			
		||||
				OPENSSL_cleanse(str,strlen(str));
 | 
			
		||||
			}
 | 
			
		||||
		if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
 | 
			
		||||
			{
 | 
			
		||||
@@ -524,7 +524,7 @@ bad:
 | 
			
		||||
			if (!nosalt)
 | 
			
		||||
				{
 | 
			
		||||
				printf("salt=");
 | 
			
		||||
				for (i=0; i<PKCS5_SALT_LEN; i++)
 | 
			
		||||
				for (i=0; i<sizeof salt; i++)
 | 
			
		||||
					printf("%02X",salt[i]);
 | 
			
		||||
				printf("\n");
 | 
			
		||||
				}
 | 
			
		||||
@@ -586,7 +586,7 @@ end:
 | 
			
		||||
	if (b64 != NULL) BIO_free(b64);
 | 
			
		||||
	if(pass) OPENSSL_free(pass);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
int set_hex(char *in, unsigned char *out, int size)
 | 
			
		||||
 
 | 
			
		||||
@@ -516,5 +516,5 @@ end:
 | 
			
		||||
	sk_pop_free(post_cmds, identity);
 | 
			
		||||
	if (bio_out != NULL) BIO_free_all(bio_out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -122,5 +122,5 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -198,7 +198,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dh != NULL) DH_free(dh);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
 | 
			
		||||
 
 | 
			
		||||
@@ -246,6 +246,6 @@ end:
 | 
			
		||||
	if (dsa != NULL) DSA_free(dsa);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -258,7 +258,7 @@ err:
 | 
			
		||||
	if (ret != 0)
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
 | 
			
		||||
 
 | 
			
		||||
@@ -15,22 +15,10 @@ $!
 | 
			
		||||
$!  It was written so it would try to determine what "C" compiler to
 | 
			
		||||
$!  use or you can specify which "C" compiler to use.
 | 
			
		||||
$!
 | 
			
		||||
$!  Specify RSAREF as P1 to compile with the RSAREF library instead of
 | 
			
		||||
$!  the regular one.  If you specify NORSAREF it will compile with the
 | 
			
		||||
$!  regular RSAREF routines.  (Note: If you are in the United States
 | 
			
		||||
$!  you MUST compile with RSAREF unless you have a license from RSA).
 | 
			
		||||
$!
 | 
			
		||||
$!  Note: The RSAREF libraries are NOT INCLUDED and you have to
 | 
			
		||||
$!        download it from "ftp://ftp.rsa.com/rsaref".  You have to
 | 
			
		||||
$!        get the ".tar-Z" file as the ".zip" file dosen't have the
 | 
			
		||||
$!        directory structure stored.  You have to extract the file
 | 
			
		||||
$!        into the [.RSAREF] directory under the root directory as that
 | 
			
		||||
$!        is where the scripts will look for the files.
 | 
			
		||||
$!
 | 
			
		||||
$!  Specify DEBUG or NODEBUG as P2 to compile with or without debugger
 | 
			
		||||
$!  Specify DEBUG or NODEBUG as P1 to compile with or without debugger
 | 
			
		||||
$!  information.
 | 
			
		||||
$!
 | 
			
		||||
$!  Specify which compiler at P3 to try to compile under.
 | 
			
		||||
$!  Specify which compiler at P2 to try to compile under.
 | 
			
		||||
$!
 | 
			
		||||
$!	   VAXC	 For VAX C.
 | 
			
		||||
$!	   DECC	 For DEC C.
 | 
			
		||||
@@ -39,16 +27,16 @@ $!
 | 
			
		||||
$!  If you don't speficy a compiler, it will try to determine which
 | 
			
		||||
$!  "C" compiler to use.
 | 
			
		||||
$!
 | 
			
		||||
$!  P4, if defined, sets a TCP/IP library to use, through one of the following
 | 
			
		||||
$!  P3, if defined, sets a TCP/IP library to use, through one of the following
 | 
			
		||||
$!  keywords:
 | 
			
		||||
$!
 | 
			
		||||
$!	UCX		for UCX
 | 
			
		||||
$!	SOCKETSHR	for SOCKETSHR+NETLIB
 | 
			
		||||
$!	TCPIP		for TCPIP (post UCX)
 | 
			
		||||
$!
 | 
			
		||||
$!  P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
 | 
			
		||||
$!  P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
 | 
			
		||||
$!
 | 
			
		||||
$!  P6, if defined, sets a choice of programs to compile.
 | 
			
		||||
$!  P5, if defined, sets a choice of programs to compile.
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! Define A TCP/IP Library That We Will Need To Link To.
 | 
			
		||||
@@ -101,10 +89,6 @@ $! Define The CRYPTO Library.
 | 
			
		||||
$!
 | 
			
		||||
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
 | 
			
		||||
$!
 | 
			
		||||
$! Define The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE.OLB
 | 
			
		||||
$!
 | 
			
		||||
$! Define The SSL Library.
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
 | 
			
		||||
@@ -182,7 +166,7 @@ $!     TCPIP_PROGRAMS = ",S_SERVER,S_CLIENT,SESS_ID,CIPHERS,S_TIME,"
 | 
			
		||||
$!
 | 
			
		||||
$! Setup exceptional compilations
 | 
			
		||||
$!
 | 
			
		||||
$ COMPILEWITH_CC2 = ",S_SOCKET,S_SERVER,S_CLIENT,"
 | 
			
		||||
$ COMPILEWITH_CC2 = ",S_SERVER,S_CLIENT,"
 | 
			
		||||
$!
 | 
			
		||||
$ PHASE := LIB
 | 
			
		||||
$!
 | 
			
		||||
@@ -293,73 +277,31 @@ $   WRITE SYS$OUTPUT FILE_NAME," needs a TCP/IP library.  Can't link.  Skipping.
 | 
			
		||||
$   GOTO NEXT_FILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
 | 
			
		||||
$! Link The Program.
 | 
			
		||||
$! Check To See If We Are To Link With A Specific TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (RSAREF.EQS."TRUE")
 | 
			
		||||
$ IF (TCPIP_LIB.NES."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Link With A Specific TCP/IP Library.
 | 
			
		||||
$! Don't Link With The RSAREF Routines And TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (TCPIP_LIB.NES."")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Link With The RSAREF Library And A Specific TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$     LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	  'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
          'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
 | 
			
		||||
          'TCPIP_LIB','OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!    Link With The RSAREF Library And NO TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$     LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	  'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
          'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
 | 
			
		||||
          'OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  End The TCP/IP Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$   LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
        'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
        'TCPIP_LIB','OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$! Else...
 | 
			
		||||
$!
 | 
			
		||||
$ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!  Don't Link With The RSAREF Routines.
 | 
			
		||||
$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$   LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
        'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
        'OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Link With A Specific TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (TCPIP_LIB.NES."")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Don't Link With The RSAREF Routines And TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$       LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	    'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
            'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
            'TCPIP_LIB','OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!    Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$       LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	    'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
            'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
            'OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  End The TCP/IP Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The RSAREF Link Check.
 | 
			
		||||
$! End The TCP/IP Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
@@ -526,32 +468,6 @@ $! End The Crypto Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! See If We Need The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (RSAREF.EQS."TRUE")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Look For The Library LIBRSAGLUE.OLB.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (F$SEARCH(RSAREF_LIB).EQS."")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell The User We Can't Find The LIBRSAGLUE.OLB Library.
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"."
 | 
			
		||||
$     WRITE SYS$OUTPUT "We Can't Link Without It."
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!    Since We Can't Link Without It, Exit.
 | 
			
		||||
$!
 | 
			
		||||
$     EXIT
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The RSAREF Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Look For The Library LIBSSL.OLB.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (F$SEARCH(SSL_LIB).EQS."")
 | 
			
		||||
@@ -582,87 +498,10 @@ $ CHECK_OPTIONS:
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If P1 Is Blank.
 | 
			
		||||
$!
 | 
			
		||||
$ P1 = "NORSAREF"
 | 
			
		||||
$ IF (P1.EQS."NORSAREF")
 | 
			
		||||
$ IF (P1.EQS."NODEBUG")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!   P1 Is NORSAREF, So Compile With The Regular RSA Libraries.
 | 
			
		||||
$!
 | 
			
		||||
$    RSAREF = "FALSE"
 | 
			
		||||
$!
 | 
			
		||||
$! Else...
 | 
			
		||||
$!
 | 
			
		||||
$ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Use The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P1.EQS."RSAREF")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Check To Make Sure We Have The RSAREF Source Code Directory.
 | 
			
		||||
$!
 | 
			
		||||
$     IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."")
 | 
			
		||||
$     THEN
 | 
			
		||||
$!
 | 
			
		||||
$!      We Don't Have The RSAREF Souce Code Directory, So Tell The
 | 
			
		||||
$!      User This.
 | 
			
		||||
$!
 | 
			
		||||
$       WRITE SYS$OUTPUT ""
 | 
			
		||||
$       WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code."
 | 
			
		||||
$       WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'.  You have to"
 | 
			
		||||
$       WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the"
 | 
			
		||||
$       WRITE SYS$OUTPUT "directory structure stored.  You have to extract the file"
 | 
			
		||||
$       WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory"
 | 
			
		||||
$       WRITE SYS$OUTPUT "as that is where the scripts will look for the files."
 | 
			
		||||
$       WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!      Time To Exit.
 | 
			
		||||
$!
 | 
			
		||||
$       EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!    Else...
 | 
			
		||||
$!
 | 
			
		||||
$     ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!      Compile Using The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$       RSAREF = "TRUE"
 | 
			
		||||
$!
 | 
			
		||||
$!    End The RSAREF Soure Directory Check.
 | 
			
		||||
$!
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE 
 | 
			
		||||
$!
 | 
			
		||||
$!    They Entered An Invalid Option..
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "The Option ",P1," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "     RSAREF   :  Compile With The RSAREF Library."
 | 
			
		||||
$     WRITE SYS$OUTPUT "     NORSAREF :  Compile With The Regular RSA Library."
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!    Time To EXIT.
 | 
			
		||||
$!
 | 
			
		||||
$     EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!  End The Valid Arguement Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End P1 Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If P2 Is Blank.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P2.EQS."NODEBUG")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!   P2 Is NODEBUG, So Compile Without Debugger Information.
 | 
			
		||||
$!   P1 Is NODEBUG, So Compile Without Debugger Information.
 | 
			
		||||
$!
 | 
			
		||||
$    DEBUGGER  = "NODEBUG"
 | 
			
		||||
$    TRACEBACK = "NOTRACEBACK" 
 | 
			
		||||
@@ -677,7 +516,7 @@ $ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Compile With Debugger Information.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P2.EQS."DEBUG")
 | 
			
		||||
$   IF (P1.EQS."DEBUG")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Compile With Debugger Information.
 | 
			
		||||
@@ -693,7 +532,7 @@ $!
 | 
			
		||||
$!    Tell The User Entered An Invalid Option..
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "The Option ",P2," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$     WRITE SYS$OUTPUT "The Option ",P1," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "    DEBUG    :  Compile With The Debugger Information."
 | 
			
		||||
$     WRITE SYS$OUTPUT "    NODEBUG  :  Compile Without The Debugger Information."
 | 
			
		||||
@@ -707,13 +546,13 @@ $!  End The Valid Arguement Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The P2 Check.
 | 
			
		||||
$! End The P1 Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If P3 Is Blank.
 | 
			
		||||
$! Check To See If P2 Is Blank.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P3.EQS."")
 | 
			
		||||
$ IF (P2.EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  O.K., The User Didn't Specify A Compiler, Let's Try To
 | 
			
		||||
@@ -726,7 +565,7 @@ $   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like GNUC, Set To Use GNUC.
 | 
			
		||||
$!
 | 
			
		||||
$     P3 = "GNUC"
 | 
			
		||||
$     P2 = "GNUC"
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
@@ -739,7 +578,7 @@ $     THEN
 | 
			
		||||
$!
 | 
			
		||||
$!      Looks Like DECC, Set To Use DECC.
 | 
			
		||||
$!
 | 
			
		||||
$       P3 = "DECC"
 | 
			
		||||
$       P2 = "DECC"
 | 
			
		||||
$!
 | 
			
		||||
$!    Else...
 | 
			
		||||
$!
 | 
			
		||||
@@ -747,7 +586,7 @@ $     ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!      Looks Like VAXC, Set To Use VAXC.
 | 
			
		||||
$!
 | 
			
		||||
$       P3 = "VAXC"
 | 
			
		||||
$       P2 = "VAXC"
 | 
			
		||||
$!
 | 
			
		||||
$!    End The VAXC Compiler Check.
 | 
			
		||||
$!
 | 
			
		||||
@@ -761,9 +600,9 @@ $!  End The Compiler Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If We Have A Option For P4.
 | 
			
		||||
$! Check To See If We Have A Option For P3.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P4.EQS."")
 | 
			
		||||
$ IF (P3.EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Find out what socket library we have available
 | 
			
		||||
@@ -773,7 +612,7 @@ $   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    We have SOCKETSHR, and it is my opinion that it's the best to use.
 | 
			
		||||
$!
 | 
			
		||||
$     P4 = "SOCKETSHR"
 | 
			
		||||
$     P3 = "SOCKETSHR"
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell the user
 | 
			
		||||
$!
 | 
			
		||||
@@ -793,7 +632,7 @@ $     THEN
 | 
			
		||||
$!
 | 
			
		||||
$!	Last resort: a UCX or UCX-compatible library
 | 
			
		||||
$!
 | 
			
		||||
$	P4 = "UCX"
 | 
			
		||||
$	P3 = "UCX"
 | 
			
		||||
$!
 | 
			
		||||
$!      Tell the user
 | 
			
		||||
$!
 | 
			
		||||
@@ -817,12 +656,12 @@ $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If The User Entered A Valid Paramter.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
 | 
			
		||||
$ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If The User Wanted DECC.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P3.EQS."DECC")
 | 
			
		||||
$   IF (P2.EQS."DECC")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like DECC, Set To Use DECC.
 | 
			
		||||
@@ -852,7 +691,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Use VAXC.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P3.EQS."VAXC")
 | 
			
		||||
$   IF (P2.EQS."VAXC")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like VAXC, Set To Use VAXC.
 | 
			
		||||
@@ -889,7 +728,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Use GNU C.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P3.EQS."GNUC")
 | 
			
		||||
$   IF (P2.EQS."GNUC")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like GNUC, Set To Use GNUC.
 | 
			
		||||
@@ -918,31 +757,6 @@ $!  Set up default defines
 | 
			
		||||
$!
 | 
			
		||||
$   CCDEFS = """FLAT_INC=1""," + CCDEFS
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Compile With RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (RSAREF.EQS."TRUE")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Compile With RSAREF.
 | 
			
		||||
$!
 | 
			
		||||
$     CCDEFS = CCDEFS + ",""RSAref=1"""
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell The User This.
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT "Compiling With RSAREF Routines."
 | 
			
		||||
$!
 | 
			
		||||
$!    Else, We Don't Care.  Compile Without The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell The User We Are Compile Without The RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$!  End The RSAREF Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Else The User Entered An Invalid Arguement.
 | 
			
		||||
$!
 | 
			
		||||
$ ELSE
 | 
			
		||||
@@ -950,7 +764,7 @@ $!
 | 
			
		||||
$!  Tell The User We Don't Know What They Want.
 | 
			
		||||
$!
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P3," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P2," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "    VAXC  :  To Compile With VAX C."
 | 
			
		||||
$   WRITE SYS$OUTPUT "    DECC  :  To Compile With DEC C."
 | 
			
		||||
@@ -964,13 +778,13 @@ $ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Time to check the contents, and to make sure we get the correct library.
 | 
			
		||||
$!
 | 
			
		||||
$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" -
 | 
			
		||||
     .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE"
 | 
			
		||||
$ IF P3.EQS."SOCKETSHR" .OR. P3.EQS."MULTINET" .OR. P3.EQS."UCX" -
 | 
			
		||||
     .OR. P3.EQS."TCPIP" .OR. P3.EQS."NONE"
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if SOCKETSHR was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."SOCKETSHR"
 | 
			
		||||
$   IF P3.EQS."SOCKETSHR"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use SOCKETSHR
 | 
			
		||||
@@ -983,12 +797,12 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if MULTINET was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."MULTINET"
 | 
			
		||||
$   IF P3.EQS."MULTINET"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use UCX emulation.
 | 
			
		||||
$!
 | 
			
		||||
$     P4 = "UCX"
 | 
			
		||||
$     P3 = "UCX"
 | 
			
		||||
$!
 | 
			
		||||
$!    Done with MULTINET
 | 
			
		||||
$!
 | 
			
		||||
@@ -996,7 +810,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if UCX was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."UCX"
 | 
			
		||||
$   IF P3.EQS."UCX"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use UCX.
 | 
			
		||||
@@ -1016,7 +830,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if TCPIP (post UCX) was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."TCPIP"
 | 
			
		||||
$   IF P3.EQS."TCPIP"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use TCPIP.
 | 
			
		||||
@@ -1029,7 +843,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if NONE was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."NONE"
 | 
			
		||||
$   IF P3.EQS."NONE"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Do not use TCPIP.
 | 
			
		||||
@@ -1042,7 +856,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Add TCP/IP type to CC definitions.
 | 
			
		||||
$!
 | 
			
		||||
$   CCDEFS = CCDEFS + ",TCPIP_TYPE_''P4'"
 | 
			
		||||
$   CCDEFS = CCDEFS + ",TCPIP_TYPE_''P3'"
 | 
			
		||||
$!
 | 
			
		||||
$!  Print info
 | 
			
		||||
$!
 | 
			
		||||
@@ -1055,7 +869,7 @@ $!
 | 
			
		||||
$!  Tell The User We Don't Know What They Want.
 | 
			
		||||
$!
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P4," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P3," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "    SOCKETSHR  :  To link with SOCKETSHR TCP/IP library."
 | 
			
		||||
$   WRITE SYS$OUTPUT "    UCX        :  To link with UCX TCP/IP library."
 | 
			
		||||
@@ -1086,7 +900,7 @@ $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
 | 
			
		||||
$!
 | 
			
		||||
$! Show user the result
 | 
			
		||||
$!
 | 
			
		||||
$ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
 | 
			
		||||
$ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC
 | 
			
		||||
$!
 | 
			
		||||
$! Special Threads For OpenVMS v7.1 Or Later
 | 
			
		||||
$!
 | 
			
		||||
@@ -1094,9 +908,9 @@ $! Written By:  Richard Levitte
 | 
			
		||||
$!              richard@levitte.org
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If We Have A Option For P5.
 | 
			
		||||
$! Check To See If We Have A Option For P4.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P5.EQS."")
 | 
			
		||||
$ IF (P4.EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Get The Version Of VMS We Are Using.
 | 
			
		||||
@@ -1118,15 +932,15 @@ $!  End The VMS Version Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The P5 Check.
 | 
			
		||||
$! End The P4 Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check if the user wanted to compile just a subset of all the programs.
 | 
			
		||||
$!
 | 
			
		||||
$ IF P6 .NES. ""
 | 
			
		||||
$ IF P5 .NES. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$   PROGRAMS = P6
 | 
			
		||||
$   PROGRAMS = P5
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Time To RETURN...
 | 
			
		||||
 
 | 
			
		||||
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		BIO_printf (bio_err, "-in file  input file\n");
 | 
			
		||||
		BIO_printf (bio_err, "-out file output file\n");
 | 
			
		||||
		BIO_printf (bio_err, "-toseq    output NS Sequence file\n");
 | 
			
		||||
		EXIT(1);
 | 
			
		||||
		OPENSSL_EXIT(1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (infile) {
 | 
			
		||||
@@ -162,6 +162,6 @@ end:
 | 
			
		||||
	BIO_free_all(out);
 | 
			
		||||
	NETSCAPE_CERT_SEQUENCE_free(seq);
 | 
			
		||||
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								apps/ocsp.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								apps/ocsp.c
									
									
									
									
									
								
							@@ -613,11 +613,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			NULL, e, "CA certificate");
 | 
			
		||||
		if (rcertfile)
 | 
			
		||||
			{
 | 
			
		||||
			rother = load_certs(bio_err, sign_certfile, FORMAT_PEM,
 | 
			
		||||
			rother = load_certs(bio_err, rcertfile, FORMAT_PEM,
 | 
			
		||||
				NULL, e, "responder other certificates");
 | 
			
		||||
			if (!sign_other) goto end;
 | 
			
		||||
			if (!rother) goto end;
 | 
			
		||||
			}
 | 
			
		||||
		rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, NULL, NULL,
 | 
			
		||||
		rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, 0, NULL, NULL,
 | 
			
		||||
			"responder private key");
 | 
			
		||||
		if (!rkey)
 | 
			
		||||
			goto end;
 | 
			
		||||
@@ -663,7 +663,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				NULL, e, "signer certificates");
 | 
			
		||||
			if (!sign_other) goto end;
 | 
			
		||||
			}
 | 
			
		||||
		key = load_key(bio_err, keyfile, FORMAT_PEM, NULL, NULL,
 | 
			
		||||
		key = load_key(bio_err, keyfile, FORMAT_PEM, 0, NULL, NULL,
 | 
			
		||||
			"signer private key");
 | 
			
		||||
		if (!key)
 | 
			
		||||
			goto end;
 | 
			
		||||
@@ -899,7 +899,7 @@ end:
 | 
			
		||||
		SSL_CTX_free(ctx);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
 | 
			
		||||
@@ -1120,7 +1120,10 @@ static char **lookup_serial(TXT_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);
 | 
			
		||||
	itmp = BN_bn2hex(bn);
 | 
			
		||||
	if (BN_is_zero(bn))
 | 
			
		||||
		itmp = BUF_strdup("00");
 | 
			
		||||
	else
 | 
			
		||||
		itmp = BN_bn2hex(bn);
 | 
			
		||||
	row[DB_serial] = itmp;
 | 
			
		||||
	BN_free(bn);
 | 
			
		||||
	rrow=TXT_DB_get_by_index(db,DB_serial,row);
 | 
			
		||||
@@ -1176,7 +1179,7 @@ static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port
 | 
			
		||||
 | 
			
		||||
	for(;;)
 | 
			
		||||
		{
 | 
			
		||||
		len = BIO_gets(cbio, inbuf, 1024);
 | 
			
		||||
		len = BIO_gets(cbio, inbuf, sizeof inbuf);
 | 
			
		||||
		if (len <= 0)
 | 
			
		||||
			return 1;
 | 
			
		||||
		/* Look for "POST" signalling start of query */
 | 
			
		||||
 
 | 
			
		||||
@@ -139,11 +139,11 @@ static unsigned long MS_CALLBACK hash(const void *a_void);
 | 
			
		||||
static int MS_CALLBACK cmp(const void *a_void,const void *b_void);
 | 
			
		||||
static LHASH *prog_init(void );
 | 
			
		||||
static int do_cmd(LHASH *prog,int argc,char *argv[]);
 | 
			
		||||
CONF *config=NULL;
 | 
			
		||||
char *default_config_file=NULL;
 | 
			
		||||
 | 
			
		||||
/* Make sure there is only one when MONOLITH is defined */
 | 
			
		||||
#ifdef MONOLITH
 | 
			
		||||
CONF *config=NULL;
 | 
			
		||||
BIO *bio_err=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -218,7 +218,8 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
#define PROG_NAME_SIZE	39
 | 
			
		||||
	char pname[PROG_NAME_SIZE+1];
 | 
			
		||||
	FUNCTION f,*fp;
 | 
			
		||||
	MS_STATIC char *prompt,buf[1024],config_name[256];
 | 
			
		||||
	MS_STATIC char *prompt,buf[1024];
 | 
			
		||||
	char *to_free=NULL;
 | 
			
		||||
	int n,i,ret=0;
 | 
			
		||||
	int argc;
 | 
			
		||||
	char **argv,*p;
 | 
			
		||||
@@ -228,6 +229,10 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
	arg.data=NULL;
 | 
			
		||||
	arg.count=0;
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */
 | 
			
		||||
		{
 | 
			
		||||
		if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))
 | 
			
		||||
@@ -252,23 +257,12 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	/* Lets load up our environment a little */
 | 
			
		||||
	p=getenv("OPENSSL_CONF");
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		p=getenv("SSLEAY_CONF");
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		strcpy(config_name,X509_get_default_cert_area());
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
		strcat(config_name,"/");
 | 
			
		||||
#endif
 | 
			
		||||
		strcat(config_name,OPENSSL_CONF);
 | 
			
		||||
		p=config_name;
 | 
			
		||||
		}
 | 
			
		||||
		p=to_free=make_config_name();
 | 
			
		||||
 | 
			
		||||
	default_config_file=p;
 | 
			
		||||
 | 
			
		||||
@@ -284,7 +278,7 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
	prog=prog_init();
 | 
			
		||||
 | 
			
		||||
	/* first check the program name */
 | 
			
		||||
	program_name(Argv[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
	program_name(Argv[0],pname,sizeof pname);
 | 
			
		||||
 | 
			
		||||
	f.name=pname;
 | 
			
		||||
	fp=(FUNCTION *)lh_retrieve(prog,&f);
 | 
			
		||||
@@ -312,7 +306,7 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
		{
 | 
			
		||||
		ret=0;
 | 
			
		||||
		p=buf;
 | 
			
		||||
		n=1024;
 | 
			
		||||
		n=sizeof buf;
 | 
			
		||||
		i=0;
 | 
			
		||||
		for (;;)
 | 
			
		||||
			{
 | 
			
		||||
@@ -346,6 +340,8 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
	BIO_printf(bio_err,"bad exit\n");
 | 
			
		||||
	ret=1;
 | 
			
		||||
end:
 | 
			
		||||
	if (to_free)
 | 
			
		||||
		OPENSSL_free(to_free);
 | 
			
		||||
	if (config != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		NCONF_free(config);
 | 
			
		||||
@@ -362,7 +358,7 @@ end:
 | 
			
		||||
		BIO_free(bio_err);
 | 
			
		||||
		bio_err=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#define LIST_STANDARD_COMMANDS "list-standard-commands"
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,6 @@
 | 
			
		||||
# include <openssl/des.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_MD5CRYPT_1
 | 
			
		||||
# include <openssl/evp.h>
 | 
			
		||||
# include <openssl/md5.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -293,7 +292,7 @@ err:
 | 
			
		||||
	if (out)
 | 
			
		||||
		BIO_free_all(out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -506,6 +505,6 @@ err:
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
	fputs("Program not available.\n", stderr)
 | 
			
		||||
	EXIT(1);
 | 
			
		||||
	OPENSSL_EXIT(1);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -399,7 +399,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
    CRYPTO_push_info("read MAC password");
 | 
			
		||||
#endif
 | 
			
		||||
	if(EVP_read_pw_string (macpass, 50, "Enter MAC Password:", export_cert))
 | 
			
		||||
	if(EVP_read_pw_string (macpass, sizeof macpass, "Enter MAC Password:", export_cert))
 | 
			
		||||
	{
 | 
			
		||||
    	    BIO_printf (bio_err, "Can't read Password\n");
 | 
			
		||||
    	    goto end;
 | 
			
		||||
@@ -427,7 +427,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	CRYPTO_push_info("process -export_cert");
 | 
			
		||||
	CRYPTO_push_info("reading private key");
 | 
			
		||||
#endif
 | 
			
		||||
	key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM,
 | 
			
		||||
	key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1,
 | 
			
		||||
		passin, e, "private key");
 | 
			
		||||
	if (!key) {
 | 
			
		||||
		goto export_end;
 | 
			
		||||
@@ -508,9 +508,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		    /* Exclude verified certificate */
 | 
			
		||||
		    for (i = 1; i < sk_X509_num (chain2) ; i++) 
 | 
			
		||||
			sk_X509_push(certs, sk_X509_value (chain2, i));
 | 
			
		||||
		}
 | 
			
		||||
		sk_X509_free(chain2);
 | 
			
		||||
		if (vret) {
 | 
			
		||||
		    /* Free first certificate */
 | 
			
		||||
		    X509_free(sk_X509_value(chain2, 0));
 | 
			
		||||
		    sk_X509_free(chain2);
 | 
			
		||||
		} else {
 | 
			
		||||
			BIO_printf (bio_err, "Error %s getting chain.\n",
 | 
			
		||||
					X509_verify_cert_error_string(vret));
 | 
			
		||||
			goto export_end;
 | 
			
		||||
@@ -537,8 +538,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	}
 | 
			
		||||
	sk_X509_pop_free(certs, X509_free);
 | 
			
		||||
	certs = NULL;
 | 
			
		||||
	/* ucert is part of certs so it is already freed */
 | 
			
		||||
	ucert = NULL;
 | 
			
		||||
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
	CRYPTO_pop_info();
 | 
			
		||||
@@ -546,7 +545,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if(!noprompt &&
 | 
			
		||||
		EVP_read_pw_string(pass, 50, "Enter Export Password:", 1)) {
 | 
			
		||||
		EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) {
 | 
			
		||||
	    BIO_printf (bio_err, "Can't read Password\n");
 | 
			
		||||
	    goto export_end;
 | 
			
		||||
        }
 | 
			
		||||
@@ -627,7 +626,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (certs) sk_X509_pop_free(certs, X509_free);
 | 
			
		||||
	if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
 | 
			
		||||
	if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
 | 
			
		||||
	if (ucert) X509_free(ucert);
 | 
			
		||||
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
	CRYPTO_pop_info();
 | 
			
		||||
@@ -644,7 +642,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
    CRYPTO_push_info("read import password");
 | 
			
		||||
#endif
 | 
			
		||||
    if(!noprompt && EVP_read_pw_string(pass, 50, "Enter Import Password:", 0)) {
 | 
			
		||||
    if(!noprompt && EVP_read_pw_string(pass, sizeof pass, "Enter Import Password:", 0)) {
 | 
			
		||||
	BIO_printf (bio_err, "Can't read Password\n");
 | 
			
		||||
	goto end;
 | 
			
		||||
    }
 | 
			
		||||
@@ -698,7 +696,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
    if(passin) OPENSSL_free(passin);
 | 
			
		||||
    if(passout) OPENSSL_free(passout);
 | 
			
		||||
    apps_shutdown();
 | 
			
		||||
    EXIT(ret);
 | 
			
		||||
    OPENSSL_EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
 | 
			
		||||
 
 | 
			
		||||
@@ -301,5 +301,5 @@ end:
 | 
			
		||||
	if (in != NULL) BIO_free(in);
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,6 @@
 | 
			
		||||
#include <openssl/evp.h>
 | 
			
		||||
#include <openssl/pkcs12.h>
 | 
			
		||||
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#define PROG pkcs8_main
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
@@ -222,7 +221,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (topk8)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_free(in); /* Not needed in this section */
 | 
			
		||||
		pkey = load_key(bio_err, infile, informat, passin, e, "key");
 | 
			
		||||
		pkey = load_key(bio_err, infile, informat, 1,
 | 
			
		||||
			passin, e, "key");
 | 
			
		||||
		if (!pkey) {
 | 
			
		||||
			return (1);
 | 
			
		||||
		}
 | 
			
		||||
@@ -244,7 +244,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if(passout) p8pass = passout;
 | 
			
		||||
			else {
 | 
			
		||||
				p8pass = pass;
 | 
			
		||||
				EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1);
 | 
			
		||||
				if (EVP_read_pw_string(pass, sizeof pass, "Enter Encryption Password:", 1))
 | 
			
		||||
					return (1);
 | 
			
		||||
			}
 | 
			
		||||
			app_RAND_load_file(NULL, bio_err, 0);
 | 
			
		||||
			if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
 | 
			
		||||
@@ -301,7 +302,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		if(passin) p8pass = passin;
 | 
			
		||||
		else {
 | 
			
		||||
			p8pass = pass;
 | 
			
		||||
			EVP_read_pw_string(pass, 50, "Enter Password:", 0);
 | 
			
		||||
			EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0);
 | 
			
		||||
		}
 | 
			
		||||
		p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass));
 | 
			
		||||
		X509_SIG_free(p8);
 | 
			
		||||
 
 | 
			
		||||
@@ -17,8 +17,6 @@ extern int rsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int rsautl_main(int argc,char *argv[]);
 | 
			
		||||
extern int dsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int dsaparam_main(int argc,char *argv[]);
 | 
			
		||||
extern int ecdsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int ecparam_main(int argc,char *argv[]);
 | 
			
		||||
extern int x509_main(int argc,char *argv[]);
 | 
			
		||||
extern int genrsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int gendsa_main(int argc,char *argv[]);
 | 
			
		||||
@@ -80,12 +78,6 @@ FUNCTION functions[] = {
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"ecdsa",ecdsa_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"ecparam",ecparam_main},
 | 
			
		||||
#endif
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"x509",x509_main},
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
 
 | 
			
		||||
@@ -33,8 +33,6 @@ foreach (@ARGV)
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n";  }
 | 
			
		||||
	elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
 | 
			
		||||
	elsif ( ($_ =~ /^ecdsa$/) || ($_ =~ /^ecdsaparam$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_ECDSA\n${str}#endif\n";}
 | 
			
		||||
	elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
 | 
			
		||||
	elsif ( ($_ =~ /^pkcs12$/))
 | 
			
		||||
 
 | 
			
		||||
@@ -213,5 +213,5 @@ err:
 | 
			
		||||
	if (out)
 | 
			
		||||
		BIO_free_all(out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										142
									
								
								apps/req.c
									
									
									
									
									
								
							
							
						
						
									
										142
									
								
								apps/req.c
									
									
									
									
									
								
							@@ -73,6 +73,7 @@
 | 
			
		||||
#include <openssl/x509v3.h>
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include "../crypto/cryptlib.h"
 | 
			
		||||
 | 
			
		||||
#define SECTION		"req"
 | 
			
		||||
 | 
			
		||||
@@ -134,7 +135,6 @@ static int req_check_len(int len,int n_min,int n_max);
 | 
			
		||||
static int check_end(char *str, char *end);
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
static char *default_config_file=NULL;
 | 
			
		||||
static CONF *config=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
static CONF *req_conf=NULL;
 | 
			
		||||
static int batch=0;
 | 
			
		||||
@@ -142,7 +142,6 @@ static int batch=0;
 | 
			
		||||
#define TYPE_RSA	1
 | 
			
		||||
#define TYPE_DSA	2
 | 
			
		||||
#define TYPE_DH		3
 | 
			
		||||
#define TYPE_ECDSA	4
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
@@ -152,10 +151,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	DSA *dsa_params=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	ECDSA *ecdsa_params = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	unsigned long nmflag = 0;
 | 
			
		||||
	unsigned long nmflag = 0, reqflag = 0;
 | 
			
		||||
	int ex=1,x509=0,days=30;
 | 
			
		||||
	X509 *x509ss=NULL;
 | 
			
		||||
	X509_REQ *req=NULL;
 | 
			
		||||
@@ -180,7 +176,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	const EVP_MD *md_alg=NULL,*digest=EVP_md5();
 | 
			
		||||
	unsigned long chtype = MBSTRING_ASC;
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
	MS_STATIC char config_name[256];
 | 
			
		||||
	char *to_free;
 | 
			
		||||
	long errline;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -322,67 +318,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				BIO_free(in);
 | 
			
		||||
				in=NULL;
 | 
			
		||||
				newkey=BN_num_bits(dsa_params->p);
 | 
			
		||||
				in=NULL;
 | 
			
		||||
				}
 | 
			
		||||
			else 
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
				if (strncmp("ecdsa:",p,4) == 0)
 | 
			
		||||
				{
 | 
			
		||||
				X509 *xtmp=NULL;
 | 
			
		||||
				EVP_PKEY *dtmp;
 | 
			
		||||
 | 
			
		||||
				pkey_type=TYPE_ECDSA;
 | 
			
		||||
				p+=6;
 | 
			
		||||
				if ((in=BIO_new_file(p,"r")) == NULL)
 | 
			
		||||
					{
 | 
			
		||||
					perror(p);
 | 
			
		||||
					goto end;
 | 
			
		||||
					}
 | 
			
		||||
				if ((ecdsa_params = ECDSA_new()) == NULL)
 | 
			
		||||
					goto end;
 | 
			
		||||
				if ((ecdsa_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL)
 | 
			
		||||
					{
 | 
			
		||||
					if (ecdsa_params)
 | 
			
		||||
						ECDSA_free(ecdsa_params);
 | 
			
		||||
					ERR_clear_error();
 | 
			
		||||
					(void)BIO_reset(in);
 | 
			
		||||
					if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
 | 
			
		||||
						{	
 | 
			
		||||
						BIO_printf(bio_err,"unable to load ECDSA parameters from file\n");
 | 
			
		||||
						goto end;
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
					if ((dtmp=X509_get_pubkey(xtmp)) == NULL) goto end;
 | 
			
		||||
					if (dtmp->type == EVP_PKEY_ECDSA)
 | 
			
		||||
						ecdsa_params = ECDSAParameters_dup(dtmp->pkey.ecdsa);
 | 
			
		||||
					EVP_PKEY_free(dtmp);
 | 
			
		||||
					X509_free(xtmp);
 | 
			
		||||
					if (ecdsa_params == NULL)
 | 
			
		||||
						{
 | 
			
		||||
						BIO_printf(bio_err,"Certificate does not contain ECDSA parameters\n");
 | 
			
		||||
						goto end;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				BIO_free(in);
 | 
			
		||||
				in=NULL;
 | 
			
		||||
				
 | 
			
		||||
				{
 | 
			
		||||
				BIGNUM *order = BN_new();
 | 
			
		||||
				
 | 
			
		||||
				if (!order)
 | 
			
		||||
					goto end;
 | 
			
		||||
				if (!EC_GROUP_get_order(ecdsa_params->group, order, NULL))
 | 
			
		||||
					goto end;
 | 
			
		||||
				newkey = BN_num_bits(order);
 | 
			
		||||
				BN_free(order);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DH
 | 
			
		||||
				if (strncmp("dh:",p,4) == 0)
 | 
			
		||||
				{
 | 
			
		||||
@@ -416,6 +356,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			if (!set_name_ex(&nmflag, *(++argv))) goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-reqopt") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			if (!set_cert_ex(&reqflag, *(++argv))) goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-subject") == 0)
 | 
			
		||||
			subject=1;
 | 
			
		||||
		else if (strcmp(*argv,"-text") == 0)
 | 
			
		||||
@@ -494,7 +439,6 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err,"                the random number generator\n");
 | 
			
		||||
		BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n");
 | 
			
		||||
		BIO_printf(bio_err," -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n");
 | 
			
		||||
		BIO_printf(bio_err," -newkey ecdsa:file generate a new ECDSA key, parameters taken from CA in 'file'\n");
 | 
			
		||||
		BIO_printf(bio_err," -[digest]      Digest to sign with (md5, sha1, md2, mdc2, md4)\n");
 | 
			
		||||
		BIO_printf(bio_err," -config file   request template file.\n");
 | 
			
		||||
		BIO_printf(bio_err," -subj arg      set or modify request subject\n");
 | 
			
		||||
@@ -509,7 +453,8 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n");
 | 
			
		||||
		BIO_printf(bio_err," -reqexts ..    specify request extension section (override value in config file)\n");
 | 
			
		||||
		BIO_printf(bio_err," -utf8          input characters are UTF8 (default ASCII)\n");
 | 
			
		||||
		BIO_printf(bio_err," -nameopt arg    - various certificate name options\n");
 | 
			
		||||
		BIO_printf(bio_err," -nameopt arg   - various certificate name options\n");
 | 
			
		||||
		BIO_printf(bio_err," -reqopt arg    - various request text options\n\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -525,14 +470,7 @@ bad:
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		p=getenv("SSLEAY_CONF");
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		strcpy(config_name,X509_get_default_cert_area());
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
		strcat(config_name,"/");
 | 
			
		||||
#endif
 | 
			
		||||
		strcat(config_name,OPENSSL_CONF);
 | 
			
		||||
		p=config_name;
 | 
			
		||||
		}
 | 
			
		||||
		p=to_free=make_config_name();
 | 
			
		||||
	default_config_file=p;
 | 
			
		||||
	config=NCONF_new(NULL);
 | 
			
		||||
	i=NCONF_load(config, p, &errline);
 | 
			
		||||
@@ -540,7 +478,7 @@ bad:
 | 
			
		||||
 | 
			
		||||
	if (template != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		long errline;
 | 
			
		||||
		long errline = -1;
 | 
			
		||||
 | 
			
		||||
		if( verbose )
 | 
			
		||||
			BIO_printf(bio_err,"Using configuration from %s\n",template);
 | 
			
		||||
@@ -683,7 +621,7 @@ bad:
 | 
			
		||||
 | 
			
		||||
	if (keyfile != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform, passin, e,
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform, 0, passin, e,
 | 
			
		||||
			"Private Key");
 | 
			
		||||
		if (!pkey)
 | 
			
		||||
			{
 | 
			
		||||
@@ -691,7 +629,7 @@ bad:
 | 
			
		||||
			   message */
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || EVP_PKEY_type(pkey->type) == EVP_PKEY_ECDSA)
 | 
			
		||||
		if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA)
 | 
			
		||||
			{
 | 
			
		||||
			char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
 | 
			
		||||
			if (randfile == NULL)
 | 
			
		||||
@@ -715,15 +653,14 @@ bad:
 | 
			
		||||
				newkey=DEFAULT_KEY_LENGTH;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (newkey < MIN_KEY_LENGTH && (pkey_type == TYPE_RSA || pkey_type == TYPE_DSA))
 | 
			
		||||
		/* TODO: appropriate minimal keylength for the different algorithm (esp. ECDSA) */
 | 
			
		||||
		if (newkey < MIN_KEY_LENGTH)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"private key length is too short,\n");
 | 
			
		||||
			BIO_printf(bio_err,"it needs to be at least %d bits, not %d\n",MIN_KEY_LENGTH,newkey);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		BIO_printf(bio_err,"Generating a %d bit %s private key\n",
 | 
			
		||||
			newkey,(pkey_type == TYPE_RSA)?"RSA":(pkey_type == TYPE_DSA)?"DSA":"ECDSA");
 | 
			
		||||
			newkey,(pkey_type == TYPE_RSA)?"RSA":"DSA");
 | 
			
		||||
 | 
			
		||||
		if ((pkey=EVP_PKEY_new()) == NULL) goto end;
 | 
			
		||||
 | 
			
		||||
@@ -745,14 +682,6 @@ bad:
 | 
			
		||||
			dsa_params=NULL;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
			if (pkey_type == TYPE_ECDSA)
 | 
			
		||||
			{
 | 
			
		||||
			if (!ECDSA_generate_key(ecdsa_params)) goto end;
 | 
			
		||||
			if (!EVP_PKEY_assign_ECDSA(pkey, ecdsa_params)) goto end;
 | 
			
		||||
			ecdsa_params = NULL;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		app_RAND_write_file(randfile, bio_err);
 | 
			
		||||
 | 
			
		||||
@@ -858,10 +787,6 @@ loop:
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_DSA)
 | 
			
		||||
			digest=EVP_dss1();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
			digest=EVP_ecdsa();
 | 
			
		||||
#endif
 | 
			
		||||
		if (req == NULL)
 | 
			
		||||
			{
 | 
			
		||||
@@ -1055,9 +980,9 @@ loop:
 | 
			
		||||
	if (text)
 | 
			
		||||
		{
 | 
			
		||||
		if (x509)
 | 
			
		||||
			X509_print(out,x509ss);
 | 
			
		||||
			X509_print_ex(out, x509ss, nmflag, reqflag);
 | 
			
		||||
		else	
 | 
			
		||||
			X509_REQ_print(out,req);
 | 
			
		||||
			X509_REQ_print_ex(out, req, nmflag, reqflag);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(subject) 
 | 
			
		||||
@@ -1127,6 +1052,10 @@ loop:
 | 
			
		||||
		}
 | 
			
		||||
	ex=0;
 | 
			
		||||
end:
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
	if(to_free)
 | 
			
		||||
		OPENSSL_free(to_free);
 | 
			
		||||
#endif
 | 
			
		||||
	if (ex)
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
@@ -1143,12 +1072,9 @@ end:
 | 
			
		||||
	OBJ_cleanup();
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	if (dsa_params != NULL) DSA_free(dsa_params);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	if (ecdsa_params != NULL) ECDSA_free(ecdsa_params);
 | 
			
		||||
#endif
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ex);
 | 
			
		||||
	OPENSSL_EXIT(ex);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
 | 
			
		||||
@@ -1289,13 +1215,19 @@ start:		for (;;)
 | 
			
		||||
				}
 | 
			
		||||
			/* If OBJ not recognised ignore it */
 | 
			
		||||
			if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
 | 
			
		||||
 | 
			
		||||
			if(strlen(v->name) > sizeof buf-9)
 | 
			
		||||
			   {
 | 
			
		||||
			   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
			
		||||
			   return 0;
 | 
			
		||||
			   }
 | 
			
		||||
 | 
			
		||||
			sprintf(buf,"%s_default",v->name);
 | 
			
		||||
			if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
			
		||||
				{
 | 
			
		||||
				ERR_clear_error();
 | 
			
		||||
				def="";
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
			sprintf(buf,"%s_value",v->name);
 | 
			
		||||
			if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
			
		||||
				{
 | 
			
		||||
@@ -1342,6 +1274,12 @@ start2:			for (;;)
 | 
			
		||||
				if ((nid=OBJ_txt2nid(type)) == NID_undef)
 | 
			
		||||
					goto start2;
 | 
			
		||||
 | 
			
		||||
				if(strlen(v->name) > sizeof buf-9)
 | 
			
		||||
				   {
 | 
			
		||||
				   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
			
		||||
				   return 0;
 | 
			
		||||
				   }
 | 
			
		||||
 | 
			
		||||
				sprintf(buf,"%s_default",type);
 | 
			
		||||
				if ((def=NCONF_get_string(req_conf,attr_sect,buf))
 | 
			
		||||
					== NULL)
 | 
			
		||||
@@ -1445,6 +1383,7 @@ start:
 | 
			
		||||
	(void)BIO_flush(bio_err);
 | 
			
		||||
	if(value != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		OPENSSL_assert(strlen(value) < sizeof buf-2);
 | 
			
		||||
		strcpy(buf,value);
 | 
			
		||||
		strcat(buf,"\n");
 | 
			
		||||
		BIO_printf(bio_err,"%s\n",value);
 | 
			
		||||
@@ -1454,7 +1393,7 @@ start:
 | 
			
		||||
		buf[0]='\0';
 | 
			
		||||
		if (!batch)
 | 
			
		||||
			{
 | 
			
		||||
			fgets(buf,1024,stdin);
 | 
			
		||||
			fgets(buf,sizeof buf,stdin);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
@@ -1503,6 +1442,7 @@ start:
 | 
			
		||||
	(void)BIO_flush(bio_err);
 | 
			
		||||
	if (value != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		OPENSSL_assert(strlen(value) < sizeof buf-2);
 | 
			
		||||
		strcpy(buf,value);
 | 
			
		||||
		strcat(buf,"\n");
 | 
			
		||||
		BIO_printf(bio_err,"%s\n",value);
 | 
			
		||||
@@ -1512,7 +1452,7 @@ start:
 | 
			
		||||
		buf[0]='\0';
 | 
			
		||||
		if (!batch)
 | 
			
		||||
			{
 | 
			
		||||
			fgets(buf,1024,stdin);
 | 
			
		||||
			fgets(buf,sizeof buf,stdin);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
 
 | 
			
		||||
@@ -238,12 +238,12 @@ bad:
 | 
			
		||||
		if (pubin)
 | 
			
		||||
			pkey = load_pubkey(bio_err, infile,
 | 
			
		||||
				(informat == FORMAT_NETSCAPE && sgckey ?
 | 
			
		||||
					FORMAT_IISSGC : informat),
 | 
			
		||||
					FORMAT_IISSGC : informat), 1,
 | 
			
		||||
				passin, e, "Public Key");
 | 
			
		||||
		else
 | 
			
		||||
			pkey = load_key(bio_err, infile,
 | 
			
		||||
				(informat == FORMAT_NETSCAPE && sgckey ?
 | 
			
		||||
					FORMAT_IISSGC : informat),
 | 
			
		||||
					FORMAT_IISSGC : informat), 1,
 | 
			
		||||
				passin, e, "Private Key");
 | 
			
		||||
 | 
			
		||||
		if (pkey != NULL)
 | 
			
		||||
@@ -369,7 +369,7 @@ end:
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#else /* !OPENSSL_NO_RSA */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -169,12 +169,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	
 | 
			
		||||
	switch(key_type) {
 | 
			
		||||
		case KEY_PRIVKEY:
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform,
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform, 0,
 | 
			
		||||
			NULL, e, "Private Key");
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case KEY_PUBKEY:
 | 
			
		||||
		pkey = load_pubkey(bio_err, keyfile, keyform,
 | 
			
		||||
		pkey = load_pubkey(bio_err, keyfile, keyform, 0,
 | 
			
		||||
			NULL, e, "Public Key");
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -134,7 +134,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
 | 
			
		||||
	err=	X509_STORE_CTX_get_error(ctx);
 | 
			
		||||
	depth=	X509_STORE_CTX_get_error_depth(ctx);
 | 
			
		||||
 | 
			
		||||
	X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256);
 | 
			
		||||
	X509_NAME_oneline(X509_get_subject_name(err_cert),buf,sizeof buf);
 | 
			
		||||
	BIO_printf(bio_err,"depth=%d %s\n",depth,buf);
 | 
			
		||||
	if (!ok)
 | 
			
		||||
		{
 | 
			
		||||
@@ -154,7 +154,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
 | 
			
		||||
	switch (ctx->error)
 | 
			
		||||
		{
 | 
			
		||||
	case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,256);
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,sizeof buf);
 | 
			
		||||
		BIO_printf(bio_err,"issuer= %s\n",buf);
 | 
			
		||||
		break;
 | 
			
		||||
	case X509_V_ERR_CERT_NOT_YET_VALID:
 | 
			
		||||
 
 | 
			
		||||
@@ -140,6 +140,14 @@ typedef unsigned int u_int;
 | 
			
		||||
#include <conio.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINCE
 | 
			
		||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
			
		||||
#ifdef fileno
 | 
			
		||||
#undef fileno
 | 
			
		||||
#endif
 | 
			
		||||
#define fileno(a) (int)_fileno(a)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 | 
			
		||||
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 | 
			
		||||
@@ -662,7 +670,11 @@ re_start:
 | 
			
		||||
					tv.tv_usec = 0;
 | 
			
		||||
					i=select(width,(void *)&readfds,(void *)&writefds,
 | 
			
		||||
						 NULL,&tv);
 | 
			
		||||
#ifdef OPENSSL_SYS_WINCE
 | 
			
		||||
					if(!i && (!_kbhit() || !read_tty) ) continue;
 | 
			
		||||
#else
 | 
			
		||||
					if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
 | 
			
		||||
#endif
 | 
			
		||||
				} else 	i=select(width,(void *)&readfds,(void *)&writefds,
 | 
			
		||||
					 NULL,NULL);
 | 
			
		||||
			}
 | 
			
		||||
@@ -746,8 +758,8 @@ re_start:
 | 
			
		||||
				goto shut;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
		/* Assume Windows can always write */
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
		/* Assume Windows/DOS can always write */
 | 
			
		||||
		else if (!ssl_pending && write_tty)
 | 
			
		||||
#else
 | 
			
		||||
		else if (!ssl_pending && FD_ISSET(fileno(stdout),&writefds))
 | 
			
		||||
@@ -828,7 +840,11 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#ifdef OPENSSL_SYS_WINCE
 | 
			
		||||
		else if (_kbhit())
 | 
			
		||||
#else
 | 
			
		||||
		else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
 | 
			
		||||
#endif
 | 
			
		||||
#else
 | 
			
		||||
		else if (FD_ISSET(fileno(stdin),&readfds))
 | 
			
		||||
#endif
 | 
			
		||||
@@ -892,16 +908,16 @@ end:
 | 
			
		||||
	if (con != NULL) SSL_free(con);
 | 
			
		||||
	if (con2 != NULL) SSL_free(con2);
 | 
			
		||||
	if (ctx != NULL) SSL_CTX_free(ctx);
 | 
			
		||||
	if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
 | 
			
		||||
	if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
 | 
			
		||||
	if (mbuf != NULL) { memset(mbuf,0,BUFSIZZ); OPENSSL_free(mbuf); }
 | 
			
		||||
	if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
 | 
			
		||||
	if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
 | 
			
		||||
	if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
 | 
			
		||||
	if (bio_c_out != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_free(bio_c_out);
 | 
			
		||||
		bio_c_out=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -930,10 +946,10 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
			for (i=0; i<sk_X509_num(sk); i++)
 | 
			
		||||
				{
 | 
			
		||||
				X509_NAME_oneline(X509_get_subject_name(
 | 
			
		||||
					sk_X509_value(sk,i)),buf,BUFSIZ);
 | 
			
		||||
					sk_X509_value(sk,i)),buf,sizeof buf);
 | 
			
		||||
				BIO_printf(bio,"%2d s:%s\n",i,buf);
 | 
			
		||||
				X509_NAME_oneline(X509_get_issuer_name(
 | 
			
		||||
					sk_X509_value(sk,i)),buf,BUFSIZ);
 | 
			
		||||
					sk_X509_value(sk,i)),buf,sizeof buf);
 | 
			
		||||
				BIO_printf(bio,"   i:%s\n",buf);
 | 
			
		||||
				if (c_showcerts)
 | 
			
		||||
					PEM_write_bio_X509(bio,sk_X509_value(sk,i));
 | 
			
		||||
@@ -948,10 +964,10 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
			if (!(c_showcerts && got_a_chain)) /* Redundant if we showed the whole chain */
 | 
			
		||||
				PEM_write_bio_X509(bio,peer);
 | 
			
		||||
			X509_NAME_oneline(X509_get_subject_name(peer),
 | 
			
		||||
				buf,BUFSIZ);
 | 
			
		||||
				buf,sizeof buf);
 | 
			
		||||
			BIO_printf(bio,"subject=%s\n",buf);
 | 
			
		||||
			X509_NAME_oneline(X509_get_issuer_name(peer),
 | 
			
		||||
				buf,BUFSIZ);
 | 
			
		||||
				buf,sizeof buf);
 | 
			
		||||
			BIO_printf(bio,"issuer=%s\n",buf);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
@@ -973,7 +989,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio,"---\nNo client certificate CA names sent\n");
 | 
			
		||||
			}
 | 
			
		||||
		p=SSL_get_shared_ciphers(s,buf,BUFSIZ);
 | 
			
		||||
		p=SSL_get_shared_ciphers(s,buf,sizeof buf);
 | 
			
		||||
		if (p != NULL)
 | 
			
		||||
			{
 | 
			
		||||
			/* This works only for SSL 2.  In later protocol
 | 
			
		||||
 
 | 
			
		||||
@@ -144,6 +144,14 @@ typedef unsigned int u_int;
 | 
			
		||||
#include <conio.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINCE
 | 
			
		||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
			
		||||
#ifdef fileno
 | 
			
		||||
#undef fileno
 | 
			
		||||
#endif
 | 
			
		||||
#define fileno(a) (int)_fileno(a)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 | 
			
		||||
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 | 
			
		||||
#undef FIONBIO
 | 
			
		||||
@@ -320,10 +328,10 @@ static char **local_argv;
 | 
			
		||||
static int ebcdic_new(BIO *bi);
 | 
			
		||||
static int ebcdic_free(BIO *a);
 | 
			
		||||
static int ebcdic_read(BIO *b, char *out, int outl);
 | 
			
		||||
static int ebcdic_write(BIO *b, char *in, int inl);
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr);
 | 
			
		||||
static int ebcdic_write(BIO *b, const char *in, int inl);
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr);
 | 
			
		||||
static int ebcdic_gets(BIO *bp, char *buf, int size);
 | 
			
		||||
static int ebcdic_puts(BIO *bp, char *str);
 | 
			
		||||
static int ebcdic_puts(BIO *bp, const char *str);
 | 
			
		||||
 | 
			
		||||
#define BIO_TYPE_EBCDIC_FILTER	(18|0x0200)
 | 
			
		||||
static BIO_METHOD methods_ebcdic=
 | 
			
		||||
@@ -388,7 +396,7 @@ static int ebcdic_read(BIO *b, char *out, int outl)
 | 
			
		||||
	return(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int ebcdic_write(BIO *b, char *in, int inl)
 | 
			
		||||
static int ebcdic_write(BIO *b, const char *in, int inl)
 | 
			
		||||
{
 | 
			
		||||
	EBCDIC_OUTBUFF *wbuf;
 | 
			
		||||
	int ret=0;
 | 
			
		||||
@@ -421,7 +429,7 @@ static int ebcdic_write(BIO *b, char *in, int inl)
 | 
			
		||||
	return(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr)
 | 
			
		||||
{
 | 
			
		||||
	long ret;
 | 
			
		||||
 | 
			
		||||
@@ -440,7 +448,7 @@ static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
 | 
			
		||||
 | 
			
		||||
static int ebcdic_gets(BIO *bp, char *buf, int size)
 | 
			
		||||
{
 | 
			
		||||
	int i, ret;
 | 
			
		||||
	int i, ret=0;
 | 
			
		||||
	if (bp->next_bio == NULL) return(0);
 | 
			
		||||
/*	return(BIO_gets(bp->next_bio,buf,size));*/
 | 
			
		||||
	for (i=0; i<size-1; ++i)
 | 
			
		||||
@@ -459,7 +467,7 @@ static int ebcdic_gets(BIO *bp, char *buf, int size)
 | 
			
		||||
	return (ret < 0 && i == 0) ? ret : i;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int ebcdic_puts(BIO *bp, char *str)
 | 
			
		||||
static int ebcdic_puts(BIO *bp, const char *str)
 | 
			
		||||
{
 | 
			
		||||
	if (bp->next_bio == NULL) return(0);
 | 
			
		||||
	return ebcdic_write(bp, str, strlen(str));
 | 
			
		||||
@@ -710,7 +718,7 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_ECDSA)
 | 
			
		||||
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA)
 | 
			
		||||
	if (nocert)
 | 
			
		||||
#endif
 | 
			
		||||
		{
 | 
			
		||||
@@ -860,7 +868,7 @@ end:
 | 
			
		||||
		bio_s_out=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
 | 
			
		||||
@@ -1176,7 +1184,7 @@ err:
 | 
			
		||||
	BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
 | 
			
		||||
	if (buf != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		memset(buf,0,bufsize);
 | 
			
		||||
		OPENSSL_cleanse(buf,bufsize);
 | 
			
		||||
		OPENSSL_free(buf);
 | 
			
		||||
		}
 | 
			
		||||
	if (ret >= 0)
 | 
			
		||||
@@ -1228,14 +1236,14 @@ static int init_ssl_connection(SSL *con)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_s_out,"Client certificate\n");
 | 
			
		||||
		PEM_write_bio_X509(bio_s_out,peer);
 | 
			
		||||
		X509_NAME_oneline(X509_get_subject_name(peer),buf,BUFSIZ);
 | 
			
		||||
		X509_NAME_oneline(X509_get_subject_name(peer),buf,sizeof buf);
 | 
			
		||||
		BIO_printf(bio_s_out,"subject=%s\n",buf);
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(peer),buf,BUFSIZ);
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(peer),buf,sizeof buf);
 | 
			
		||||
		BIO_printf(bio_s_out,"issuer=%s\n",buf);
 | 
			
		||||
		X509_free(peer);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (SSL_get_shared_ciphers(con,buf,BUFSIZ) != NULL)
 | 
			
		||||
	if (SSL_get_shared_ciphers(con,buf,sizeof buf) != NULL)
 | 
			
		||||
		BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf);
 | 
			
		||||
	str=SSL_CIPHER_get_name(SSL_get_current_cipher(con));
 | 
			
		||||
	BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)");
 | 
			
		||||
@@ -1395,7 +1403,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_s_out,"read R BLOCK\n");
 | 
			
		||||
#ifndef OPENSSL_SYS_MSDOS
 | 
			
		||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(__DJGPP__)
 | 
			
		||||
				sleep(1);
 | 
			
		||||
#endif
 | 
			
		||||
				continue;
 | 
			
		||||
 
 | 
			
		||||
@@ -83,9 +83,9 @@ typedef unsigned int u_int;
 | 
			
		||||
 | 
			
		||||
static struct hostent *GetHostByName(char *name);
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
static void sock_cleanup(void);
 | 
			
		||||
static void ssl_sock_cleanup(void);
 | 
			
		||||
#endif
 | 
			
		||||
static int sock_init(void);
 | 
			
		||||
static int ssl_sock_init(void);
 | 
			
		||||
static int init_client_ip(int *sock,unsigned char ip[4], int port);
 | 
			
		||||
static int init_server(int *sock, int port);
 | 
			
		||||
static int init_server_long(int *sock, int port,char *ip);
 | 
			
		||||
@@ -118,7 +118,7 @@ static LONG FAR PASCAL topHookProc(HWND hwnd, UINT message, WPARAM wParam,
 | 
			
		||||
		case WM_DESTROY:
 | 
			
		||||
		case WM_CLOSE:
 | 
			
		||||
			SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopWndProc);
 | 
			
		||||
			sock_cleanup();
 | 
			
		||||
			ssl_sock_cleanup();
 | 
			
		||||
			break;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -135,26 +135,34 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
 | 
			
		||||
#endif /* OPENSSL_SYS_WINDOWS */
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
static void sock_cleanup(void)
 | 
			
		||||
static void ssl_sock_cleanup(void)
 | 
			
		||||
	{
 | 
			
		||||
	if (wsa_init_done)
 | 
			
		||||
		{
 | 
			
		||||
		wsa_init_done=0;
 | 
			
		||||
#ifndef OPENSSL_SYS_WINCE
 | 
			
		||||
		WSACancelBlockingCall();
 | 
			
		||||
#endif
 | 
			
		||||
		WSACleanup();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int sock_init(void)
 | 
			
		||||
static int ssl_sock_init(void)
 | 
			
		||||
	{
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#ifdef WATT32
 | 
			
		||||
	extern int _watt_do_exit;
 | 
			
		||||
	_watt_do_exit = 0;
 | 
			
		||||
	dbug_init();
 | 
			
		||||
	if (sock_init())
 | 
			
		||||
		return (0);
 | 
			
		||||
#elif defined(OPENSSL_SYS_WINDOWS)
 | 
			
		||||
	if (!wsa_init_done)
 | 
			
		||||
		{
 | 
			
		||||
		int err;
 | 
			
		||||
	  
 | 
			
		||||
#ifdef SIGINT
 | 
			
		||||
		signal(SIGINT,(void (*)(int))sock_cleanup);
 | 
			
		||||
		signal(SIGINT,(void (*)(int))ssl_sock_cleanup);
 | 
			
		||||
#endif
 | 
			
		||||
		wsa_init_done=1;
 | 
			
		||||
		memset(&wsa_state,0,sizeof(wsa_state));
 | 
			
		||||
@@ -196,7 +204,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port)
 | 
			
		||||
	struct sockaddr_in them;
 | 
			
		||||
	int s,i;
 | 
			
		||||
 | 
			
		||||
	if (!sock_init()) return(0);
 | 
			
		||||
	if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
	memset((char *)&them,0,sizeof(them));
 | 
			
		||||
	them.sin_family=AF_INET;
 | 
			
		||||
@@ -261,7 +269,7 @@ static int init_server_long(int *sock, int port, char *ip)
 | 
			
		||||
	struct sockaddr_in server;
 | 
			
		||||
	int s= -1,i;
 | 
			
		||||
 | 
			
		||||
	if (!sock_init()) return(0);
 | 
			
		||||
	if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
	memset((char *)&server,0,sizeof(server));
 | 
			
		||||
	server.sin_family=AF_INET;
 | 
			
		||||
@@ -318,7 +326,7 @@ static int do_accept(int acc_sock, int *sock, char **host)
 | 
			
		||||
	int len;
 | 
			
		||||
/*	struct linger ling; */
 | 
			
		||||
 | 
			
		||||
	if (!sock_init()) return(0);
 | 
			
		||||
	if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_SYS_WINDOWS
 | 
			
		||||
redoit:
 | 
			
		||||
@@ -448,7 +456,7 @@ static int host_ip(char *str, unsigned char ip[4])
 | 
			
		||||
		{ /* do a gethostbyname */
 | 
			
		||||
		struct hostent *he;
 | 
			
		||||
 | 
			
		||||
		if (!sock_init()) return(0);
 | 
			
		||||
		if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
		he=GetHostByName(str);
 | 
			
		||||
		if (he == NULL)
 | 
			
		||||
@@ -529,9 +537,12 @@ static struct hostent *GetHostByName(char *name)
 | 
			
		||||
		ret=gethostbyname(name);
 | 
			
		||||
		if (ret == NULL) return(NULL);
 | 
			
		||||
		/* else add to cache */
 | 
			
		||||
		strncpy(ghbn_cache[lowi].name,name,128);
 | 
			
		||||
		memcpy((char *)&(ghbn_cache[lowi].ent),ret,sizeof(struct hostent));
 | 
			
		||||
		ghbn_cache[lowi].order=ghbn_miss+ghbn_hits;
 | 
			
		||||
		if(strlen(name) < sizeof ghbn_cache[0].name)
 | 
			
		||||
			{
 | 
			
		||||
			strcpy(ghbn_cache[lowi].name,name);
 | 
			
		||||
			memcpy((char *)&(ghbn_cache[lowi].ent),ret,sizeof(struct hostent));
 | 
			
		||||
			ghbn_cache[lowi].order=ghbn_miss+ghbn_hits;
 | 
			
		||||
			}
 | 
			
		||||
		return(ret);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
 
 | 
			
		||||
@@ -146,6 +146,8 @@
 | 
			
		||||
#undef BUFSIZZ
 | 
			
		||||
#define BUFSIZZ 1024*10
 | 
			
		||||
 | 
			
		||||
#define MYBUFSIZ 1024*8
 | 
			
		||||
 | 
			
		||||
#undef min
 | 
			
		||||
#undef max
 | 
			
		||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
 | 
			
		||||
@@ -320,6 +322,11 @@ static int parseArgs(int argc, char **argv)
 | 
			
		||||
		{
 | 
			
		||||
		if (--argc < 1) goto bad;
 | 
			
		||||
		s_www_path= *(++argv);
 | 
			
		||||
		if(strlen(s_www_path) > MYBUFSIZ-100)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"-www option too long\n");
 | 
			
		||||
			badop=1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else if(strcmp(*argv,"-bugs") == 0)
 | 
			
		||||
	    st_bugs=1;
 | 
			
		||||
@@ -480,7 +487,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	tm_Time_F(START);
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		if (finishtime < time(NULL)) break;
 | 
			
		||||
		if (finishtime < (long)time(NULL)) break;
 | 
			
		||||
#ifdef WIN32_STUFF
 | 
			
		||||
 | 
			
		||||
		if( flushWinMsgs(0) == -1 )
 | 
			
		||||
@@ -531,9 +538,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		}
 | 
			
		||||
	totalTime += tm_Time_F(STOP); /* Add the time for this iteration */
 | 
			
		||||
 | 
			
		||||
	i=(int)(time(NULL)-finishtime+maxTime);
 | 
			
		||||
	i=(int)((long)time(NULL)-finishtime+maxTime);
 | 
			
		||||
	printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,(long)time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
 | 
			
		||||
	/* Now loop and time connections using the same session id over and over */
 | 
			
		||||
 | 
			
		||||
@@ -565,7 +572,7 @@ next:
 | 
			
		||||
	nConn = 0;
 | 
			
		||||
	totalTime = 0.0;
 | 
			
		||||
 | 
			
		||||
	finishtime=time(NULL)+maxTime;
 | 
			
		||||
	finishtime=(long)time(NULL)+maxTime;
 | 
			
		||||
 | 
			
		||||
	printf( "starting\n" );
 | 
			
		||||
	bytes_read=0;
 | 
			
		||||
@@ -573,7 +580,7 @@ next:
 | 
			
		||||
		
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		if (finishtime < time(NULL)) break;
 | 
			
		||||
		if (finishtime < (long)time(NULL)) break;
 | 
			
		||||
 | 
			
		||||
#ifdef WIN32_STUFF
 | 
			
		||||
		if( flushWinMsgs(0) == -1 )
 | 
			
		||||
@@ -623,7 +630,7 @@ next:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,(long)time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
 | 
			
		||||
	ret=0;
 | 
			
		||||
end:
 | 
			
		||||
@@ -635,7 +642,7 @@ end:
 | 
			
		||||
		tm_ctx=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/***********************************************************************
 | 
			
		||||
 
 | 
			
		||||
@@ -273,7 +273,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (x != NULL) SSL_SESSION_free(x);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static SSL_SESSION *load_sess_id(char *infile, int format)
 | 
			
		||||
 
 | 
			
		||||
@@ -428,7 +428,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	} else keyfile = NULL;
 | 
			
		||||
 | 
			
		||||
	if(keyfile) {
 | 
			
		||||
		key = load_key(bio_err, keyfile, keyform, passin, e,
 | 
			
		||||
		key = load_key(bio_err, keyfile, keyform, 0, passin, e,
 | 
			
		||||
			       "signing key file");
 | 
			
		||||
		if (!key) {
 | 
			
		||||
			goto end;
 | 
			
		||||
 
 | 
			
		||||
@@ -187,7 +187,8 @@
 | 
			
		||||
 | 
			
		||||
/* The following if from times(3) man page.  It may need to be changed */
 | 
			
		||||
#ifndef HZ
 | 
			
		||||
# ifdef _SC_CLK_TCK
 | 
			
		||||
# if defined(_SC_CLK_TCK) \
 | 
			
		||||
     && (!defined(OPENSSL_SYS_VMS) || __CTRL_VER >= 70000000)
 | 
			
		||||
#  define HZ ((double)sysconf(_SC_CLK_TCK))
 | 
			
		||||
# else
 | 
			
		||||
#  ifndef CLK_TCK
 | 
			
		||||
@@ -861,7 +862,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
			BIO_printf(bio_err,"\n");
 | 
			
		||||
			BIO_printf(bio_err,"Available options:\n");
 | 
			
		||||
#ifdef TIMES
 | 
			
		||||
#if defined(TIMES) || defined(USE_TOD)
 | 
			
		||||
			BIO_printf(bio_err,"-elapsed        measure time in real time instead of CPU user time.\n");
 | 
			
		||||
#endif
 | 
			
		||||
			BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 | 
			
		||||
@@ -1728,7 +1729,7 @@ end:
 | 
			
		||||
			DSA_free(dsa_key[i]);
 | 
			
		||||
#endif
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(mret);
 | 
			
		||||
	OPENSSL_EXIT(mret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void print_message(const char *s, long num, int length)
 | 
			
		||||
@@ -1781,7 +1782,7 @@ static char *sstrsep(char **string, const char *delim)
 | 
			
		||||
    if (**string == 0)
 | 
			
		||||
        return NULL;
 | 
			
		||||
 | 
			
		||||
    memset(isdelim, 0, 256);
 | 
			
		||||
    memset(isdelim, 0, sizeof isdelim);
 | 
			
		||||
    isdelim[0] = 1;
 | 
			
		||||
 | 
			
		||||
    while (*delim)
 | 
			
		||||
 
 | 
			
		||||
@@ -186,7 +186,7 @@ bad:
 | 
			
		||||
	if(keyfile) {
 | 
			
		||||
		pkey = load_key(bio_err,
 | 
			
		||||
				strcmp(keyfile, "-") ? keyfile : NULL,
 | 
			
		||||
				FORMAT_PEM, passin, e, "private key");
 | 
			
		||||
				FORMAT_PEM, 1, passin, e, "private key");
 | 
			
		||||
		if(!pkey) {
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
@@ -295,5 +295,5 @@ end:
 | 
			
		||||
	EVP_PKEY_free(pkey);
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -232,7 +232,7 @@ end:
 | 
			
		||||
	sk_X509_pop_free(untrusted, X509_free);
 | 
			
		||||
	sk_X509_pop_free(trusted, X509_free);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)
 | 
			
		||||
@@ -330,7 +330,8 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
 | 
			
		||||
	if (!ok)
 | 
			
		||||
		{
 | 
			
		||||
		X509_NAME_oneline(
 | 
			
		||||
				X509_get_subject_name(ctx->current_cert),buf,256);
 | 
			
		||||
				X509_get_subject_name(ctx->current_cert),buf,
 | 
			
		||||
				sizeof buf);
 | 
			
		||||
		printf("%s\n",buf);
 | 
			
		||||
		printf("error %d at %d depth lookup:%s\n",ctx->error,
 | 
			
		||||
			ctx->error_depth,
 | 
			
		||||
 
 | 
			
		||||
@@ -200,5 +200,5 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
 | 
			
		||||
end:
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,6 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 | 
			
		||||
        HDC hdc;
 | 
			
		||||
	PAINTSTRUCT ps;
 | 
			
		||||
        RECT rect;
 | 
			
		||||
        char buffer[200];
 | 
			
		||||
        static int seeded = 0;
 | 
			
		||||
 | 
			
		||||
	switch (iMsg)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										38
									
								
								apps/x509.c
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								apps/x509.c
									
									
									
									
									
								
							@@ -122,7 +122,7 @@ static char *x509_usage[]={
 | 
			
		||||
" -CAkey arg      - set the CA key, must be PEM format\n",
 | 
			
		||||
"                   missing, it is assumed to be in the CA file.\n",
 | 
			
		||||
" -CAcreateserial - create serial number file if it does not exist\n",
 | 
			
		||||
" -CAserial       - serial file\n",
 | 
			
		||||
" -CAserial arg   - serial file\n",
 | 
			
		||||
" -set_serial     - serial number to use\n",
 | 
			
		||||
" -text           - print the certificate in text form\n",
 | 
			
		||||
" -C              - print out C code forms\n",
 | 
			
		||||
@@ -479,7 +479,7 @@ bad:
 | 
			
		||||
 | 
			
		||||
	if (extfile)
 | 
			
		||||
		{
 | 
			
		||||
		long errorline;
 | 
			
		||||
		long errorline = -1;
 | 
			
		||||
		X509V3_CTX ctx2;
 | 
			
		||||
		extconf = NCONF_new(NULL);
 | 
			
		||||
		if (!NCONF_load(extconf, extfile,&errorline))
 | 
			
		||||
@@ -770,10 +770,11 @@ bad:
 | 
			
		||||
				int y,z;
 | 
			
		||||
 | 
			
		||||
				X509_NAME_oneline(X509_get_subject_name(x),
 | 
			
		||||
					buf,256);
 | 
			
		||||
					buf,sizeof buf);
 | 
			
		||||
				BIO_printf(STDout,"/* subject:%s */\n",buf);
 | 
			
		||||
				m=X509_NAME_oneline(
 | 
			
		||||
					X509_get_issuer_name(x),buf,256);
 | 
			
		||||
					X509_get_issuer_name(x),buf,
 | 
			
		||||
					sizeof buf);
 | 
			
		||||
				BIO_printf(STDout,"/* issuer :%s */\n",buf);
 | 
			
		||||
 | 
			
		||||
				z=i2d_X509(x,NULL);
 | 
			
		||||
@@ -861,18 +862,14 @@ bad:
 | 
			
		||||
				if (Upkey == NULL)
 | 
			
		||||
					{
 | 
			
		||||
					Upkey=load_key(bio_err,
 | 
			
		||||
						keyfile,keyformat, passin, e,
 | 
			
		||||
						"Private key");
 | 
			
		||||
						keyfile, keyformat, 0,
 | 
			
		||||
						passin, e, "Private key");
 | 
			
		||||
					if (Upkey == NULL) goto end;
 | 
			
		||||
					}
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		                if (Upkey->type == EVP_PKEY_DSA)
 | 
			
		||||
		                        digest=EVP_dss1();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
				if (Upkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
					digest=EVP_ecdsa();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
				assert(need_rand);
 | 
			
		||||
				if (!sign(x,Upkey,days,clrext,digest,
 | 
			
		||||
@@ -884,18 +881,15 @@ bad:
 | 
			
		||||
				if (CAkeyfile != NULL)
 | 
			
		||||
					{
 | 
			
		||||
					CApkey=load_key(bio_err,
 | 
			
		||||
						CAkeyfile,CAkeyformat, passin,
 | 
			
		||||
						e, "CA Private Key");
 | 
			
		||||
						CAkeyfile, CAkeyformat,
 | 
			
		||||
						0, passin, e,
 | 
			
		||||
						"CA Private Key");
 | 
			
		||||
					if (CApkey == NULL) goto end;
 | 
			
		||||
					}
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		                if (CApkey->type == EVP_PKEY_DSA)
 | 
			
		||||
		                        digest=EVP_dss1();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
				if (CApkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
					digest = EVP_ecdsa();
 | 
			
		||||
#endif
 | 
			
		||||
				
 | 
			
		||||
				assert(need_rand);
 | 
			
		||||
				if (!x509_certify(ctx,CAfile,digest,x,xca,
 | 
			
		||||
@@ -916,17 +910,17 @@ bad:
 | 
			
		||||
				else
 | 
			
		||||
					{
 | 
			
		||||
					pk=load_key(bio_err,
 | 
			
		||||
						keyfile,FORMAT_PEM, passin, e,
 | 
			
		||||
						"request key");
 | 
			
		||||
						keyfile, FORMAT_PEM, 0,
 | 
			
		||||
						passin, e, "request key");
 | 
			
		||||
					if (pk == NULL) goto end;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				BIO_printf(bio_err,"Generating certificate request\n");
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		                if (pk->type == EVP_PKEY_DSA)
 | 
			
		||||
		                        digest=EVP_dss1();
 | 
			
		||||
				else if (pk->type == EVP_PKEY_ECDSA)
 | 
			
		||||
					digest=EVP_ecdsa();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
				rq=X509_to_X509_REQ(x,pk,digest);
 | 
			
		||||
				EVP_PKEY_free(pk);
 | 
			
		||||
@@ -1023,7 +1017,7 @@ end:
 | 
			
		||||
	sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
 | 
			
		||||
	if (passin) OPENSSL_free(passin);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
 | 
			
		||||
@@ -1081,7 +1075,7 @@ static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
 | 
			
		||||
		}
 | 
			
		||||
	else 
 | 
			
		||||
		{
 | 
			
		||||
		if (!a2i_ASN1_INTEGER(io,bs,buf2,1024))
 | 
			
		||||
		if (!a2i_ASN1_INTEGER(io,bs,buf2,sizeof buf2))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"unable to load serial number from %s\n",buf);
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								config
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								config
									
									
									
									
									
								
							@@ -351,6 +351,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
 | 
			
		||||
    *CRAY*)
 | 
			
		||||
       echo "j90-cray-unicos"; exit 0;
 | 
			
		||||
       ;;
 | 
			
		||||
 | 
			
		||||
    NONSTOP_KERNEL*)
 | 
			
		||||
       echo "nsr-tandem-nsk"; exit 0;
 | 
			
		||||
       ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
@@ -393,6 +397,9 @@ exit 0
 | 
			
		||||
GCCVER=`(gcc -dumpversion) 2>/dev/null`
 | 
			
		||||
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]*\-//'`
 | 
			
		||||
  # 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.
 | 
			
		||||
@@ -540,12 +547,13 @@ EOF
 | 
			
		||||
  ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
 | 
			
		||||
  i386-apple-darwin*) OUT="darwin-i386-cc" ;;
 | 
			
		||||
  sparc64-*-linux2)
 | 
			
		||||
	#Before we can uncomment following lines we have to wait at least
 | 
			
		||||
	#till 64-bit glibc for SPARC is operational:-(
 | 
			
		||||
	#echo "WARNING! If you wish to build 64-bit library, then you have to"
 | 
			
		||||
	#echo "         invoke './Configure linux64-sparcv9' *manually*."
 | 
			
		||||
	#echo "         Type return if you want to continue, Ctrl-C to abort."
 | 
			
		||||
	#read waste < /dev/tty
 | 
			
		||||
	echo "WARNING! If *know* that your GNU C supports 64-bit/V9 ABI"
 | 
			
		||||
	echo "         and wish to build 64-bit library, then you have to"
 | 
			
		||||
	echo "         invoke './Configure linux64-sparcv9' *manually*."
 | 
			
		||||
	if [ "$TEST" = "false" ]; then
 | 
			
		||||
	  echo "          You have about 5 seconds to press Ctrl-C to abort."
 | 
			
		||||
	  (stty -icanon min 0 time 50; read waste) < /dev/tty
 | 
			
		||||
	fi
 | 
			
		||||
	OUT="linux-sparcv9" ;;
 | 
			
		||||
  sparc-*-linux2)
 | 
			
		||||
	KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
 | 
			
		||||
@@ -578,6 +586,7 @@ EOF
 | 
			
		||||
  arm*-*-linux2) OUT="linux-elf-arm" ;;
 | 
			
		||||
  s390-*-linux2) OUT="linux-s390" ;;
 | 
			
		||||
  s390x-*-linux?) OUT="linux-s390x" ;;
 | 
			
		||||
  x86_64-*-linux?) OUT="linux-x86_64" ;;
 | 
			
		||||
  *-*-linux2) OUT="linux-elf"
 | 
			
		||||
	if [ "$GCCVER" -gt 28 ]; then
 | 
			
		||||
          if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
 | 
			
		||||
@@ -722,6 +731,7 @@ EOF
 | 
			
		||||
  *-*-cygwin) OUT="Cygwin" ;;
 | 
			
		||||
  t3e-cray-unicosmk) OUT="cray-t3e" ;;
 | 
			
		||||
  j90-cray-unicos) OUT="cray-j90" ;;
 | 
			
		||||
  nsr-tandem-nsk) OUT="tandem-c89" ;;
 | 
			
		||||
  *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
@@ -756,7 +766,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 rijndael ripemd rsa sha
 | 
			
		||||
for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 aes ripemd rsa sha
 | 
			
		||||
do
 | 
			
		||||
  if [ ! -d crypto/$i ]
 | 
			
		||||
  then
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@ LIBS=
 | 
			
		||||
 | 
			
		||||
SDIRS=	md2 md5 sha mdc2 hmac ripemd \
 | 
			
		||||
	des rc2 rc4 rc5 idea bf cast \
 | 
			
		||||
	bn ec rsa dsa ecdsa dh dso engine aes \
 | 
			
		||||
	bn ec rsa dsa dh dso engine aes \
 | 
			
		||||
	buffer bio stack lhash rand err objects \
 | 
			
		||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
			
		||||
 | 
			
		||||
@@ -36,8 +36,8 @@ GENERAL=Makefile README crypto-lib.com install.com
 | 
			
		||||
 | 
			
		||||
LIB= $(TOP)/libcrypto.a
 | 
			
		||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
 | 
			
		||||
LIBSRC=	cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c
 | 
			
		||||
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o
 | 
			
		||||
LIBSRC=	cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c
 | 
			
		||||
LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o
 | 
			
		||||
 | 
			
		||||
SRC= $(LIBSRC)
 | 
			
		||||
 | 
			
		||||
@@ -98,7 +98,7 @@ lib:	$(LIBOBJ)
 | 
			
		||||
 | 
			
		||||
shared:
 | 
			
		||||
	if [ -n "$(SHARED_LIBS)" ]; then \
 | 
			
		||||
		(cd ..; make $(SHARED_LIB)); \
 | 
			
		||||
		(cd ..; $(MAKE) $(SHARED_LIB)); \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
libs:
 | 
			
		||||
@@ -136,12 +136,12 @@ lint:
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
 | 
			
		||||
	$(MAKEDEPEND) $(CFLAG) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
 | 
			
		||||
	$(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}' PERL='${PERL}' depend ); \
 | 
			
		||||
	$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
@@ -180,7 +180,7 @@ cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
 | 
			
		||||
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 | 
			
		||||
cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
 | 
			
		||||
ebcdic.o: ../include/openssl/opensslconf.h ebcdic.c
 | 
			
		||||
ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
 | 
			
		||||
ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
 | 
			
		||||
ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 | 
			
		||||
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
 | 
			
		||||
@@ -193,6 +193,10 @@ mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
 | 
			
		||||
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 | 
			
		||||
mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
 | 
			
		||||
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 | 
			
		||||
mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 | 
			
		||||
mem_clr.o: ../include/openssl/symhacks.h mem_clr.c
 | 
			
		||||
mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
 | 
			
		||||
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 | 
			
		||||
mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,7 @@ lint:
 | 
			
		||||
	lint -DLINT $(INCLUDES) $(SRC)>fluff
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	$(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
 | 
			
		||||
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
 | 
			
		||||
 
 | 
			
		||||
@@ -56,8 +56,9 @@
 | 
			
		||||
#error AES is disabled.
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static const int AES_DECRYPT = 0;
 | 
			
		||||
static const int AES_ENCRYPT = 1;
 | 
			
		||||
#define AES_ENCRYPT	1
 | 
			
		||||
#define AES_DECRYPT	0
 | 
			
		||||
 | 
			
		||||
/* Because array size can't be a const in C, the following two are macros.
 | 
			
		||||
   Both sizes are in bytes. */
 | 
			
		||||
#define AES_MAXNR 14
 | 
			
		||||
@@ -99,7 +100,9 @@ void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
	unsigned char *ivec, int *num);
 | 
			
		||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
	const unsigned long length, const AES_KEY *key,
 | 
			
		||||
	unsigned char *counter, unsigned int *num);
 | 
			
		||||
	unsigned char counter[AES_BLOCK_SIZE],
 | 
			
		||||
	unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
			
		||||
	unsigned int *num);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef  __cplusplus
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,13 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef AES_DEBUG
 | 
			
		||||
# ifndef NDEBUG
 | 
			
		||||
#  define NDEBUG
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 | 
			
		||||
@@ -57,33 +63,49 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
		     const unsigned long length, const AES_KEY *key,
 | 
			
		||||
		     unsigned char *ivec, const int enc) {
 | 
			
		||||
 | 
			
		||||
	int n;
 | 
			
		||||
	unsigned long n;
 | 
			
		||||
	unsigned long len = length;
 | 
			
		||||
	unsigned char tmp[16];
 | 
			
		||||
	unsigned char tmp[AES_BLOCK_SIZE];
 | 
			
		||||
 | 
			
		||||
	assert(in && out && key && ivec);
 | 
			
		||||
	assert(length % AES_BLOCK_SIZE == 0);
 | 
			
		||||
	assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
 | 
			
		||||
 | 
			
		||||
	if (AES_ENCRYPT == enc)
 | 
			
		||||
		while (len > 0) {
 | 
			
		||||
			for(n=0; n < 16; ++n)
 | 
			
		||||
	if (AES_ENCRYPT == enc) {
 | 
			
		||||
		while (len >= AES_BLOCK_SIZE) {
 | 
			
		||||
			for(n=0; n < sizeof tmp; ++n)
 | 
			
		||||
				tmp[n] = in[n] ^ ivec[n];
 | 
			
		||||
			AES_encrypt(tmp, out, key);
 | 
			
		||||
			memcpy(ivec, out, 16);
 | 
			
		||||
			len -= 16;
 | 
			
		||||
			in += 16;
 | 
			
		||||
			out += 16;
 | 
			
		||||
			memcpy(ivec, out, AES_BLOCK_SIZE);
 | 
			
		||||
			len -= AES_BLOCK_SIZE;
 | 
			
		||||
			in += AES_BLOCK_SIZE;
 | 
			
		||||
			out += AES_BLOCK_SIZE;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		while (len > 0) {
 | 
			
		||||
			memcpy(tmp, in, 16);
 | 
			
		||||
		if (len) {
 | 
			
		||||
			for(n=0; n < len; ++n)
 | 
			
		||||
				tmp[n] = in[n] ^ ivec[n];
 | 
			
		||||
			for(n=len; n < AES_BLOCK_SIZE; ++n)
 | 
			
		||||
				tmp[n] = ivec[n];
 | 
			
		||||
			AES_encrypt(tmp, tmp, key);
 | 
			
		||||
			memcpy(out, tmp, len);
 | 
			
		||||
			memcpy(ivec, tmp, sizeof tmp);
 | 
			
		||||
		}			
 | 
			
		||||
	} else {
 | 
			
		||||
		while (len >= AES_BLOCK_SIZE) {
 | 
			
		||||
			memcpy(tmp, in, sizeof tmp);
 | 
			
		||||
			AES_decrypt(in, out, key);
 | 
			
		||||
			for(n=0; n < 16; ++n)
 | 
			
		||||
			for(n=0; n < AES_BLOCK_SIZE; ++n)
 | 
			
		||||
				out[n] ^= ivec[n];
 | 
			
		||||
			memcpy(ivec, tmp, 16);
 | 
			
		||||
			len -= 16;
 | 
			
		||||
			in += 16;
 | 
			
		||||
			out += 16;
 | 
			
		||||
			memcpy(ivec, tmp, AES_BLOCK_SIZE);
 | 
			
		||||
			len -= AES_BLOCK_SIZE;
 | 
			
		||||
			in += AES_BLOCK_SIZE;
 | 
			
		||||
			out += AES_BLOCK_SIZE;
 | 
			
		||||
		}
 | 
			
		||||
		if (len) {
 | 
			
		||||
			memcpy(tmp, in, sizeof tmp);
 | 
			
		||||
			AES_decrypt(tmp, tmp, key);
 | 
			
		||||
			for(n=0; n < len; ++n)
 | 
			
		||||
				out[n] ^= ivec[n];
 | 
			
		||||
			memcpy(ivec, tmp, sizeof tmp);
 | 
			
		||||
		}			
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -105,7 +105,13 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef AES_DEBUG
 | 
			
		||||
# ifndef NDEBUG
 | 
			
		||||
#  define NDEBUG
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,13 @@
 | 
			
		||||
/* Note: rewritten a little bit to provide error control and an OpenSSL-
 | 
			
		||||
   compatible API */
 | 
			
		||||
 | 
			
		||||
#ifndef AES_DEBUG
 | 
			
		||||
# ifndef NDEBUG
 | 
			
		||||
#  define NDEBUG
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,13 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef AES_DEBUG
 | 
			
		||||
# ifndef NDEBUG
 | 
			
		||||
#  define NDEBUG
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 | 
			
		||||
@@ -90,26 +96,31 @@ static void AES_ctr128_inc(unsigned char *counter) {
 | 
			
		||||
 | 
			
		||||
/* The input encrypted as though 128bit counter mode is being
 | 
			
		||||
 * used.  The extra state information to record how much of the
 | 
			
		||||
 * 128bit block we have used is contained in *num;
 | 
			
		||||
 * 128bit block we have used is contained in *num, and the
 | 
			
		||||
 * encrypted counter is kept in ecount_buf.  Both *num and
 | 
			
		||||
 * ecount_buf must be initialised with zeros before the first
 | 
			
		||||
 * call to AES_ctr128_encrypt().
 | 
			
		||||
 */
 | 
			
		||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
			
		||||
	const unsigned long length, const AES_KEY *key,
 | 
			
		||||
	unsigned char *counter, unsigned int *num) {
 | 
			
		||||
	unsigned char counter[AES_BLOCK_SIZE],
 | 
			
		||||
	unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
			
		||||
	unsigned int *num) {
 | 
			
		||||
 | 
			
		||||
	unsigned int n;
 | 
			
		||||
	unsigned long l=length;
 | 
			
		||||
	unsigned char tmp[AES_BLOCK_SIZE];
 | 
			
		||||
 | 
			
		||||
	assert(in && out && key && counter && num);
 | 
			
		||||
	assert(*num < AES_BLOCK_SIZE);
 | 
			
		||||
 | 
			
		||||
	n = *num;
 | 
			
		||||
 | 
			
		||||
	while (l--) {
 | 
			
		||||
		if (n == 0) {
 | 
			
		||||
			AES_encrypt(counter, tmp, key);
 | 
			
		||||
			AES_encrypt(counter, ecount_buf, key);
 | 
			
		||||
			AES_ctr128_inc(counter);
 | 
			
		||||
		}
 | 
			
		||||
		*(out++) = *(in++) ^ tmp[n];
 | 
			
		||||
		*(out++) = *(in++) ^ ecount_buf[n];
 | 
			
		||||
		n = (n+1) % AES_BLOCK_SIZE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,13 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef AES_DEBUG
 | 
			
		||||
# ifndef NDEBUG
 | 
			
		||||
#  define NDEBUG
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,7 @@
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#if defined(_MSC_VER) && !defined(OPENSSL_SYS_WINCE)
 | 
			
		||||
# 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)); }
 | 
			
		||||
 
 | 
			
		||||
@@ -105,7 +105,13 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef AES_DEBUG
 | 
			
		||||
# ifndef NDEBUG
 | 
			
		||||
#  define NDEBUG
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/aes.h>
 | 
			
		||||
#include "aes_locl.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,7 @@ lint:
 | 
			
		||||
	lint -DLINT $(INCLUDES) $(SRC)>fluff
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	$(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
 | 
			
		||||
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
 | 
			
		||||
@@ -145,19 +145,18 @@ a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c
 | 
			
		||||
a_digest.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
a_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
a_digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
a_digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
a_digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
a_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
a_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
a_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
a_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
a_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
a_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
a_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
a_digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
a_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
a_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
a_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
a_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
a_digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
a_digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
a_digest.o: ../../include/openssl/opensslconf.h
 | 
			
		||||
a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
a_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
a_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
@@ -267,49 +266,47 @@ a_set.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
 | 
			
		||||
a_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
a_set.o: ../cryptlib.h a_set.c
 | 
			
		||||
a_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
a_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
a_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
a_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
a_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
a_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
a_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
a_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
a_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
a_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
a_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
a_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
a_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
a_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
a_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
a_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
a_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
a_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
a_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
a_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
a_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
a_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_sign.c
 | 
			
		||||
a_strex.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
a_strex.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
a_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
a_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
a_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
a_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
a_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
a_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
a_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
a_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
a_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
a_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
a_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
a_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
a_sign.o: ../cryptlib.h a_sign.c
 | 
			
		||||
a_strex.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
a_strex.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
a_strex.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
a_strex.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
a_strex.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
a_strex.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
a_strex.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
a_strex.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
a_strex.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
a_strex.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
a_strex.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
a_strex.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
a_strex.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
a_strex.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
a_strex.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
a_strex.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
a_strex.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
a_strex.o: a_strex.c charmap.h
 | 
			
		||||
a_strex.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
a_strex.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
a_strex.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
a_strex.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
a_strex.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
a_strex.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
a_strex.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
a_strex.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
a_strex.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
a_strex.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
a_strex.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
a_strex.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_strex.c charmap.h
 | 
			
		||||
a_strnid.o: ../../e_os.h ../../include/openssl/asn1.h
 | 
			
		||||
a_strnid.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
 | 
			
		||||
a_strnid.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 | 
			
		||||
@@ -354,19 +351,18 @@ a_utf8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
 | 
			
		||||
a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
a_utf8.o: ../cryptlib.h a_utf8.c
 | 
			
		||||
a_verify.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
a_verify.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
a_verify.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
a_verify.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
a_verify.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
a_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
a_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
a_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
a_verify.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
a_verify.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
a_verify.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
a_verify.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
a_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
a_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
a_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
a_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
a_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
a_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
a_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
a_verify.o: ../../include/openssl/opensslconf.h
 | 
			
		||||
a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
a_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
a_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
@@ -402,20 +398,19 @@ asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c
 | 
			
		||||
asn_moid.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/opensslconf.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
asn_moid.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
@@ -434,47 +429,43 @@ asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c
 | 
			
		||||
d2i_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
d2i_pr.o: ../cryptlib.h d2i_pr.c
 | 
			
		||||
d2i_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
d2i_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pr.c
 | 
			
		||||
d2i_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
d2i_pu.o: ../cryptlib.h d2i_pu.c
 | 
			
		||||
d2i_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
d2i_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pu.c
 | 
			
		||||
evp_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
 | 
			
		||||
evp_asn1.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
 | 
			
		||||
evp_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
@@ -509,47 +500,43 @@ f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c
 | 
			
		||||
i2d_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
i2d_pr.o: ../cryptlib.h i2d_pr.c
 | 
			
		||||
i2d_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
i2d_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pr.c
 | 
			
		||||
i2d_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
i2d_pu.o: ../cryptlib.h i2d_pu.c
 | 
			
		||||
i2d_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
i2d_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pu.c
 | 
			
		||||
n_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
@@ -557,8 +544,7 @@ n_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -580,7 +566,6 @@ nsseq.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
nsseq.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
nsseq.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -601,7 +586,6 @@ p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -624,8 +608,7 @@ p5_pbev2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -647,8 +630,7 @@ p8_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -664,155 +646,144 @@ p8_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
p8_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
p8_pkey.o: ../cryptlib.h p8_pkey.c
 | 
			
		||||
t_bitst.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
 | 
			
		||||
t_bitst.o: ../cryptlib.h t_bitst.c
 | 
			
		||||
t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h t_bitst.c
 | 
			
		||||
t_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
t_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
t_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
 | 
			
		||||
t_crl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
t_crl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
t_crl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
t_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
t_crl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
t_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
t_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
t_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
t_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
t_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
t_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
t_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
t_crl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h t_crl.c
 | 
			
		||||
t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
t_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_crl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
 | 
			
		||||
t_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
t_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
t_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
t_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
t_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
t_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
t_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
 | 
			
		||||
t_crl.o: ../cryptlib.h t_crl.c
 | 
			
		||||
t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 | 
			
		||||
t_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h t_pkey.c
 | 
			
		||||
t_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
t_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
t_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
t_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
 | 
			
		||||
t_req.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
t_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
t_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
t_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
t_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
t_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
t_req.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
t_req.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
t_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
t_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
t_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
t_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
t_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
t_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
t_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
t_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h t_req.c
 | 
			
		||||
t_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_req.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
 | 
			
		||||
t_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
t_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
t_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
t_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
t_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
t_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
t_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
 | 
			
		||||
t_req.o: ../cryptlib.h t_req.c
 | 
			
		||||
t_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
t_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
t_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
t_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
t_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
t_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
t_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
t_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
t_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
t_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
t_spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
t_spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_spki.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
t_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
t_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
t_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
t_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
t_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
t_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
t_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_spki.c
 | 
			
		||||
t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
t_spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
t_spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
t_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
t_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
t_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
t_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
t_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
t_spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
t_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
t_spki.o: ../cryptlib.h t_spki.c
 | 
			
		||||
t_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
t_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
t_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
t_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
 | 
			
		||||
t_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
t_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
t_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
t_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
t_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
t_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
t_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
t_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
t_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
t_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
t_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
t_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
t_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
t_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
t_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
t_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h t_x509.c
 | 
			
		||||
t_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
 | 
			
		||||
t_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
t_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
t_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
t_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
t_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
t_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
t_x509.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
 | 
			
		||||
t_x509.o: ../cryptlib.h t_x509.c
 | 
			
		||||
t_x509a.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
t_x509a.o: ../cryptlib.h t_x509a.c
 | 
			
		||||
t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
t_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_x509a.c
 | 
			
		||||
tasn_dec.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
tasn_dec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
 | 
			
		||||
tasn_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 | 
			
		||||
@@ -870,7 +841,6 @@ x_algor.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_algor.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -892,8 +862,7 @@ x_attrib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -924,7 +893,6 @@ x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -946,7 +914,6 @@ x_exten.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_exten.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -962,27 +929,26 @@ x_exten.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
x_exten.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
x_exten.o: x_exten.c
 | 
			
		||||
x_info.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
x_info.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
x_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
x_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
x_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
x_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
x_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
x_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
x_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
x_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
x_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
x_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
x_info.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
x_info.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
x_info.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_info.c
 | 
			
		||||
x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
x_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
x_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
x_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
x_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
x_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
x_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
x_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
x_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
x_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
x_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
x_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
x_info.o: ../cryptlib.h x_info.c
 | 
			
		||||
x_long.o: ../../e_os.h ../../include/openssl/asn1.h
 | 
			
		||||
x_long.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
 | 
			
		||||
x_long.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
@@ -999,7 +965,6 @@ x_name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_name.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -1015,28 +980,26 @@ x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
x_name.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c
 | 
			
		||||
x_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
 | 
			
		||||
x_pkey.o: ../cryptlib.h x_pkey.c
 | 
			
		||||
x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
 | 
			
		||||
x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_pkey.c
 | 
			
		||||
x_pubkey.o: ../../e_os.h ../../include/openssl/aes.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
 | 
			
		||||
@@ -1044,8 +1007,7 @@ x_pubkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -1067,7 +1029,6 @@ x_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -1089,7 +1050,6 @@ x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_sig.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_sig.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_sig.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_sig.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -1111,7 +1071,6 @@ x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -1133,7 +1092,6 @@ x_val.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_val.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
x_val.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
 | 
			
		||||
x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 | 
			
		||||
x_val.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
 | 
			
		||||
x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
x_val.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
x_val.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
@@ -1155,8 +1113,7 @@ x_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
x_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
 | 
			
		||||
x_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
x_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
@@ -1178,8 +1135,7 @@ x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
 
 | 
			
		||||
@@ -120,6 +120,12 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
 | 
			
		||||
	unsigned char *p,*s;
 | 
			
		||||
	int i;
 | 
			
		||||
 | 
			
		||||
	if (len < 1)
 | 
			
		||||
		{
 | 
			
		||||
		i=ASN1_R_STRING_TOO_SHORT;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if ((a == NULL) || ((*a) == NULL))
 | 
			
		||||
		{
 | 
			
		||||
		if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);
 | 
			
		||||
@@ -185,7 +191,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
 | 
			
		||||
		if (a->data == NULL)
 | 
			
		||||
			c=(unsigned char *)OPENSSL_malloc(w+1);
 | 
			
		||||
		else
 | 
			
		||||
			c=(unsigned char *)OPENSSL_realloc(a->data,w+1);
 | 
			
		||||
			c=(unsigned char *)OPENSSL_realloc_clean(a->data,
 | 
			
		||||
								 a->length,
 | 
			
		||||
								 w+1);
 | 
			
		||||
		if (c == NULL) return(0);
 | 
			
		||||
		if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length);
 | 
			
		||||
		a->data=c;
 | 
			
		||||
 
 | 
			
		||||
@@ -285,7 +285,7 @@ static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c)
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (!BUF_MEM_grow(&b,num+os->length))
 | 
			
		||||
		if (!BUF_MEM_grow_clean(&b,num+os->length))
 | 
			
		||||
			{
 | 
			
		||||
			c->error=ERR_R_BUF_LIB;
 | 
			
		||||
			goto err;
 | 
			
		||||
 
 | 
			
		||||
@@ -149,7 +149,12 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
 | 
			
		||||
	ASN1_CTX c;
 | 
			
		||||
	int want=HEADER_SIZE;
 | 
			
		||||
	int eos=0;
 | 
			
		||||
#if defined(__GNUC__) && defined(__ia64)
 | 
			
		||||
	/* pathetic compiler bug in all known versions as of Nov. 2002 */
 | 
			
		||||
	long off=0;
 | 
			
		||||
#else
 | 
			
		||||
	int off=0;
 | 
			
		||||
#endif
 | 
			
		||||
	int len=0;
 | 
			
		||||
 | 
			
		||||
	b=BUF_MEM_new();
 | 
			
		||||
@@ -166,7 +171,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
 | 
			
		||||
			{
 | 
			
		||||
			want-=(len-off);
 | 
			
		||||
 | 
			
		||||
			if (!BUF_MEM_grow(b,len+want))
 | 
			
		||||
			if (!BUF_MEM_grow_clean(b,len+want))
 | 
			
		||||
				{
 | 
			
		||||
				ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
 | 
			
		||||
				goto err;
 | 
			
		||||
@@ -221,18 +226,23 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
 | 
			
		||||
			if (want > (len-off))
 | 
			
		||||
				{
 | 
			
		||||
				want-=(len-off);
 | 
			
		||||
				if (!BUF_MEM_grow(b,len+want))
 | 
			
		||||
				if (!BUF_MEM_grow_clean(b,len+want))
 | 
			
		||||
					{
 | 
			
		||||
					ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
 | 
			
		||||
					goto err;
 | 
			
		||||
					}
 | 
			
		||||
				i=BIO_read(in,&(b->data[len]),want);
 | 
			
		||||
				if (i <= 0)
 | 
			
		||||
				while (want > 0)
 | 
			
		||||
					{
 | 
			
		||||
					ASN1err(ASN1_F_ASN1_D2I_BIO,ASN1_R_NOT_ENOUGH_DATA);
 | 
			
		||||
					goto err;
 | 
			
		||||
					i=BIO_read(in,&(b->data[len]),want);
 | 
			
		||||
					if (i <= 0)
 | 
			
		||||
						{
 | 
			
		||||
						ASN1err(ASN1_F_ASN1_D2I_BIO,
 | 
			
		||||
						    ASN1_R_NOT_ENOUGH_DATA);
 | 
			
		||||
						goto err;
 | 
			
		||||
						}
 | 
			
		||||
					len+=i;
 | 
			
		||||
					want -= i;
 | 
			
		||||
					}
 | 
			
		||||
				len+=i;
 | 
			
		||||
				}
 | 
			
		||||
			off+=(int)c.slen;
 | 
			
		||||
			if (eos <= 0)
 | 
			
		||||
 
 | 
			
		||||
@@ -183,8 +183,8 @@ int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a)
 | 
			
		||||
 | 
			
		||||
	if ((a == NULL) || (a->data == NULL))
 | 
			
		||||
		return(BIO_write(bp,"NULL",4));
 | 
			
		||||
	i=i2t_ASN1_OBJECT(buf,80,a);
 | 
			
		||||
	if (i > 80) i=80;
 | 
			
		||||
	i=i2t_ASN1_OBJECT(buf,sizeof buf,a);
 | 
			
		||||
	if (i > sizeof buf) i=sizeof buf;
 | 
			
		||||
	BIO_write(bp,buf,i);
 | 
			
		||||
	return(i);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -204,9 +204,9 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
 | 
			
		||||
err:
 | 
			
		||||
	EVP_MD_CTX_cleanup(&ctx);
 | 
			
		||||
	if (buf_in != NULL)
 | 
			
		||||
		{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
 | 
			
		||||
		{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
 | 
			
		||||
	if (buf_out != NULL)
 | 
			
		||||
		{ memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
 | 
			
		||||
		{ OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
 | 
			
		||||
	return(outl);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -287,8 +287,8 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
 | 
			
		||||
err:
 | 
			
		||||
	EVP_MD_CTX_cleanup(&ctx);
 | 
			
		||||
	if (buf_in != NULL)
 | 
			
		||||
		{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
 | 
			
		||||
		{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
 | 
			
		||||
	if (buf_out != NULL)
 | 
			
		||||
		{ memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
 | 
			
		||||
		{ OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
 | 
			
		||||
	return(outl);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -63,6 +63,7 @@
 | 
			
		||||
#include <openssl/asn1.h>
 | 
			
		||||
 | 
			
		||||
#include "charmap.h"
 | 
			
		||||
#include "cryptlib.h"
 | 
			
		||||
 | 
			
		||||
/* ASN1_STRING_print_ex() and X509_NAME_print_ex().
 | 
			
		||||
 * Enhanced string and name printing routines handling
 | 
			
		||||
@@ -114,14 +115,17 @@ typedef int char_io(void *arg, const void *buf, int len);
 | 
			
		||||
static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, char_io *io_ch, void *arg)
 | 
			
		||||
{
 | 
			
		||||
	unsigned char chflgs, chtmp;
 | 
			
		||||
	char tmphex[11];
 | 
			
		||||
	char tmphex[HEX_SIZE(long)+3];
 | 
			
		||||
 | 
			
		||||
	if(c > 0xffffffffL)
 | 
			
		||||
		return -1;
 | 
			
		||||
	if(c > 0xffff) {
 | 
			
		||||
		BIO_snprintf(tmphex, 11, "\\W%08lX", c);
 | 
			
		||||
		BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
 | 
			
		||||
		if(!io_ch(arg, tmphex, 10)) return -1;
 | 
			
		||||
		return 10;
 | 
			
		||||
	}
 | 
			
		||||
	if(c > 0xff) {
 | 
			
		||||
		BIO_snprintf(tmphex, 11, "\\U%04lX", c);
 | 
			
		||||
		BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
 | 
			
		||||
		if(!io_ch(arg, tmphex, 6)) return -1;
 | 
			
		||||
		return 6;
 | 
			
		||||
	}
 | 
			
		||||
@@ -195,7 +199,7 @@ static int do_buf(unsigned char *buf, int buflen,
 | 
			
		||||
		if(type & BUF_TYPE_CONVUTF8) {
 | 
			
		||||
			unsigned char utfbuf[6];
 | 
			
		||||
			int utflen;
 | 
			
		||||
			utflen = UTF8_putc(utfbuf, 6, c);
 | 
			
		||||
			utflen = UTF8_putc(utfbuf, sizeof utfbuf, c);
 | 
			
		||||
			for(i = 0; i < utflen; i++) {
 | 
			
		||||
				/* We don't need to worry about setting orflags correctly
 | 
			
		||||
				 * because if utflen==1 its value will be correct anyway 
 | 
			
		||||
@@ -461,7 +465,7 @@ static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n,
 | 
			
		||||
		if(fn_opt != XN_FLAG_FN_NONE) {
 | 
			
		||||
			int objlen, fld_len;
 | 
			
		||||
			if((fn_opt == XN_FLAG_FN_OID) || (fn_nid==NID_undef) ) {
 | 
			
		||||
				OBJ_obj2txt(objtmp, 80, fn, 1);
 | 
			
		||||
				OBJ_obj2txt(objtmp, sizeof objtmp, fn, 1);
 | 
			
		||||
				fld_len = 0; /* XXX: what should this be? */
 | 
			
		||||
				objbuf = objtmp;
 | 
			
		||||
			} else {
 | 
			
		||||
@@ -544,7 +548,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
 | 
			
		||||
{
 | 
			
		||||
	ASN1_STRING stmp, *str = &stmp;
 | 
			
		||||
	int mbflag, type, ret;
 | 
			
		||||
	if(!*out || !in) return -1;
 | 
			
		||||
	if(!in) return -1;
 | 
			
		||||
	type = in->type;
 | 
			
		||||
	if((type < 0) || (type > 30)) return -1;
 | 
			
		||||
	mbflag = tag2nbyte[type];
 | 
			
		||||
@@ -553,6 +557,6 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
 | 
			
		||||
	stmp.data = NULL;
 | 
			
		||||
	ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
 | 
			
		||||
	if(ret < 0) return ret;
 | 
			
		||||
	if(out) *out = stmp.data;
 | 
			
		||||
	*out = stmp.data;
 | 
			
		||||
	return stmp.length;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -152,7 +152,7 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
 | 
			
		||||
	if (t->data[0] >= '5') strcpy(str, "19");
 | 
			
		||||
	else strcpy(str, "20");
 | 
			
		||||
 | 
			
		||||
	strcat(str, (char *)t->data);
 | 
			
		||||
	BUF_strlcat(str, (char *)t->data, t->length+2);
 | 
			
		||||
 | 
			
		||||
	return ret;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,7 @@
 | 
			
		||||
 | 
			
		||||
int ASN1_TYPE_get(ASN1_TYPE *a)
 | 
			
		||||
	{
 | 
			
		||||
	if (a->value.ptr != NULL)
 | 
			
		||||
	if ((a->value.ptr != NULL) || (a->type == V_ASN1_NULL))
 | 
			
		||||
		return(a->type);
 | 
			
		||||
	else
 | 
			
		||||
		return(0);
 | 
			
		||||
 
 | 
			
		||||
@@ -103,7 +103,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
 | 
			
		||||
	EVP_VerifyInit_ex(&ctx,type, NULL);
 | 
			
		||||
	EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
 | 
			
		||||
 | 
			
		||||
	memset(buf_in,0,(unsigned int)inl);
 | 
			
		||||
	OPENSSL_cleanse(buf_in,(unsigned int)inl);
 | 
			
		||||
	OPENSSL_free(buf_in);
 | 
			
		||||
 | 
			
		||||
	if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
 | 
			
		||||
@@ -153,7 +153,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
 | 
			
		||||
	EVP_VerifyInit_ex(&ctx,type, NULL);
 | 
			
		||||
	EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
 | 
			
		||||
 | 
			
		||||
	memset(buf_in,0,(unsigned int)inl);
 | 
			
		||||
	OPENSSL_cleanse(buf_in,(unsigned int)inl);
 | 
			
		||||
	OPENSSL_free(buf_in);
 | 
			
		||||
 | 
			
		||||
	if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,6 @@
 | 
			
		||||
 | 
			
		||||
#include <openssl/symhacks.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/e_os2.h>
 | 
			
		||||
#include <openssl/ossl_typ.h>
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
 | 
			
		||||
@@ -1009,13 +1008,12 @@ void ERR_load_ASN1_strings(void);
 | 
			
		||||
#define ASN1_F_D2I_X509_PKEY				 159
 | 
			
		||||
#define ASN1_F_I2D_ASN1_TIME				 160
 | 
			
		||||
#define ASN1_F_I2D_DSA_PUBKEY				 161
 | 
			
		||||
#define ASN1_F_I2D_ECDSA_PUBKEY				 174
 | 
			
		||||
#define ASN1_F_I2D_NETSCAPE_RSA				 162
 | 
			
		||||
#define ASN1_F_I2D_PRIVATEKEY				 163
 | 
			
		||||
#define ASN1_F_I2D_PUBLICKEY				 164
 | 
			
		||||
#define ASN1_F_I2D_RSA_PUBKEY				 165
 | 
			
		||||
#define ASN1_F_LONG_C2I					 166
 | 
			
		||||
#define ASN1_F_OID_MODULE_INIT				 175
 | 
			
		||||
#define ASN1_F_OID_MODULE_INIT				 174
 | 
			
		||||
#define ASN1_F_PKCS5_PBE2_SET				 167
 | 
			
		||||
#define ASN1_F_X509_CINF_NEW				 168
 | 
			
		||||
#define ASN1_F_X509_CRL_ADD0_REVOKED			 169
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
/* crypto/asn1/asn1_err.c */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1999-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1999 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
 | 
			
		||||
@@ -128,7 +128,6 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 | 
			
		||||
{ERR_PACK(0,ASN1_F_D2I_X509_PKEY,0),	"d2i_X509_PKEY"},
 | 
			
		||||
{ERR_PACK(0,ASN1_F_I2D_ASN1_TIME,0),	"I2D_ASN1_TIME"},
 | 
			
		||||
{ERR_PACK(0,ASN1_F_I2D_DSA_PUBKEY,0),	"i2d_DSA_PUBKEY"},
 | 
			
		||||
{ERR_PACK(0,ASN1_F_I2D_ECDSA_PUBKEY,0),	"i2d_ECDSA_PUBKEY"},
 | 
			
		||||
{ERR_PACK(0,ASN1_F_I2D_NETSCAPE_RSA,0),	"i2d_Netscape_RSA"},
 | 
			
		||||
{ERR_PACK(0,ASN1_F_I2D_PRIVATEKEY,0),	"i2d_PrivateKey"},
 | 
			
		||||
{ERR_PACK(0,ASN1_F_I2D_PUBLICKEY,0),	"i2d_PublicKey"},
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,7 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include "cryptlib.h"
 | 
			
		||||
#include <openssl/asn1.h>
 | 
			
		||||
#include <openssl/asn1_mac.h>
 | 
			
		||||
@@ -124,15 +125,13 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
 | 
			
		||||
		(int)(omax+ *pp));
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
	if ((p+ *plength) > (omax+ *pp))
 | 
			
		||||
	if (*plength > (omax - (p - *pp)))
 | 
			
		||||
		{
 | 
			
		||||
		ASN1err(ASN1_F_ASN1_GET_OBJECT,ASN1_R_TOO_LONG);
 | 
			
		||||
		/* Set this so that even if things are not long enough
 | 
			
		||||
		 * the values are set correctly */
 | 
			
		||||
		ret|=0x80;
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	*pp=p;
 | 
			
		||||
	return(ret|inf);
 | 
			
		||||
err:
 | 
			
		||||
@@ -143,7 +142,7 @@ err:
 | 
			
		||||
static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
 | 
			
		||||
	{
 | 
			
		||||
	unsigned char *p= *pp;
 | 
			
		||||
	long ret=0;
 | 
			
		||||
	unsigned long ret=0;
 | 
			
		||||
	int i;
 | 
			
		||||
 | 
			
		||||
	if (max-- < 1) return(0);
 | 
			
		||||
@@ -159,6 +158,8 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
 | 
			
		||||
		i= *p&0x7f;
 | 
			
		||||
		if (*(p++) & 0x80)
 | 
			
		||||
			{
 | 
			
		||||
			if (i > sizeof(long))
 | 
			
		||||
				return 0;
 | 
			
		||||
			if (max-- == 0) return(0);
 | 
			
		||||
			while (i-- > 0)
 | 
			
		||||
				{
 | 
			
		||||
@@ -170,8 +171,10 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
 | 
			
		||||
		else
 | 
			
		||||
			ret=i;
 | 
			
		||||
		}
 | 
			
		||||
	if (ret > LONG_MAX)
 | 
			
		||||
		return 0;
 | 
			
		||||
	*pp=p;
 | 
			
		||||
	*rl=ret;
 | 
			
		||||
	*rl=(long)ret;
 | 
			
		||||
	return(1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -407,7 +410,7 @@ int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b)
 | 
			
		||||
 | 
			
		||||
void asn1_add_error(unsigned char *address, int offset)
 | 
			
		||||
	{
 | 
			
		||||
	char buf1[16],buf2[16];
 | 
			
		||||
	char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1];
 | 
			
		||||
 | 
			
		||||
	sprintf(buf1,"%lu",(unsigned long)address);
 | 
			
		||||
	sprintf(buf2,"%d",offset);
 | 
			
		||||
 
 | 
			
		||||
@@ -79,12 +79,7 @@ static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
 | 
			
		||||
	else
 | 
			
		||||
		p="prim: ";
 | 
			
		||||
	if (BIO_write(bp,p,6) < 6) goto err;
 | 
			
		||||
	if (indent)
 | 
			
		||||
		{
 | 
			
		||||
		if (indent > 128) indent=128;
 | 
			
		||||
		memset(str,' ',indent);
 | 
			
		||||
		if (BIO_write(bp,str,indent) < indent) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	BIO_indent(bp,indent,128);
 | 
			
		||||
 | 
			
		||||
	p=str;
 | 
			
		||||
	if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
 | 
			
		||||
@@ -261,11 +256,9 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset,
 | 
			
		||||
 | 
			
		||||
				opp=op;
 | 
			
		||||
				os=d2i_ASN1_OCTET_STRING(NULL,&opp,len+hl);
 | 
			
		||||
				if (os != NULL && os->length > 0)
 | 
			
		||||
				if (os != NULL)
 | 
			
		||||
					{
 | 
			
		||||
					opp = os->data;
 | 
			
		||||
					/* testing whether the octet string is
 | 
			
		||||
					 * printable */
 | 
			
		||||
					opp=os->data;
 | 
			
		||||
					for (i=0; i<os->length; i++)
 | 
			
		||||
						{
 | 
			
		||||
						if ((	(opp[i] < ' ') &&
 | 
			
		||||
@@ -278,8 +271,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset,
 | 
			
		||||
							break;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					if (printable)
 | 
			
		||||
					/* printable string */
 | 
			
		||||
					if (printable && (os->length > 0))
 | 
			
		||||
						{
 | 
			
		||||
						if (BIO_write(bp,":",1) <= 0)
 | 
			
		||||
							goto end;
 | 
			
		||||
@@ -287,21 +279,8 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset,
 | 
			
		||||
							os->length) <= 0)
 | 
			
		||||
							goto end;
 | 
			
		||||
						}
 | 
			
		||||
					else if (!dump)
 | 
			
		||||
					/* not printable => print octet string
 | 
			
		||||
					 * as hex dump */
 | 
			
		||||
						{
 | 
			
		||||
						if (BIO_write(bp,"[HEX DUMP]:",11) <= 0)
 | 
			
		||||
							goto end;
 | 
			
		||||
						for (i=0; i<os->length; i++)
 | 
			
		||||
							{
 | 
			
		||||
							if (BIO_printf(bp,"%02X"
 | 
			
		||||
								, opp[i]) <= 0)
 | 
			
		||||
								goto end;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					else
 | 
			
		||||
					/* print the normal dump */
 | 
			
		||||
					if (!printable && (os->length > 0)
 | 
			
		||||
						&& dump)
 | 
			
		||||
						{
 | 
			
		||||
						if (!nl) 
 | 
			
		||||
							{
 | 
			
		||||
@@ -309,15 +288,11 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset,
 | 
			
		||||
								goto end;
 | 
			
		||||
							}
 | 
			
		||||
						if (BIO_dump_indent(bp,(char *)opp,
 | 
			
		||||
							((dump == -1 || dump > 
 | 
			
		||||
							os->length)?os->length:dump),
 | 
			
		||||
							((dump == -1 || dump > os->length)?os->length:dump),
 | 
			
		||||
							dump_indent) <= 0)
 | 
			
		||||
							goto end;
 | 
			
		||||
						nl=1;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				if (os != NULL)
 | 
			
		||||
					{
 | 
			
		||||
					M_ASN1_OCTET_STRING_free(os);
 | 
			
		||||
					os=NULL;
 | 
			
		||||
					}
 | 
			
		||||
 
 | 
			
		||||
@@ -68,9 +68,6 @@
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
 | 
			
		||||
	     long length)
 | 
			
		||||
@@ -110,16 +107,6 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		break;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	case EVP_PKEY_ECDSA:
 | 
			
		||||
		if ((ret->pkey.ecdsa = d2i_ECDSAPrivateKey(NULL, 
 | 
			
		||||
			(const unsigned char **)pp, length)) == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB);
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		break;
 | 
			
		||||
#endif
 | 
			
		||||
	default:
 | 
			
		||||
		ASN1err(ASN1_F_D2I_PRIVATEKEY,ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
 | 
			
		||||
@@ -151,10 +138,7 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, unsigned char **pp,
 | 
			
		||||
	/* Since we only need to discern "traditional format" RSA and DSA
 | 
			
		||||
	 * keys we can just count the elements.
 | 
			
		||||
         */
 | 
			
		||||
	if(sk_ASN1_TYPE_num(inkey) == 6) 
 | 
			
		||||
		keytype = EVP_PKEY_DSA;
 | 
			
		||||
	else if (sk_ASN1_TYPE_num(inkey) == 4)
 | 
			
		||||
		keytype = EVP_PKEY_ECDSA;
 | 
			
		||||
	if(sk_ASN1_TYPE_num(inkey) == 6) keytype = EVP_PKEY_DSA;
 | 
			
		||||
	else keytype = EVP_PKEY_RSA;
 | 
			
		||||
	sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free);
 | 
			
		||||
	return d2i_PrivateKey(keytype, a, pp, length);
 | 
			
		||||
 
 | 
			
		||||
@@ -68,9 +68,6 @@
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
 | 
			
		||||
	     long length)
 | 
			
		||||
@@ -103,23 +100,13 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	case EVP_PKEY_DSA:
 | 
			
		||||
		if ((ret->pkey.dsa=d2i_DSAPublicKey(&(ret->pkey.dsa),
 | 
			
		||||
		if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,
 | 
			
		||||
			(const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
 | 
			
		||||
			{
 | 
			
		||||
			ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		break;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	case EVP_PKEY_ECDSA:
 | 
			
		||||
		if ((ret->pkey.ecdsa = ECDSAPublicKey_set_octet_string(&(ret->pkey.ecdsa), 
 | 
			
		||||
			(const unsigned char **)pp, length)) == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB);
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
	break;
 | 
			
		||||
#endif
 | 
			
		||||
	default:
 | 
			
		||||
		ASN1err(ASN1_F_D2I_PUBLICKEY,ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
 | 
			
		||||
 
 | 
			
		||||
@@ -169,8 +169,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
 | 
			
		||||
				sp=(unsigned char *)OPENSSL_malloc(
 | 
			
		||||
					(unsigned int)num+i*2);
 | 
			
		||||
			else
 | 
			
		||||
				sp=(unsigned char *)OPENSSL_realloc(s,
 | 
			
		||||
					(unsigned int)num+i*2);
 | 
			
		||||
				sp=OPENSSL_realloc_clean(s,slen,num+i*2);
 | 
			
		||||
			if (sp == NULL)
 | 
			
		||||
				{
 | 
			
		||||
				ASN1err(ASN1_F_A2I_ASN1_INTEGER,ERR_R_MALLOC_FAILURE);
 | 
			
		||||
 
 | 
			
		||||
@@ -67,9 +67,6 @@
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
 | 
			
		||||
	{
 | 
			
		||||
@@ -86,12 +83,6 @@ int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
 | 
			
		||||
		return(i2d_DSAPrivateKey(a->pkey.dsa,pp));
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	if (a->type == EVP_PKEY_ECDSA)
 | 
			
		||||
		{
 | 
			
		||||
		return(i2d_ECDSAPrivateKey(a->pkey.ecdsa, pp));
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	ASN1err(ASN1_F_I2D_PRIVATEKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
 | 
			
		||||
	return(-1);
 | 
			
		||||
 
 | 
			
		||||
@@ -67,9 +67,6 @@
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
 | 
			
		||||
	{
 | 
			
		||||
@@ -82,10 +79,6 @@ int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	case EVP_PKEY_DSA:
 | 
			
		||||
		return(i2d_DSAPublicKey(a->pkey.dsa,pp));
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	case EVP_PKEY_ECDSA:
 | 
			
		||||
		return(ECDSAPublicKey_get_octet_string(a->pkey.ecdsa, pp));
 | 
			
		||||
#endif
 | 
			
		||||
	default:
 | 
			
		||||
		ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
 | 
			
		||||
 
 | 
			
		||||
@@ -187,7 +187,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey)
 | 
			
		||||
	i2d_NETSCAPE_PKEY(pkey,&zz);
 | 
			
		||||
 | 
			
		||||
	/* Wipe the private key encoding */
 | 
			
		||||
	memset(pkey->private_key->data, 0, rsalen);
 | 
			
		||||
	OPENSSL_cleanse(pkey->private_key->data, rsalen);
 | 
			
		||||
		
 | 
			
		||||
	if (cb == NULL)
 | 
			
		||||
		cb=EVP_read_pw_string;
 | 
			
		||||
@@ -206,7 +206,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
 | 
			
		||||
	memset(buf,0,256);
 | 
			
		||||
	OPENSSL_cleanse(buf,256);
 | 
			
		||||
 | 
			
		||||
	/* Encrypt private key in place */
 | 
			
		||||
	zz = enckey->enckey->digest->data;
 | 
			
		||||
@@ -294,7 +294,7 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
 | 
			
		||||
	}
 | 
			
		||||
		
 | 
			
		||||
	EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
 | 
			
		||||
	memset(buf,0,256);
 | 
			
		||||
	OPENSSL_cleanse(buf,256);
 | 
			
		||||
 | 
			
		||||
	EVP_CIPHER_CTX_init(&ctx);
 | 
			
		||||
	EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL);
 | 
			
		||||
 
 | 
			
		||||
@@ -68,8 +68,8 @@ static int pkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
 | 
			
		||||
	if(operation == ASN1_OP_FREE_PRE) {
 | 
			
		||||
		PKCS8_PRIV_KEY_INFO *key = (PKCS8_PRIV_KEY_INFO *)*pval;
 | 
			
		||||
		if (key->pkey->value.octet_string)
 | 
			
		||||
		memset(key->pkey->value.octet_string->data,
 | 
			
		||||
				 0, key->pkey->value.octet_string->length);
 | 
			
		||||
		OPENSSL_cleanse(key->pkey->value.octet_string->data,
 | 
			
		||||
			key->pkey->value.octet_string->length);
 | 
			
		||||
	}
 | 
			
		||||
	return 1;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -84,11 +84,11 @@ int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
 | 
			
		||||
 | 
			
		||||
int X509_CRL_print(BIO *out, X509_CRL *x)
 | 
			
		||||
{
 | 
			
		||||
	char buf[256];
 | 
			
		||||
	STACK_OF(X509_REVOKED) *rev;
 | 
			
		||||
	X509_REVOKED *r;
 | 
			
		||||
	long l;
 | 
			
		||||
	int i, n;
 | 
			
		||||
	char *p;
 | 
			
		||||
 | 
			
		||||
	BIO_printf(out, "Certificate Revocation List (CRL):\n");
 | 
			
		||||
	l = X509_CRL_get_version(x);
 | 
			
		||||
@@ -96,8 +96,9 @@ int X509_CRL_print(BIO *out, X509_CRL *x)
 | 
			
		||||
	i = OBJ_obj2nid(x->sig_alg->algorithm);
 | 
			
		||||
	BIO_printf(out, "%8sSignature Algorithm: %s\n", "",
 | 
			
		||||
				 (i == NID_undef) ? "NONE" : OBJ_nid2ln(i));
 | 
			
		||||
	X509_NAME_oneline(X509_CRL_get_issuer(x),buf,256);
 | 
			
		||||
	BIO_printf(out,"%8sIssuer: %s\n","",buf);
 | 
			
		||||
	p=X509_NAME_oneline(X509_CRL_get_issuer(x),NULL,0);
 | 
			
		||||
	BIO_printf(out,"%8sIssuer: %s\n","",p);
 | 
			
		||||
	OPENSSL_free(p);
 | 
			
		||||
	BIO_printf(out,"%8sLast Update: ","");
 | 
			
		||||
	ASN1_TIME_print(out,X509_CRL_get_lastUpdate(x));
 | 
			
		||||
	BIO_printf(out,"\n%8sNext Update: ","");
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,6 @@
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include "cryptlib.h"
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/buffer.h>
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
@@ -70,29 +69,26 @@
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#include <openssl/dsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int print(BIO *fp,const char *str,BIGNUM *num,
 | 
			
		||||
		unsigned char *buf,int off);
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
#ifndef OPENSSL_NO_FP_API
 | 
			
		||||
int RSA_print_fp(FILE *fp, const RSA *x, int off)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *b;
 | 
			
		||||
	int ret;
 | 
			
		||||
        {
 | 
			
		||||
        BIO *b;
 | 
			
		||||
        int ret;
 | 
			
		||||
 | 
			
		||||
	if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
        if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		RSAerr(RSA_F_RSA_PRINT_FP,ERR_R_BUF_LIB);
 | 
			
		||||
		return(0);
 | 
			
		||||
                return(0);
 | 
			
		||||
		}
 | 
			
		||||
	BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
	ret=RSA_print(b,x,off);
 | 
			
		||||
	BIO_free(b);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
        BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
        ret=RSA_print(b,x,off);
 | 
			
		||||
        BIO_free(b);
 | 
			
		||||
        return(ret);
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int RSA_print(BIO *bp, const RSA *x, int off)
 | 
			
		||||
@@ -134,14 +130,10 @@ int RSA_print(BIO *bp, const RSA *x, int off)
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (off)
 | 
			
		||||
		{
 | 
			
		||||
		if (off > 128) off=128;
 | 
			
		||||
		memset(str,' ',off);
 | 
			
		||||
		}
 | 
			
		||||
	if (x->d != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		if (off && (BIO_write(bp,str,off) <= 0)) goto err;
 | 
			
		||||
		if(!BIO_indent(bp,off,128))
 | 
			
		||||
		   goto err;
 | 
			
		||||
		if (BIO_printf(bp,"Private-Key: (%d bit)\n",BN_num_bits(x->n))
 | 
			
		||||
			<= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
@@ -187,7 +179,6 @@ int DSA_print_fp(FILE *fp, const DSA *x, int off)
 | 
			
		||||
 | 
			
		||||
int DSA_print(BIO *bp, const DSA *x, int off)
 | 
			
		||||
	{
 | 
			
		||||
	char str[128];
 | 
			
		||||
	unsigned char *m=NULL;
 | 
			
		||||
	int ret=0;
 | 
			
		||||
	size_t buf_len=0,i;
 | 
			
		||||
@@ -214,14 +205,10 @@ int DSA_print(BIO *bp, const DSA *x, int off)
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (off)
 | 
			
		||||
		{
 | 
			
		||||
		if (off > 128) off=128;
 | 
			
		||||
		memset(str,' ',off);
 | 
			
		||||
		}
 | 
			
		||||
	if (x->priv_key != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		if (off && (BIO_write(bp,str,off) <= 0)) goto err;
 | 
			
		||||
		if(!BIO_indent(bp,off,128))
 | 
			
		||||
		   goto err;
 | 
			
		||||
		if (BIO_printf(bp,"Private-Key: (%d bit)\n",BN_num_bits(x->p))
 | 
			
		||||
			<= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
@@ -240,308 +227,16 @@ err:
 | 
			
		||||
	}
 | 
			
		||||
#endif /* !OPENSSL_NO_DSA */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_EC
 | 
			
		||||
#ifndef OPENSSL_NO_FP_API
 | 
			
		||||
int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *b;
 | 
			
		||||
	int ret;
 | 
			
		||||
 | 
			
		||||
	if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		ECerr(EC_F_ECPKPARAMETERS_PRINT_FP,ERR_R_BUF_LIB);
 | 
			
		||||
		return(0);
 | 
			
		||||
		}
 | 
			
		||||
	BIO_set_fp(b, fp, BIO_NOCLOSE);
 | 
			
		||||
	ret = ECPKParameters_print(b, x, off);
 | 
			
		||||
	BIO_free(b);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
 | 
			
		||||
	{
 | 
			
		||||
	char str[128];
 | 
			
		||||
	unsigned char *buffer=NULL;
 | 
			
		||||
	size_t	buf_len=0, i;
 | 
			
		||||
	int     ret=0, reason=ERR_R_BIO_LIB;
 | 
			
		||||
	BN_CTX  *ctx=NULL;
 | 
			
		||||
	EC_POINT *point=NULL;
 | 
			
		||||
	BIGNUM	*p=NULL, *a=NULL, *b=NULL, *gen=NULL,
 | 
			
		||||
		*order=NULL, *cofactor=NULL, *seed=NULL;
 | 
			
		||||
	
 | 
			
		||||
	static const char *gen_compressed = "Generator (compressed):";
 | 
			
		||||
	static const char *gen_uncompressed = "Generator (uncompressed):";
 | 
			
		||||
	static const char *gen_hybrid = "Generator (hybrid):";
 | 
			
		||||
 
 | 
			
		||||
	if (!x)
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_PASSED_NULL_PARAMETER;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (EC_GROUP_get_asn1_flag(x))
 | 
			
		||||
		{
 | 
			
		||||
		/* the curve parameter are given by an asn1 OID */
 | 
			
		||||
		int nid;
 | 
			
		||||
 | 
			
		||||
		if (off)
 | 
			
		||||
			{
 | 
			
		||||
			if (off > 128)
 | 
			
		||||
				off=128;
 | 
			
		||||
			memset(str, ' ', off);
 | 
			
		||||
			if (BIO_write(bp, str, off) <= 0)
 | 
			
		||||
				goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		nid = EC_GROUP_get_nid(x);
 | 
			
		||||
		if (nid == 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
 | 
			
		||||
		if (BIO_printf(bp, "ASN1 OID: %s", OBJ_nid2sn(nid)) <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		if (BIO_printf(bp, "\n") <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		/* explicit parameters */
 | 
			
		||||
		/* TODO */
 | 
			
		||||
		point_conversion_form_t form;
 | 
			
		||||
 | 
			
		||||
		if ((p = BN_new()) == NULL || (a = BN_new()) == NULL ||
 | 
			
		||||
			(b = BN_new()) == NULL || (order = BN_new()) == NULL ||
 | 
			
		||||
			(cofactor = BN_new()) == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			reason = ERR_R_MALLOC_FAILURE;
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx))
 | 
			
		||||
			{
 | 
			
		||||
			reason = ERR_R_EC_LIB;
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if ((point = EC_GROUP_get0_generator(x)) == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			reason = ERR_R_EC_LIB;
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		if (!EC_GROUP_get_order(x, order, NULL) || 
 | 
			
		||||
            		!EC_GROUP_get_cofactor(x, cofactor, NULL))
 | 
			
		||||
			{
 | 
			
		||||
			reason = ERR_R_EC_LIB;
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		
 | 
			
		||||
		form = EC_GROUP_get_point_conversion_form(x);
 | 
			
		||||
 | 
			
		||||
		if ((gen = EC_POINT_point2bn(x, point, 
 | 
			
		||||
				form, NULL, ctx)) == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			reason = ERR_R_EC_LIB;
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		buf_len = (size_t)BN_num_bytes(p);
 | 
			
		||||
		if (buf_len < (i = (size_t)BN_num_bytes(a)))
 | 
			
		||||
			buf_len = i;
 | 
			
		||||
		if (buf_len < (i = (size_t)BN_num_bytes(b)))
 | 
			
		||||
			buf_len = i;
 | 
			
		||||
		if (buf_len < (i = (size_t)BN_num_bytes(gen)))
 | 
			
		||||
			buf_len = i;
 | 
			
		||||
		if (buf_len < (i = (size_t)BN_num_bytes(order)))
 | 
			
		||||
			buf_len = i;
 | 
			
		||||
		if (buf_len < (i = (size_t)BN_num_bytes(cofactor))) 
 | 
			
		||||
			buf_len = i;
 | 
			
		||||
 | 
			
		||||
		if (EC_GROUP_get0_seed(x))
 | 
			
		||||
			{
 | 
			
		||||
			seed = BN_bin2bn(EC_GROUP_get0_seed(x),
 | 
			
		||||
				EC_GROUP_get_seed_len(x), NULL);
 | 
			
		||||
			if (seed == NULL)
 | 
			
		||||
				{
 | 
			
		||||
				reason = ERR_R_BN_LIB;
 | 
			
		||||
				goto err;
 | 
			
		||||
				}
 | 
			
		||||
			if (buf_len < (i = (size_t)BN_num_bytes(seed))) 
 | 
			
		||||
				buf_len = i;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		buf_len += 10;
 | 
			
		||||
		if ((buffer = OPENSSL_malloc(buf_len)) == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			reason = ERR_R_MALLOC_FAILURE;
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
		if (off)
 | 
			
		||||
			{
 | 
			
		||||
			if (off > 128) off=128;
 | 
			
		||||
			memset(str,' ',off);
 | 
			
		||||
			}
 | 
			
		||||
  
 | 
			
		||||
		if ((p != NULL) && !print(bp, "P:   ", p, buffer, off)) 
 | 
			
		||||
			goto err;
 | 
			
		||||
		if ((a != NULL) && !print(bp, "A:   ", a, buffer, off)) 
 | 
			
		||||
			goto err;
 | 
			
		||||
		if ((b != NULL) && !print(bp, "B:   ", b, buffer, off))
 | 
			
		||||
			goto err;
 | 
			
		||||
		if (form == POINT_CONVERSION_COMPRESSED)
 | 
			
		||||
			{
 | 
			
		||||
			if ((gen != NULL) && !print(bp, gen_compressed, gen,
 | 
			
		||||
				buffer, off))
 | 
			
		||||
				goto err;
 | 
			
		||||
			}
 | 
			
		||||
		else if (form == POINT_CONVERSION_UNCOMPRESSED)
 | 
			
		||||
			{
 | 
			
		||||
			if ((gen != NULL) && !print(bp, gen_uncompressed, gen,
 | 
			
		||||
				buffer, off))
 | 
			
		||||
				goto err;
 | 
			
		||||
			}
 | 
			
		||||
		else /* form == POINT_CONVERSION_HYBRID */
 | 
			
		||||
			{
 | 
			
		||||
			if ((gen != NULL) && !print(bp, gen_hybrid, gen,
 | 
			
		||||
				buffer, off))
 | 
			
		||||
				goto err;
 | 
			
		||||
			}
 | 
			
		||||
		if ((order != NULL) && !print(bp, "Order: ", order, 
 | 
			
		||||
			buffer, off)) goto err;
 | 
			
		||||
		if ((cofactor != NULL) && !print(bp, "Cofactor: ", cofactor, 
 | 
			
		||||
			buffer, off)) goto err;
 | 
			
		||||
		if ((seed != NULL) && !print(bp, "Seed:", seed, 
 | 
			
		||||
			buffer, off)) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	ret=1;
 | 
			
		||||
err:
 | 
			
		||||
	if (!ret)
 | 
			
		||||
 		ECerr(EC_F_ECPKPARAMETERS_PRINT, reason);
 | 
			
		||||
	if (p) 
 | 
			
		||||
		BN_free(p);
 | 
			
		||||
	if (a) 
 | 
			
		||||
		BN_free(a);
 | 
			
		||||
	if (b)
 | 
			
		||||
		BN_free(b);
 | 
			
		||||
	if (gen)
 | 
			
		||||
		BN_free(gen);
 | 
			
		||||
	if (order)
 | 
			
		||||
		BN_free(order);
 | 
			
		||||
	if (cofactor)
 | 
			
		||||
		BN_free(cofactor);
 | 
			
		||||
	if (seed) 
 | 
			
		||||
		BN_free(seed);
 | 
			
		||||
	if (ctx)
 | 
			
		||||
		BN_CTX_free(ctx);
 | 
			
		||||
	if (buffer != NULL) 
 | 
			
		||||
		OPENSSL_free(buffer);
 | 
			
		||||
	return(ret);	
 | 
			
		||||
	}
 | 
			
		||||
#endif /* OPENSSL_NO_EC */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#ifndef OPENSSL_NO_FP_API
 | 
			
		||||
int ECDSA_print_fp(FILE *fp, const ECDSA *x, int off)
 | 
			
		||||
{
 | 
			
		||||
	BIO *b;
 | 
			
		||||
	int ret;
 | 
			
		||||
 
 | 
			
		||||
	if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		ECDSAerr(ECDSA_F_ECDSA_PRINT_FP, ERR_R_BIO_LIB);
 | 
			
		||||
		return(0);
 | 
			
		||||
	}
 | 
			
		||||
	BIO_set_fp(b, fp, BIO_NOCLOSE);
 | 
			
		||||
	ret = ECDSA_print(b, x, off);
 | 
			
		||||
	BIO_free(b);
 | 
			
		||||
	return(ret);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int ECDSA_print(BIO *bp, const ECDSA *x, int off)
 | 
			
		||||
	{
 | 
			
		||||
	char str[128];
 | 
			
		||||
	unsigned char *buffer=NULL;
 | 
			
		||||
	size_t	buf_len=0, i;
 | 
			
		||||
	int     ret=0, reason=ERR_R_BIO_LIB;
 | 
			
		||||
	BIGNUM  *pub_key=NULL;
 | 
			
		||||
	BN_CTX  *ctx=NULL;
 | 
			
		||||
 
 | 
			
		||||
	if (!x || !x->group)
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_PASSED_NULL_PARAMETER;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if ((pub_key = EC_POINT_point2bn(x->group, x->pub_key,
 | 
			
		||||
		ECDSA_get_conversion_form(x), NULL, ctx)) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_EC_LIB;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	buf_len = (size_t)BN_num_bytes(pub_key);
 | 
			
		||||
	if (x->priv_key)
 | 
			
		||||
		{
 | 
			
		||||
		if ((i = (size_t)BN_num_bytes(x->priv_key)) > buf_len)
 | 
			
		||||
			buf_len = i;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	buf_len += 10;
 | 
			
		||||
	if ((buffer = OPENSSL_malloc(buf_len)) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_MALLOC_FAILURE;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if (off)
 | 
			
		||||
		{
 | 
			
		||||
		if (off > 128) off=128;
 | 
			
		||||
		memset(str,' ',off);
 | 
			
		||||
		}
 | 
			
		||||
	if (x->priv_key != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		if (off && (BIO_write(bp, str, off) <= 0)) goto err;
 | 
			
		||||
		if (BIO_printf(bp, "Private-Key: (%d bit)\n", 
 | 
			
		||||
			BN_num_bits(x->priv_key)) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
  
 | 
			
		||||
	if ((x->priv_key != NULL) && !print(bp, "priv:", x->priv_key, 
 | 
			
		||||
		buffer, off))
 | 
			
		||||
		goto err;
 | 
			
		||||
	if ((pub_key != NULL) && !print(bp, "pub: ", pub_key,
 | 
			
		||||
		buffer, off))
 | 
			
		||||
		goto err;
 | 
			
		||||
	if (!ECPKParameters_print(bp, x->group, off))
 | 
			
		||||
		goto err;
 | 
			
		||||
	ret=1;
 | 
			
		||||
err:
 | 
			
		||||
	if (!ret)
 | 
			
		||||
 		ECDSAerr(ECDSA_F_ECDSA_PRINT, reason);
 | 
			
		||||
	if (pub_key) 
 | 
			
		||||
		BN_free(pub_key);
 | 
			
		||||
	if (ctx)
 | 
			
		||||
		BN_CTX_free(ctx);
 | 
			
		||||
	if (buffer != NULL)
 | 
			
		||||
		OPENSSL_free(buffer);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
 | 
			
		||||
	     int off)
 | 
			
		||||
	{
 | 
			
		||||
	int n,i;
 | 
			
		||||
	char str[128];
 | 
			
		||||
	const char *neg;
 | 
			
		||||
 | 
			
		||||
	if (num == NULL) return(1);
 | 
			
		||||
	neg=(num->neg)?"-":"";
 | 
			
		||||
	if (off)
 | 
			
		||||
		{
 | 
			
		||||
		if (off > 128) off=128;
 | 
			
		||||
		memset(str,' ',off);
 | 
			
		||||
		if (BIO_write(bp,str,off) <= 0) return(0);
 | 
			
		||||
		}
 | 
			
		||||
	if(!BIO_indent(bp,off,128))
 | 
			
		||||
		return 0;
 | 
			
		||||
 | 
			
		||||
	if (BN_num_bytes(num) <= BN_BYTES)
 | 
			
		||||
		{
 | 
			
		||||
@@ -565,9 +260,9 @@ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
 | 
			
		||||
			{
 | 
			
		||||
			if ((i%15) == 0)
 | 
			
		||||
				{
 | 
			
		||||
				str[0]='\n';
 | 
			
		||||
				memset(&(str[1]),' ',off+4);
 | 
			
		||||
				if (BIO_write(bp,str,off+1+4) <= 0) return(0);
 | 
			
		||||
				if(BIO_puts(bp,"\n") <= 0
 | 
			
		||||
				   || !BIO_indent(bp,off+4,128))
 | 
			
		||||
				    return 0;
 | 
			
		||||
				}
 | 
			
		||||
			if (BIO_printf(bp,"%02x%s",buf[i],((i+1) == n)?"":":")
 | 
			
		||||
				<= 0) return(0);
 | 
			
		||||
@@ -580,20 +275,20 @@ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
 | 
			
		||||
#ifndef OPENSSL_NO_DH
 | 
			
		||||
#ifndef OPENSSL_NO_FP_API
 | 
			
		||||
int DHparams_print_fp(FILE *fp, const DH *x)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *b;
 | 
			
		||||
	int ret;
 | 
			
		||||
        {
 | 
			
		||||
        BIO *b;
 | 
			
		||||
        int ret;
 | 
			
		||||
 | 
			
		||||
	if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
        if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		DHerr(DH_F_DHPARAMS_PRINT_FP,ERR_R_BUF_LIB);
 | 
			
		||||
		return(0);
 | 
			
		||||
                return(0);
 | 
			
		||||
		}
 | 
			
		||||
	BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
	ret=DHparams_print(b, x);
 | 
			
		||||
	BIO_free(b);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
        BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
        ret=DHparams_print(b, x);
 | 
			
		||||
        BIO_free(b);
 | 
			
		||||
        return(ret);
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int DHparams_print(BIO *bp, const DH *x)
 | 
			
		||||
@@ -638,20 +333,20 @@ err:
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
#ifndef OPENSSL_NO_FP_API
 | 
			
		||||
int DSAparams_print_fp(FILE *fp, const DSA *x)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *b;
 | 
			
		||||
	int ret;
 | 
			
		||||
        {
 | 
			
		||||
        BIO *b;
 | 
			
		||||
        int ret;
 | 
			
		||||
 | 
			
		||||
	if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
        if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		DSAerr(DSA_F_DSAPARAMS_PRINT_FP,ERR_R_BUF_LIB);
 | 
			
		||||
		return(0);
 | 
			
		||||
                return(0);
 | 
			
		||||
		}
 | 
			
		||||
	BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
	ret=DSAparams_print(b, x);
 | 
			
		||||
	BIO_free(b);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
        BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
        ret=DSAparams_print(b, x);
 | 
			
		||||
        BIO_free(b);
 | 
			
		||||
        return(ret);
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int DSAparams_print(BIO *bp, const DSA *x)
 | 
			
		||||
@@ -690,59 +385,3 @@ err:
 | 
			
		||||
 | 
			
		||||
#endif /* !OPENSSL_NO_DSA */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#ifndef OPENSSL_NO_FP_API
 | 
			
		||||
int ECDSAParameters_print_fp(FILE *fp, const ECDSA *x)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *b;
 | 
			
		||||
	int ret;
 | 
			
		||||
 
 | 
			
		||||
	if ((b=BIO_new(BIO_s_file())) == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		ECDSAerr(ECDSA_F_ECDSAPARAMETERS_PRINT_FP, ERR_R_BIO_LIB);
 | 
			
		||||
		return(0);
 | 
			
		||||
	}
 | 
			
		||||
	BIO_set_fp(b, fp, BIO_NOCLOSE);
 | 
			
		||||
	ret = ECDSAParameters_print(b, x);
 | 
			
		||||
	BIO_free(b);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int ECDSAParameters_print(BIO *bp, const ECDSA *x)
 | 
			
		||||
	{
 | 
			
		||||
	int     reason=ERR_R_EC_LIB, ret=0;
 | 
			
		||||
	BIGNUM	*order=NULL;
 | 
			
		||||
 
 | 
			
		||||
	if (!x || !x->group)
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_PASSED_NULL_PARAMETER;;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if ((order = BN_new()) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_MALLOC_FAILURE;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (!EC_GROUP_get_order(x->group, order, NULL))
 | 
			
		||||
		{
 | 
			
		||||
		reason = ERR_R_EC_LIB;
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
	if (BIO_printf(bp, "ECDSA-Parameters: (%d bit)\n", 
 | 
			
		||||
		BN_num_bits(order)) <= 0)
 | 
			
		||||
		goto err;
 | 
			
		||||
	if (!ECPKParameters_print(bp, x->group, 4))
 | 
			
		||||
		goto err;
 | 
			
		||||
	ret=1;
 | 
			
		||||
err:
 | 
			
		||||
	if (order)
 | 
			
		||||
		BN_free(order);
 | 
			
		||||
	ECDSAerr(ECDSA_F_ECDSAPARAMETERS_PRINT, reason);
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
  
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -82,7 +82,7 @@ int X509_REQ_print_fp(FILE *fp, X509_REQ *x)
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int X509_REQ_print(BIO *bp, X509_REQ *x)
 | 
			
		||||
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long cflag)
 | 
			
		||||
	{
 | 
			
		||||
	unsigned long l;
 | 
			
		||||
	int i;
 | 
			
		||||
@@ -91,153 +91,186 @@ int X509_REQ_print(BIO *bp, X509_REQ *x)
 | 
			
		||||
	EVP_PKEY *pkey;
 | 
			
		||||
	STACK_OF(X509_ATTRIBUTE) *sk;
 | 
			
		||||
	STACK_OF(X509_EXTENSION) *exts;
 | 
			
		||||
	char str[128];
 | 
			
		||||
	char mlch = ' ';
 | 
			
		||||
	int nmindent = 0;
 | 
			
		||||
 | 
			
		||||
	ri=x->req_info;
 | 
			
		||||
	sprintf(str,"Certificate Request:\n");
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
	sprintf(str,"%4sData:\n","");
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
	neg=(ri->version->type == V_ASN1_NEG_INTEGER)?"-":"";
 | 
			
		||||
	l=0;
 | 
			
		||||
	for (i=0; i<ri->version->length; i++)
 | 
			
		||||
		{ l<<=8; l+=ri->version->data[i]; }
 | 
			
		||||
	sprintf(str,"%8sVersion: %s%lu (%s0x%lx)\n","",neg,l,neg,l);
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
	sprintf(str,"%8sSubject: ","");
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
	X509_NAME_print(bp,ri->subject,16);
 | 
			
		||||
	sprintf(str,"\n%8sSubject Public Key Info:\n","");
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
	i=OBJ_obj2nid(ri->pubkey->algor->algorithm);
 | 
			
		||||
	sprintf(str,"%12sPublic Key Algorithm: %s\n","",
 | 
			
		||||
		(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i));
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
	pkey=X509_REQ_get_pubkey(x);
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
	if (pkey != NULL && pkey->type == EVP_PKEY_RSA)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bp,"%12sRSA Public Key: (%d bit)\n","",
 | 
			
		||||
			BN_num_bits(pkey->pkey.rsa->n));
 | 
			
		||||
		RSA_print(bp,pkey->pkey.rsa,16);
 | 
			
		||||
		}
 | 
			
		||||
	else 
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		if (pkey != NULL && pkey->type == EVP_PKEY_DSA)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bp,"%12sDSA Public Key:\n","");
 | 
			
		||||
		DSA_print(bp,pkey->pkey.dsa,16);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
		if (pkey != NULL && pkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bp, "%12sECDSA Public Key: \n","");
 | 
			
		||||
			ECDSA_print(bp, pkey->pkey.ecdsa, 16);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		BIO_printf(bp,"%12sUnknown Public Key:\n","");
 | 
			
		||||
 | 
			
		||||
	if (pkey != NULL)
 | 
			
		||||
	    EVP_PKEY_free(pkey);
 | 
			
		||||
 | 
			
		||||
	/* may not be */
 | 
			
		||||
	sprintf(str,"%8sAttributes:\n","");
 | 
			
		||||
	if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
	sk=x->req_info->attributes;
 | 
			
		||||
	if (sk_X509_ATTRIBUTE_num(sk) == 0)
 | 
			
		||||
		{
 | 
			
		||||
		sprintf(str,"%12sa0:00\n","");
 | 
			
		||||
		if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		for (i=0; i<sk_X509_ATTRIBUTE_num(sk); i++)
 | 
			
		||||
			{
 | 
			
		||||
			ASN1_TYPE *at;
 | 
			
		||||
			X509_ATTRIBUTE *a;
 | 
			
		||||
			ASN1_BIT_STRING *bs=NULL;
 | 
			
		||||
			ASN1_TYPE *t;
 | 
			
		||||
			int j,type=0,count=1,ii=0;
 | 
			
		||||
 | 
			
		||||
			a=sk_X509_ATTRIBUTE_value(sk,i);
 | 
			
		||||
			if(X509_REQ_extension_nid(OBJ_obj2nid(a->object)))
 | 
			
		||||
								continue;
 | 
			
		||||
			sprintf(str,"%12s","");
 | 
			
		||||
			if (BIO_puts(bp,str) <= 0) goto err;
 | 
			
		||||
			if ((j=i2a_ASN1_OBJECT(bp,a->object)) > 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (a->single)
 | 
			
		||||
				{
 | 
			
		||||
				t=a->value.single;
 | 
			
		||||
				type=t->type;
 | 
			
		||||
				bs=t->value.bit_string;
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				ii=0;
 | 
			
		||||
				count=sk_ASN1_TYPE_num(a->value.set);
 | 
			
		||||
get_next:
 | 
			
		||||
				at=sk_ASN1_TYPE_value(a->value.set,ii);
 | 
			
		||||
				type=at->type;
 | 
			
		||||
				bs=at->value.asn1_string;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			for (j=25-j; j>0; j--)
 | 
			
		||||
				if (BIO_write(bp," ",1) != 1) goto err;
 | 
			
		||||
			if (BIO_puts(bp,":") <= 0) goto err;
 | 
			
		||||
			if (	(type == V_ASN1_PRINTABLESTRING) ||
 | 
			
		||||
				(type == V_ASN1_T61STRING) ||
 | 
			
		||||
				(type == V_ASN1_IA5STRING))
 | 
			
		||||
				{
 | 
			
		||||
				if (BIO_write(bp,(char *)bs->data,bs->length)
 | 
			
		||||
					!= bs->length)
 | 
			
		||||
					goto err;
 | 
			
		||||
				BIO_puts(bp,"\n");
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				BIO_puts(bp,"unable to print attribute\n");
 | 
			
		||||
				}
 | 
			
		||||
			if (++ii < count) goto get_next;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	exts = X509_REQ_get_extensions(x);
 | 
			
		||||
	if(exts) {
 | 
			
		||||
		BIO_printf(bp,"%8sRequested Extensions:\n","");
 | 
			
		||||
		for (i=0; i<sk_X509_EXTENSION_num(exts); i++) {
 | 
			
		||||
			ASN1_OBJECT *obj;
 | 
			
		||||
			X509_EXTENSION *ex;
 | 
			
		||||
			int j;
 | 
			
		||||
			ex=sk_X509_EXTENSION_value(exts, i);
 | 
			
		||||
			if (BIO_printf(bp,"%12s","") <= 0) goto err;
 | 
			
		||||
			obj=X509_EXTENSION_get_object(ex);
 | 
			
		||||
			i2a_ASN1_OBJECT(bp,obj);
 | 
			
		||||
			j=X509_EXTENSION_get_critical(ex);
 | 
			
		||||
			if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
 | 
			
		||||
				goto err;
 | 
			
		||||
			if(!X509V3_EXT_print(bp, ex, 0, 16)) {
 | 
			
		||||
				BIO_printf(bp, "%16s", "");
 | 
			
		||||
				M_ASN1_OCTET_STRING_print(bp,ex->value);
 | 
			
		||||
			}
 | 
			
		||||
			if (BIO_write(bp,"\n",1) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
		sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free);
 | 
			
		||||
	if((nmflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
 | 
			
		||||
		mlch = '\n';
 | 
			
		||||
		nmindent = 12;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(!X509_signature_print(bp, x->sig_alg, x->signature)) goto err;
 | 
			
		||||
	if(nmflags == X509_FLAG_COMPAT)
 | 
			
		||||
		nmindent = 16;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	ri=x->req_info;
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_HEADER))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_write(bp,"Certificate Request:\n",21) <= 0) goto err;
 | 
			
		||||
		if (BIO_write(bp,"    Data:\n",10) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_VERSION))
 | 
			
		||||
		{
 | 
			
		||||
		neg=(ri->version->type == V_ASN1_NEG_INTEGER)?"-":"";
 | 
			
		||||
		l=0;
 | 
			
		||||
		for (i=0; i<ri->version->length; i++)
 | 
			
		||||
			{ l<<=8; l+=ri->version->data[i]; }
 | 
			
		||||
		if(BIO_printf(bp,"%8sVersion: %s%lu (%s0x%lx)\n","",neg,l,neg,
 | 
			
		||||
			      l) <= 0)
 | 
			
		||||
		    goto err;
 | 
			
		||||
		}
 | 
			
		||||
        if(!(cflag & X509_FLAG_NO_SUBJECT))
 | 
			
		||||
                {
 | 
			
		||||
                if (BIO_printf(bp,"        Subject:%c",mlch) <= 0) goto err;
 | 
			
		||||
                if (X509_NAME_print_ex(bp,ri->subject,nmindent, nmflags) < 0) goto err;
 | 
			
		||||
                if (BIO_write(bp,"\n",1) <= 0) goto err;
 | 
			
		||||
                }
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_PUBKEY))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_write(bp,"        Subject Public Key Info:\n",33) <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		if (BIO_printf(bp,"%12sPublic Key Algorithm: ","") <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		if (i2a_ASN1_OBJECT(bp, ri->pubkey->algor->algorithm) <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		if (BIO_puts(bp, "\n") <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
 | 
			
		||||
		pkey=X509_REQ_get_pubkey(x);
 | 
			
		||||
		if (pkey == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%12sUnable to load Public Key\n","");
 | 
			
		||||
			ERR_print_errors(bp);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_RSA)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%12sRSA Public Key: (%d bit)\n","",
 | 
			
		||||
			BN_num_bits(pkey->pkey.rsa->n));
 | 
			
		||||
			RSA_print(bp,pkey->pkey.rsa,16);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_DSA)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%12sDSA Public Key:\n","");
 | 
			
		||||
			DSA_print(bp,pkey->pkey.dsa,16);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
			BIO_printf(bp,"%12sUnknown Public Key:\n","");
 | 
			
		||||
 | 
			
		||||
		EVP_PKEY_free(pkey);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_ATTRIBUTES))
 | 
			
		||||
		{
 | 
			
		||||
		/* may not be */
 | 
			
		||||
		if(BIO_printf(bp,"%8sAttributes:\n","") <= 0)
 | 
			
		||||
		    goto err;
 | 
			
		||||
 | 
			
		||||
		sk=x->req_info->attributes;
 | 
			
		||||
		if (sk_X509_ATTRIBUTE_num(sk) == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if(BIO_printf(bp,"%12sa0:00\n","") <= 0)
 | 
			
		||||
			    goto err;
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			for (i=0; i<sk_X509_ATTRIBUTE_num(sk); i++)
 | 
			
		||||
				{
 | 
			
		||||
				ASN1_TYPE *at;
 | 
			
		||||
				X509_ATTRIBUTE *a;
 | 
			
		||||
				ASN1_BIT_STRING *bs=NULL;
 | 
			
		||||
				ASN1_TYPE *t;
 | 
			
		||||
				int j,type=0,count=1,ii=0;
 | 
			
		||||
 | 
			
		||||
				a=sk_X509_ATTRIBUTE_value(sk,i);
 | 
			
		||||
				if(X509_REQ_extension_nid(OBJ_obj2nid(a->object)))
 | 
			
		||||
									continue;
 | 
			
		||||
				if(BIO_printf(bp,"%12s","") <= 0)
 | 
			
		||||
				    goto err;
 | 
			
		||||
				if ((j=i2a_ASN1_OBJECT(bp,a->object)) > 0)
 | 
			
		||||
				{
 | 
			
		||||
				if (a->single)
 | 
			
		||||
					{
 | 
			
		||||
					t=a->value.single;
 | 
			
		||||
					type=t->type;
 | 
			
		||||
					bs=t->value.bit_string;
 | 
			
		||||
					}
 | 
			
		||||
				else
 | 
			
		||||
					{
 | 
			
		||||
					ii=0;
 | 
			
		||||
					count=sk_ASN1_TYPE_num(a->value.set);
 | 
			
		||||
get_next:
 | 
			
		||||
					at=sk_ASN1_TYPE_value(a->value.set,ii);
 | 
			
		||||
					type=at->type;
 | 
			
		||||
					bs=at->value.asn1_string;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				for (j=25-j; j>0; j--)
 | 
			
		||||
					if (BIO_write(bp," ",1) != 1) goto err;
 | 
			
		||||
				if (BIO_puts(bp,":") <= 0) goto err;
 | 
			
		||||
				if (	(type == V_ASN1_PRINTABLESTRING) ||
 | 
			
		||||
					(type == V_ASN1_T61STRING) ||
 | 
			
		||||
					(type == V_ASN1_IA5STRING))
 | 
			
		||||
					{
 | 
			
		||||
					if (BIO_write(bp,(char *)bs->data,bs->length)
 | 
			
		||||
						!= bs->length)
 | 
			
		||||
						goto err;
 | 
			
		||||
					BIO_puts(bp,"\n");
 | 
			
		||||
					}
 | 
			
		||||
				else
 | 
			
		||||
					{
 | 
			
		||||
					BIO_puts(bp,"unable to print attribute\n");
 | 
			
		||||
					}
 | 
			
		||||
				if (++ii < count) goto get_next;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_ATTRIBUTES))
 | 
			
		||||
		{
 | 
			
		||||
		exts = X509_REQ_get_extensions(x);
 | 
			
		||||
		if(exts)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%8sRequested Extensions:\n","");
 | 
			
		||||
			for (i=0; i<sk_X509_EXTENSION_num(exts); i++)
 | 
			
		||||
				{
 | 
			
		||||
				ASN1_OBJECT *obj;
 | 
			
		||||
				X509_EXTENSION *ex;
 | 
			
		||||
				int j;
 | 
			
		||||
				ex=sk_X509_EXTENSION_value(exts, i);
 | 
			
		||||
				if (BIO_printf(bp,"%12s","") <= 0) goto err;
 | 
			
		||||
				obj=X509_EXTENSION_get_object(ex);
 | 
			
		||||
				i2a_ASN1_OBJECT(bp,obj);
 | 
			
		||||
				j=X509_EXTENSION_get_critical(ex);
 | 
			
		||||
				if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
 | 
			
		||||
					goto err;
 | 
			
		||||
				if(!X509V3_EXT_print(bp, ex, 0, 16))
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bp, "%16s", "");
 | 
			
		||||
					M_ASN1_OCTET_STRING_print(bp,ex->value);
 | 
			
		||||
					}
 | 
			
		||||
				if (BIO_write(bp,"\n",1) <= 0) goto err;
 | 
			
		||||
				}
 | 
			
		||||
			sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_SIGDUMP))
 | 
			
		||||
		{
 | 
			
		||||
		if(!X509_signature_print(bp, x->sig_alg, x->signature)) goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	return(1);
 | 
			
		||||
err:
 | 
			
		||||
	X509err(X509_F_X509_REQ_PRINT,ERR_R_BUF_LIB);
 | 
			
		||||
	return(0);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
int X509_REQ_print(BIO *bp, X509_REQ *x)
 | 
			
		||||
	{
 | 
			
		||||
	return X509_REQ_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user