Compare commits
	
		
			2250 Commits
		
	
	
		
			OpenSSL_0_
			...
			OpenSSL-fi
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					55e81315dc | ||
| 
						 | 
					9227a5912f | ||
| 
						 | 
					f7376e8ebc | ||
| 
						 | 
					75fb38c7eb | ||
| 
						 | 
					ccabc6f49a | ||
| 
						 | 
					8343bcfb2b | ||
| 
						 | 
					8435dc4e8d | ||
| 
						 | 
					50c3727624 | ||
| 
						 | 
					15c6cbd464 | ||
| 
						 | 
					a6b8e925bc | ||
| 
						 | 
					d2fca2c59a | ||
| 
						 | 
					7028b83a35 | ||
| 
						 | 
					f0ad625606 | ||
| 
						 | 
					6bce1a8dca | ||
| 
						 | 
					9e9f48f0b1 | ||
| 
						 | 
					0cd83fa586 | ||
| 
						 | 
					1d8f39c144 | ||
| 
						 | 
					e523b0ab4d | ||
| 
						 | 
					f54026eb9d | ||
| 
						 | 
					f718b2f489 | ||
| 
						 | 
					9fb37ebe00 | ||
| 
						 | 
					88780bcdc7 | ||
| 
						 | 
					c1b971d5b2 | ||
| 
						 | 
					640d212a4c | ||
| 
						 | 
					9e8473347a | ||
| 
						 | 
					874d408909 | ||
| 
						 | 
					8dc3253141 | ||
| 
						 | 
					83a542996c | ||
| 
						 | 
					93dcdddbfd | ||
| 
						 | 
					f291e0eb32 | ||
| 
						 | 
					7f71a94cc5 | ||
| 
						 | 
					0ae9a77679 | ||
| 
						 | 
					1e4ae04e79 | ||
| 
						 | 
					54f581d3c7 | ||
| 
						 | 
					5d4558d1eb | ||
| 
						 | 
					343e6a4950 | ||
| 
						 | 
					0c0bba9776 | ||
| 
						 | 
					459379296a | ||
| 
						 | 
					1d3c933a32 | ||
| 
						 | 
					462a286eeb | ||
| 
						 | 
					28722cf212 | ||
| 
						 | 
					e68eff1465 | ||
| 
						 | 
					43a6d78bcc | ||
| 
						 | 
					364f6fb504 | ||
| 
						 | 
					21b9c11e99 | ||
| 
						 | 
					dee67db36c | ||
| 
						 | 
					aba2163a06 | ||
| 
						 | 
					bedc89e7af | ||
| 
						 | 
					d46359842f | ||
| 
						 | 
					b452e706e3 | ||
| 
						 | 
					08198b1b5c | ||
| 
						 | 
					16d5c926de | ||
| 
						 | 
					f27846cc2c | ||
| 
						 | 
					dcd44b5121 | ||
| 
						 | 
					75dca32a6c | ||
| 
						 | 
					0c337a0254 | ||
| 
						 | 
					a110d01771 | ||
| 
						 | 
					7ef7a1b3de | ||
| 
						 | 
					2749276b95 | ||
| 
						 | 
					b6a5fdb8a7 | ||
| 
						 | 
					bf5773fa2d | ||
| 
						 | 
					ecf139917d | ||
| 
						 | 
					8797be2dce | ||
| 
						 | 
					ab23d5ffda | ||
| 
						 | 
					1a979201d5 | ||
| 
						 | 
					216659eb87 | ||
| 
						 | 
					5d6383c83f | ||
| 
						 | 
					48e1c0c012 | ||
| 
						 | 
					f36f469430 | ||
| 
						 | 
					e07d3a021d | ||
| 
						 | 
					e1a27eb34a | ||
| 
						 | 
					6446e0c3c8 | ||
| 
						 | 
					beedea2fef | ||
| 
						 | 
					34be34fdd0 | ||
| 
						 | 
					0020502a07 | ||
| 
						 | 
					5cf7908a86 | ||
| 
						 | 
					d530017c00 | ||
| 
						 | 
					b7e3c73d7c | ||
| 
						 | 
					fd9fa844e2 | ||
| 
						 | 
					e6784a47e9 | ||
| 
						 | 
					c2dc3ee8d9 | ||
| 
						 | 
					482c2acf02 | ||
| 
						 | 
					a481b4b52c | ||
| 
						 | 
					a87228031f | ||
| 
						 | 
					b79c82eaab | ||
| 
						 | 
					69d1d5e6ce | ||
| 
						 | 
					c86f2054f3 | ||
| 
						 | 
					5c98b2caf5 | ||
| 
						 | 
					5148710994 | ||
| 
						 | 
					ea77fc3380 | ||
| 
						 | 
					46ef873f0b | ||
| 
						 | 
					2d2a5ba32a | ||
| 
						 | 
					2bd4e3379f | ||
| 
						 | 
					032c3ecb18 | ||
| 
						 | 
					d0344d06a8 | ||
| 
						 | 
					a0cac0ff75 | ||
| 
						 | 
					817089b66d | ||
| 
						 | 
					e703b46598 | ||
| 
						 | 
					0fa793bc7b | ||
| 
						 | 
					ba5477eb1a | ||
| 
						 | 
					5c42f62e48 | ||
| 
						 | 
					a08e05d1be | ||
| 
						 | 
					d342ec3335 | ||
| 
						 | 
					3d8b8860cf | ||
| 
						 | 
					a0b5ebeac6 | ||
| 
						 | 
					8ee18dd520 | ||
| 
						 | 
					50f482374d | ||
| 
						 | 
					f46e76ef50 | ||
| 
						 | 
					ff60944b28 | ||
| 
						 | 
					d349b2fffe | ||
| 
						 | 
					6906a81215 | ||
| 
						 | 
					81dd23e65d | ||
| 
						 | 
					e725a9660b | ||
| 
						 | 
					2fb2e00d94 | ||
| 
						 | 
					d7eed1929b | ||
| 
						 | 
					4acc3e907d | ||
| 
						 | 
					00294d0df7 | ||
| 
						 | 
					9449e38504 | ||
| 
						 | 
					fba03c479f | ||
| 
						 | 
					b8b0b5d856 | ||
| 
						 | 
					27bf518087 | ||
| 
						 | 
					ec5d8a54e9 | ||
| 
						 | 
					96a99d63c2 | ||
| 
						 | 
					18a6333180 | ||
| 
						 | 
					a9d9b07167 | ||
| 
						 | 
					7f663ce430 | ||
| 
						 | 
					e042540f6b | ||
| 
						 | 
					494593845c | ||
| 
						 | 
					82d63d3028 | ||
| 
						 | 
					4e8172d6da | ||
| 
						 | 
					8e6a84e730 | ||
| 
						 | 
					875a644a90 | ||
| 
						 | 
					95475b1c7a | ||
| 
						 | 
					ec37635c94 | ||
| 
						 | 
					fd836aeee0 | ||
| 
						 | 
					560f7abb7e | ||
| 
						 | 
					b6358c89a1 | ||
| 
						 | 
					5d735465d1 | ||
| 
						 | 
					9e051bac13 | ||
| 
						 | 
					e51f113ad8 | ||
| 
						 | 
					839032c34d | ||
| 
						 | 
					30fbcaa213 | ||
| 
						 | 
					a2cfc0d50c | ||
| 
						 | 
					86f941c936 | ||
| 
						 | 
					387fd00c47 | ||
| 
						 | 
					766519fc12 | ||
| 
						 | 
					6e07f8a4ba | ||
| 
						 | 
					a82d1527c4 | ||
| 
						 | 
					93825dddad | ||
| 
						 | 
					a8aa764d3c | ||
| 
						 | 
					e7716b7a19 | ||
| 
						 | 
					a4e3150f00 | ||
| 
						 | 
					5a8fe26720 | ||
| 
						 | 
					edec614efd | ||
| 
						 | 
					00b9c1be7d | ||
| 
						 | 
					3f7067e3b6 | ||
| 
						 | 
					051bb5c457 | ||
| 
						 | 
					2457c19df1 | ||
| 
						 | 
					5fa5eb71a4 | ||
| 
						 | 
					931a031916 | ||
| 
						 | 
					3f39976da3 | ||
| 
						 | 
					be21fe59aa | ||
| 
						 | 
					216ad9ef58 | ||
| 
						 | 
					ef3565aed2 | ||
| 
						 | 
					bc50157010 | ||
| 
						 | 
					01fc051e8a | ||
| 
						 | 
					09773532ed | ||
| 
						 | 
					ae43f344af | ||
| 
						 | 
					cc77f7c595 | ||
| 
						 | 
					91180d45f9 | ||
| 
						 | 
					0902c559fb | ||
| 
						 | 
					58b6a165a5 | ||
| 
						 | 
					d9f40bbe55 | ||
| 
						 | 
					0f0e53db43 | ||
| 
						 | 
					60ace8f3fc | ||
| 
						 | 
					ec7c9ee8b8 | ||
| 
						 | 
					9d4e2f891b | ||
| 
						 | 
					be187e32c9 | ||
| 
						 | 
					f82bb9cb9c | ||
| 
						 | 
					641c55342b | ||
| 
						 | 
					811756e644 | ||
| 
						 | 
					8c496048b7 | ||
| 
						 | 
					51212a7a40 | ||
| 
						 | 
					5a8922aed5 | ||
| 
						 | 
					e390f5d684 | ||
| 
						 | 
					ce974305c4 | ||
| 
						 | 
					078a97791d | ||
| 
						 | 
					f2c1812560 | ||
| 
						 | 
					4d6b383680 | ||
| 
						 | 
					4cfa4ae820 | ||
| 
						 | 
					3b7dd6d34c | ||
| 
						 | 
					489885cf84 | ||
| 
						 | 
					d60425034f | ||
| 
						 | 
					254700b1d6 | ||
| 
						 | 
					850be8f18d | ||
| 
						 | 
					a30af36c77 | ||
| 
						 | 
					5713956f61 | ||
| 
						 | 
					5075521e75 | ||
| 
						 | 
					a22d40dde2 | ||
| 
						 | 
					ee3a47a994 | ||
| 
						 | 
					ee121033dc | ||
| 
						 | 
					f727266ae8 | ||
| 
						 | 
					4090b56b4d | ||
| 
						 | 
					8bb0c8522a | ||
| 
						 | 
					c6700d2746 | ||
| 
						 | 
					1b06804491 | ||
| 
						 | 
					33ad6eca7a | ||
| 
						 | 
					dc90f64d56 | ||
| 
						 | 
					a5ad942b70 | ||
| 
						 | 
					0ae3ca9ec4 | ||
| 
						 | 
					33dd54d4b0 | ||
| 
						 | 
					0f7ff5b809 | ||
| 
						 | 
					6c43032121 | ||
| 
						 | 
					820fb35a21 | ||
| 
						 | 
					dd10343e75 | ||
| 
						 | 
					37ead9be0b | ||
| 
						 | 
					1751034669 | ||
| 
						 | 
					b47178f0ed | ||
| 
						 | 
					ad55502092 | ||
| 
						 | 
					e6738d4be8 | ||
| 
						 | 
					d4575825f1 | ||
| 
						 | 
					31edde3edc | ||
| 
						 | 
					4c6d0b7069 | ||
| 
						 | 
					135891a9d5 | ||
| 
						 | 
					bcb0a64421 | ||
| 
						 | 
					7575c7e3bb | ||
| 
						 | 
					d04b1b4656 | ||
| 
						 | 
					1247092776 | ||
| 
						 | 
					7e22a1df55 | ||
| 
						 | 
					bb5810d21d | ||
| 
						 | 
					381a693c39 | ||
| 
						 | 
					6a0fc3b6e1 | ||
| 
						 | 
					86cb571e28 | ||
| 
						 | 
					ee2cffeb56 | ||
| 
						 | 
					319a2c5f65 | ||
| 
						 | 
					61a88c31c0 | ||
| 
						 | 
					9d0e895120 | ||
| 
						 | 
					b86ed8d18f | ||
| 
						 | 
					44ee32ed30 | ||
| 
						 | 
					5922128732 | ||
| 
						 | 
					e5886a2388 | ||
| 
						 | 
					8d1ebe0bd1 | ||
| 
						 | 
					1fb724449d | ||
| 
						 | 
					cb37947a71 | ||
| 
						 | 
					721a5e83f9 | ||
| 
						 | 
					6df617a59d | ||
| 
						 | 
					8c6336b0aa | ||
| 
						 | 
					4668056fc9 | ||
| 
						 | 
					87203dc99a | ||
| 
						 | 
					de23af982a | ||
| 
						 | 
					3a5a176ea0 | ||
| 
						 | 
					4de65cbc06 | ||
| 
						 | 
					27b2b78f90 | ||
| 
						 | 
					3a160f1dc6 | ||
| 
						 | 
					7f24b1c3e9 | ||
| 
						 | 
					326e02b260 | ||
| 
						 | 
					50f40631d0 | ||
| 
						 | 
					a5e8bcfb7b | ||
| 
						 | 
					370d5a72db | ||
| 
						 | 
					a1d37a96df | ||
| 
						 | 
					9d5c3c1939 | ||
| 
						 | 
					de56817c9c | ||
| 
						 | 
					83d1298fa0 | ||
| 
						 | 
					815d7057be | ||
| 
						 | 
					6bff79629e | ||
| 
						 | 
					db452cdba0 | ||
| 
						 | 
					d435752b0a | ||
| 
						 | 
					c8b14ca177 | ||
| 
						 | 
					30cb9ec715 | ||
| 
						 | 
					8b79f2051d | ||
| 
						 | 
					af6dab9b00 | ||
| 
						 | 
					8ba5c63de9 | ||
| 
						 | 
					cdb42bcf0c | ||
| 
						 | 
					3a0ede0ffd | ||
| 
						 | 
					9cde81c2dd | ||
| 
						 | 
					7995627040 | ||
| 
						 | 
					fc56b52924 | ||
| 
						 | 
					6062460131 | ||
| 
						 | 
					62bd487421 | ||
| 
						 | 
					4ef740a632 | ||
| 
						 | 
					7f36acd8fe | ||
| 
						 | 
					a32fc687de | ||
| 
						 | 
					09d7c42a7c | ||
| 
						 | 
					c0017a5a65 | ||
| 
						 | 
					3fbbd1e1d7 | ||
| 
						 | 
					344e86645d | ||
| 
						 | 
					075521725d | ||
| 
						 | 
					faa9c5cbdc | ||
| 
						 | 
					5fdf06666c | ||
| 
						 | 
					d2c786db37 | ||
| 
						 | 
					f28e8bd300 | ||
| 
						 | 
					3e786f4b0d | ||
| 
						 | 
					de02ec2767 | ||
| 
						 | 
					4b66e713de | ||
| 
						 | 
					90dd4d34bb | ||
| 
						 | 
					112341031b | ||
| 
						 | 
					7cf803230b | ||
| 
						 | 
					2d6452cdf9 | ||
| 
						 | 
					cc056d6395 | ||
| 
						 | 
					79b42e7654 | ||
| 
						 | 
					f0c5db92f7 | ||
| 
						 | 
					394178c94c | ||
| 
						 | 
					d420ac2c7d | ||
| 
						 | 
					61590d8945 | ||
| 
						 | 
					b79aa47a0c | ||
| 
						 | 
					ec2a595627 | ||
| 
						 | 
					8f5c833f3c | ||
| 
						 | 
					e88c577738 | ||
| 
						 | 
					10fdd8d5fd | ||
| 
						 | 
					9c2fcb789e | ||
| 
						 | 
					01d49d19e0 | ||
| 
						 | 
					380537d9ff | ||
| 
						 | 
					3229fd6afe | ||
| 
						 | 
					cba1c06e5f | ||
| 
						 | 
					bebc48c72f | ||
| 
						 | 
					50bd5b852a | ||
| 
						 | 
					91182b1b28 | ||
| 
						 | 
					21a5b6c521 | ||
| 
						 | 
					ffe966b0fa | ||
| 
						 | 
					a2b0de98af | ||
| 
						 | 
					bb3de147b3 | ||
| 
						 | 
					4775944f81 | ||
| 
						 | 
					95ec1a717b | ||
| 
						 | 
					2abd5b7aa0 | ||
| 
						 | 
					380e145daf | ||
| 
						 | 
					a9f2330f43 | ||
| 
						 | 
					ce38bb1a8c | ||
| 
						 | 
					919f8bcd21 | ||
| 
						 | 
					325829a9bc | ||
| 
						 | 
					2bfd2c74d2 | ||
| 
						 | 
					82b2f57e30 | ||
| 
						 | 
					2ae1ea3788 | ||
| 
						 | 
					34066d741a | ||
| 
						 | 
					b74cc0776b | ||
| 
						 | 
					e7e5fe4705 | ||
| 
						 | 
					998ae048e7 | ||
| 
						 | 
					e65c2b9872 | ||
| 
						 | 
					b0ea8b160c | ||
| 
						 | 
					2fe9ab8e20 | ||
| 
						 | 
					bb569f97b9 | ||
| 
						 | 
					1145e03870 | ||
| 
						 | 
					31670c94bc | ||
| 
						 | 
					6781efb92f | ||
| 
						 | 
					0bf1c1d80d | ||
| 
						 | 
					67e5d33dd7 | ||
| 
						 | 
					6ed474ca66 | ||
| 
						 | 
					46cb8d3689 | ||
| 
						 | 
					23fc5ac646 | ||
| 
						 | 
					5734bebe05 | ||
| 
						 | 
					657a919598 | ||
| 
						 | 
					da17495b65 | ||
| 
						 | 
					6859bb1a22 | ||
| 
						 | 
					b64614adfe | ||
| 
						 | 
					3822740ce3 | ||
| 
						 | 
					0d78bc3356 | ||
| 
						 | 
					d87b79bf31 | ||
| 
						 | 
					6a6a08cbea | ||
| 
						 | 
					70ef9c5a3d | ||
| 
						 | 
					753cbc2857 | ||
| 
						 | 
					b727907ae8 | ||
| 
						 | 
					444c3a8492 | ||
| 
						 | 
					67be54edfb | ||
| 
						 | 
					0b352c58db | ||
| 
						 | 
					9d68b289a0 | ||
| 
						 | 
					03ddbdd9b9 | ||
| 
						 | 
					eb5f555ffb | ||
| 
						 | 
					5ebdb39084 | ||
| 
						 | 
					d45a098472 | ||
| 
						 | 
					6d5ffb591b | ||
| 
						 | 
					7ce9e425bc | ||
| 
						 | 
					4d8743f490 | ||
| 
						 | 
					4c8b4f9d03 | ||
| 
						 | 
					04dc4edb44 | ||
| 
						 | 
					81ba5f6713 | ||
| 
						 | 
					6defae04f3 | ||
| 
						 | 
					e1064adfd3 | ||
| 
						 | 
					d7559f16cd | ||
| 
						 | 
					d161f5a9b2 | ||
| 
						 | 
					9e989810ba | ||
| 
						 | 
					28474e26f4 | ||
| 
						 | 
					ec2179cf81 | ||
| 
						 | 
					a8287a90ea | ||
| 
						 | 
					85421c7148 | ||
| 
						 | 
					ad5f0ed509 | ||
| 
						 | 
					0a4c8baf5e | ||
| 
						 | 
					77cc150b61 | ||
| 
						 | 
					95de3d204f | ||
| 
						 | 
					890b2abf19 | ||
| 
						 | 
					31182ad39b | ||
| 
						 | 
					6b051c4ebc | ||
| 
						 | 
					f35232e6f3 | ||
| 
						 | 
					fda5e38551 | ||
| 
						 | 
					a601df36f3 | ||
| 
						 | 
					ac9c6e10a4 | ||
| 
						 | 
					1a01733047 | ||
| 
						 | 
					d2cd46127c | ||
| 
						 | 
					9dde17e8b4 | ||
| 
						 | 
					37af03d311 | ||
| 
						 | 
					f7a397cc8d | ||
| 
						 | 
					cd2e8a6f2d | ||
| 
						 | 
					2d4b834926 | ||
| 
						 | 
					c22e6753ef | ||
| 
						 | 
					d18b993c43 | ||
| 
						 | 
					e6e81c5894 | ||
| 
						 | 
					f75abcefed | ||
| 
						 | 
					18f62d4b82 | ||
| 
						 | 
					5c0c22803e | ||
| 
						 | 
					0ef85c7f45 | ||
| 
						 | 
					078dd1a0f9 | ||
| 
						 | 
					2b96c95197 | ||
| 
						 | 
					c5f1c7b4d8 | ||
| 
						 | 
					d870740cd7 | ||
| 
						 | 
					d8ec0dcf45 | ||
| 
						 | 
					c465e7941e | ||
| 
						 | 
					84bf37057c | ||
| 
						 | 
					933398f110 | ||
| 
						 | 
					cfd06a6223 | ||
| 
						 | 
					a9fd78f9da | ||
| 
						 | 
					5f747c7f4b | ||
| 
						 | 
					c4db1a8b5c | ||
| 
						 | 
					f7939fcd9a | ||
| 
						 | 
					d531c9014d | ||
| 
						 | 
					aca95e0b2f | ||
| 
						 | 
					bc3c578208 | ||
| 
						 | 
					06e4024d98 | ||
| 
						 | 
					8087d8f7ea | ||
| 
						 | 
					31166ec8f3 | ||
| 
						 | 
					2754597013 | ||
| 
						 | 
					2ce90b9b74 | ||
| 
						 | 
					db5b10fab5 | ||
| 
						 | 
					4e952ae4fc | ||
| 
						 | 
					db59141467 | ||
| 
						 | 
					8a66d17899 | ||
| 
						 | 
					2eeaa0261e | ||
| 
						 | 
					8dc344ccbf | ||
| 
						 | 
					6bcd3f903a | ||
| 
						 | 
					40f935f5b4 | ||
| 
						 | 
					0991f07034 | ||
| 
						 | 
					2aaec9cced | ||
| 
						 | 
					9d473aa2e4 | ||
| 
						 | 
					6145b0b183 | ||
| 
						 | 
					2a85f77146 | ||
| 
						 | 
					66b82f5aad | ||
| 
						 | 
					12bdceac8a | ||
| 
						 | 
					aea293e3bc | ||
| 
						 | 
					ffe8370a18 | ||
| 
						 | 
					8ad7e3ad2a | ||
| 
						 | 
					fdf12fd455 | ||
| 
						 | 
					50c71f8701 | ||
| 
						 | 
					fa5846e58b | ||
| 
						 | 
					0b6956b474 | ||
| 
						 | 
					0bb6187e71 | ||
| 
						 | 
					c5a5546389 | ||
| 
						 | 
					79e4022a33 | ||
| 
						 | 
					77fe058c10 | ||
| 
						 | 
					8d9086dfa2 | ||
| 
						 | 
					0602abf5bd | ||
| 
						 | 
					caf044cb3e | ||
| 
						 | 
					80986c9ced | ||
| 
						 | 
					a08ced78c8 | ||
| 
						 | 
					f25b0dddbb | ||
| 
						 | 
					871743aea9 | ||
| 
						 | 
					ede7c28eb7 | ||
| 
						 | 
					83eb412da8 | ||
| 
						 | 
					2821a5e587 | ||
| 
						 | 
					4d1c443123 | ||
| 
						 | 
					f44e184ec6 | ||
| 
						 | 
					377dcdba44 | ||
| 
						 | 
					8242354952 | ||
| 
						 | 
					c40b9bdefb | ||
| 
						 | 
					739320b840 | ||
| 
						 | 
					c9ee3ccd45 | ||
| 
						 | 
					6895cca89d | ||
| 
						 | 
					95a64aa4b8 | ||
| 
						 | 
					c9d3957986 | ||
| 
						 | 
					f82ab534c6 | ||
| 
						 | 
					05e962ddf8 | ||
| 
						 | 
					f6e8c19ed1 | ||
| 
						 | 
					cf89b40584 | ||
| 
						 | 
					d680c13060 | ||
| 
						 | 
					c076599c18 | ||
| 
						 | 
					a510e9e4fc | ||
| 
						 | 
					4d8148fa98 | ||
| 
						 | 
					1a9e663b20 | ||
| 
						 | 
					aed29ce5ea | ||
| 
						 | 
					0dd675509c | ||
| 
						 | 
					9ad82c123a | ||
| 
						 | 
					144aa3c56e | ||
| 
						 | 
					eeff6bb6b3 | ||
| 
						 | 
					202892dfd6 | ||
| 
						 | 
					d90e74c50c | ||
| 
						 | 
					2990244980 | ||
| 
						 | 
					80be2f484f | ||
| 
						 | 
					0c6fa13fee | ||
| 
						 | 
					68f0bcfbc3 | ||
| 
						 | 
					662ede2370 | ||
| 
						 | 
					cf54f06dcb | ||
| 
						 | 
					d0edf6e593 | ||
| 
						 | 
					5389c2dfa1 | ||
| 
						 | 
					4e2307ebdc | ||
| 
						 | 
					c93f908f7f | ||
| 
						 | 
					64961dc3c5 | ||
| 
						 | 
					16d2a7caef | ||
| 
						 | 
					c798868d96 | ||
| 
						 | 
					057a04398d | ||
| 
						 | 
					ed2e0e3988 | ||
| 
						 | 
					b7b5cd6132 | ||
| 
						 | 
					7027553741 | ||
| 
						 | 
					71583fb0d7 | ||
| 
						 | 
					7f3ba9428f | ||
| 
						 | 
					058f86e9e0 | ||
| 
						 | 
					3c02e24bb3 | ||
| 
						 | 
					4509102cb9 | ||
| 
						 | 
					1be02dd842 | ||
| 
						 | 
					87c99c59bd | ||
| 
						 | 
					3d7c4a5a6d | ||
| 
						 | 
					732d1bf43a | ||
| 
						 | 
					11171f3c74 | ||
| 
						 | 
					445aa1c44a | ||
| 
						 | 
					88fd7424f6 | ||
| 
						 | 
					ba9f80c5d5 | ||
| 
						 | 
					30a452ab32 | ||
| 
						 | 
					e59659dc41 | ||
| 
						 | 
					9c90f27dac | ||
| 
						 | 
					ec4e600da6 | ||
| 
						 | 
					253e893c2b | ||
| 
						 | 
					2343078660 | ||
| 
						 | 
					4097dce455 | ||
| 
						 | 
					0ad2c4f85b | ||
| 
						 | 
					2fe7c59277 | ||
| 
						 | 
					0e6c20da46 | ||
| 
						 | 
					f6b659cba4 | ||
| 
						 | 
					c9b552534e | ||
| 
						 | 
					f0ad5fc2ab | ||
| 
						 | 
					899ffab2c9 | ||
| 
						 | 
					577332db14 | ||
| 
						 | 
					6bd27f8644 | ||
| 
						 | 
					3b84ce3b6f | ||
| 
						 | 
					2667b068a1 | ||
| 
						 | 
					dfe399e7d9 | ||
| 
						 | 
					7068c8b1a6 | ||
| 
						 | 
					5f444c8fcd | ||
| 
						 | 
					a26be0386e | ||
| 
						 | 
					d5adc4b475 | ||
| 
						 | 
					fe2d15d814 | ||
| 
						 | 
					c45c8f3f1c | ||
| 
						 | 
					b09c9a91cb | ||
| 
						 | 
					a2fd4d03e8 | ||
| 
						 | 
					52fc641da0 | ||
| 
						 | 
					f29f610bf5 | ||
| 
						 | 
					27d63818e1 | ||
| 
						 | 
					fa68935f57 | ||
| 
						 | 
					b2f94f81e1 | ||
| 
						 | 
					ad6eec30a3 | ||
| 
						 | 
					25c578f3ca | ||
| 
						 | 
					22f083815c | ||
| 
						 | 
					82384690e2 | ||
| 
						 | 
					c61e45fba0 | ||
| 
						 | 
					7418027279 | ||
| 
						 | 
					d3446728f9 | ||
| 
						 | 
					245dac4d17 | ||
| 
						 | 
					c377882c39 | ||
| 
						 | 
					e6fa67fa93 | ||
| 
						 | 
					c2cdb1a877 | ||
| 
						 | 
					31b28f95be | ||
| 
						 | 
					f61bc950c1 | ||
| 
						 | 
					64a014a6d2 | ||
| 
						 | 
					62afa8bd58 | ||
| 
						 | 
					9ea72d3705 | ||
| 
						 | 
					a86eff4296 | ||
| 
						 | 
					4c4ef336a9 | ||
| 
						 | 
					1ce9c76f8e | ||
| 
						 | 
					19c8d4a5f8 | ||
| 
						 | 
					e7d580a924 | ||
| 
						 | 
					1f8e046af9 | ||
| 
						 | 
					7e1ef2d62a | ||
| 
						 | 
					ccf61c87fe | ||
| 
						 | 
					6d02c53762 | ||
| 
						 | 
					dac0d334ad | ||
| 
						 | 
					f63ff4a1a3 | ||
| 
						 | 
					9ef37a8dc9 | ||
| 
						 | 
					fbb40083c1 | ||
| 
						 | 
					549d89f7ed | ||
| 
						 | 
					5db9e7bec8 | ||
| 
						 | 
					104f570c73 | ||
| 
						 | 
					e1015c1fe7 | ||
| 
						 | 
					97e62d5554 | ||
| 
						 | 
					9aca5b2259 | ||
| 
						 | 
					b8b47f67d0 | ||
| 
						 | 
					b5da126b21 | ||
| 
						 | 
					a7d64957b9 | ||
| 
						 | 
					f743ef233a | ||
| 
						 | 
					79176d6053 | ||
| 
						 | 
					e726e5f170 | ||
| 
						 | 
					c1a32376db | ||
| 
						 | 
					6b211d8cd2 | ||
| 
						 | 
					f3bda010df | ||
| 
						 | 
					a907751350 | ||
| 
						 | 
					2689b8f326 | ||
| 
						 | 
					4ccac96346 | ||
| 
						 | 
					4ef3352608 | ||
| 
						 | 
					1f1bd3a51a | ||
| 
						 | 
					560dfd2a02 | ||
| 
						 | 
					bd69ac5c93 | ||
| 
						 | 
					14f3d7c5cc | ||
| 
						 | 
					33ed371ec9 | ||
| 
						 | 
					b2293a6cc6 | ||
| 
						 | 
					766332ac11 | ||
| 
						 | 
					51f7c5a6ea | ||
| 
						 | 
					fc0376e257 | ||
| 
						 | 
					51c568b309 | ||
| 
						 | 
					2b3784c235 | ||
| 
						 | 
					2e9f3c4636 | ||
| 
						 | 
					aac3861773 | ||
| 
						 | 
					e0162fa745 | ||
| 
						 | 
					510dc1ecd0 | ||
| 
						 | 
					3b07c32fe7 | ||
| 
						 | 
					563c05e2dc | ||
| 
						 | 
					9cc513a000 | ||
| 
						 | 
					a8e3195083 | ||
| 
						 | 
					cac32e5acd | ||
| 
						 | 
					643ecd2ed6 | ||
| 
						 | 
					0e9edc98d4 | ||
| 
						 | 
					27bd937cc0 | ||
| 
						 | 
					4435349cc6 | ||
| 
						 | 
					ec47bb7c81 | ||
| 
						 | 
					f56c451143 | ||
| 
						 | 
					05a1f76093 | ||
| 
						 | 
					4ed9388e5d | ||
| 
						 | 
					bf50d5b4ac | ||
| 
						 | 
					94a1183fab | ||
| 
						 | 
					88401ed449 | ||
| 
						 | 
					30e4269241 | ||
| 
						 | 
					59315df637 | ||
| 
						 | 
					3aa8d3a7f1 | ||
| 
						 | 
					3659df7d15 | ||
| 
						 | 
					16f1fdbc8b | ||
| 
						 | 
					98c1a4900c | ||
| 
						 | 
					5b6e7c8c65 | ||
| 
						 | 
					2541f58309 | ||
| 
						 | 
					6b063f32d9 | ||
| 
						 | 
					693f2e3625 | ||
| 
						 | 
					afab06d3f5 | ||
| 
						 | 
					8fb97c9acd | ||
| 
						 | 
					7312a38d9e | ||
| 
						 | 
					475e8d3d1d | ||
| 
						 | 
					c5f070d5d5 | ||
| 
						 | 
					1b9e855744 | ||
| 
						 | 
					f3b2ea53e2 | ||
| 
						 | 
					ed71769948 | ||
| 
						 | 
					e1c0a9c416 | ||
| 
						 | 
					0b8c5413a4 | ||
| 
						 | 
					c473d53898 | ||
| 
						 | 
					e8f8249319 | ||
| 
						 | 
					e2ced802b4 | ||
| 
						 | 
					9163658aa8 | ||
| 
						 | 
					d3a15e132d | ||
| 
						 | 
					47954f114c | ||
| 
						 | 
					3ef747c8b6 | ||
| 
						 | 
					75622f1ece | ||
| 
						 | 
					a052dd6532 | ||
| 
						 | 
					f96d1af449 | ||
| 
						 | 
					968766cad8 | ||
| 
						 | 
					652ae06bad | ||
| 
						 | 
					5cc2658cff | ||
| 
						 | 
					ddc38679ce | ||
| 
						 | 
					2f4335ec2b | ||
| 
						 | 
					02e0559477 | ||
| 
						 | 
					ada0e717fa | ||
| 
						 | 
					2c789c82be | ||
| 
						 | 
					d143dce03c | ||
| 
						 | 
					f9d183c209 | ||
| 
						 | 
					2ab0740785 | ||
| 
						 | 
					182cd19dea | ||
| 
						 | 
					61f00386ab | ||
| 
						 | 
					82f676c633 | ||
| 
						 | 
					5f24adda77 | ||
| 
						 | 
					2ae0352b0f | ||
| 
						 | 
					94805c84d1 | ||
| 
						 | 
					900f062d1f | ||
| 
						 | 
					6f2f534b58 | ||
| 
						 | 
					ba64c2cc8f | ||
| 
						 | 
					da6c44fc97 | ||
| 
						 | 
					29e62e487f | ||
| 
						 | 
					da0d33560f | ||
| 
						 | 
					ec28f9c12c | ||
| 
						 | 
					9d19fbc4fc | ||
| 
						 | 
					4e6480faf8 | ||
| 
						 | 
					aa5ae4841e | ||
| 
						 | 
					eb3d68c454 | ||
| 
						 | 
					c89f31def0 | ||
| 
						 | 
					ed5fae580e | ||
| 
						 | 
					d55141ed7a | ||
| 
						 | 
					a99ce1a574 | ||
| 
						 | 
					c687a3d5d5 | ||
| 
						 | 
					dfc3151925 | ||
| 
						 | 
					0fbffe7a71 | ||
| 
						 | 
					00dc2d7551 | ||
| 
						 | 
					037f6e73f1 | ||
| 
						 | 
					cf82439de8 | ||
| 
						 | 
					37fcd48f86 | ||
| 
						 | 
					27346c53b1 | ||
| 
						 | 
					e2491c45ab | ||
| 
						 | 
					cf9a88cad7 | ||
| 
						 | 
					398cd7276f | ||
| 
						 | 
					4f1cd8324c | ||
| 
						 | 
					873ddf7c0c | ||
| 
						 | 
					ed7f1d0bc6 | ||
| 
						 | 
					4aae637f6c | ||
| 
						 | 
					f6b9cd7f82 | ||
| 
						 | 
					8fbb2af392 | ||
| 
						 | 
					c5aba56c5b | ||
| 
						 | 
					705d0f5c8d | ||
| 
						 | 
					fd4ef69913 | ||
| 
						 | 
					844df66895 | ||
| 
						 | 
					834ac33a37 | ||
| 
						 | 
					4e9023f4d2 | ||
| 
						 | 
					d3a28e8b8d | ||
| 
						 | 
					0bd71d3b7e | ||
| 
						 | 
					d97322f0e6 | ||
| 
						 | 
					b52d512dfa | ||
| 
						 | 
					a3a2ff4cd9 | ||
| 
						 | 
					0d5b4f594d | ||
| 
						 | 
					5a1fd87ec1 | ||
| 
						 | 
					8c2786fff7 | ||
| 
						 | 
					8645c415cf | ||
| 
						 | 
					66ce343361 | ||
| 
						 | 
					700d86ea18 | ||
| 
						 | 
					1b9f21fdc8 | ||
| 
						 | 
					54bbde3c3f | ||
| 
						 | 
					f3031b106d | ||
| 
						 | 
					c14b337570 | ||
| 
						 | 
					e666c4599f | ||
| 
						 | 
					98cec7fc7b | ||
| 
						 | 
					fadd2246a0 | ||
| 
						 | 
					c78b4f1d3d | ||
| 
						 | 
					6e260c4093 | ||
| 
						 | 
					33862b90bb | ||
| 
						 | 
					36bad5cdfd | ||
| 
						 | 
					54f6451670 | ||
| 
						 | 
					f19d064087 | ||
| 
						 | 
					490967195a | ||
| 
						 | 
					25a1259911 | ||
| 
						 | 
					606c8048a0 | ||
| 
						 | 
					e66d863cd0 | ||
| 
						 | 
					f63f51dc22 | ||
| 
						 | 
					a069460015 | ||
| 
						 | 
					4eebab0d22 | ||
| 
						 | 
					55b12f8641 | ||
| 
						 | 
					40e5b9abeb | ||
| 
						 | 
					bc63a2ee0e | ||
| 
						 | 
					dcfb57c736 | ||
| 
						 | 
					2ee67f1dad | ||
| 
						 | 
					4af3184662 | ||
| 
						 | 
					e31047744a | ||
| 
						 | 
					f6eba601b0 | ||
| 
						 | 
					f796dc5c06 | ||
| 
						 | 
					476f09712c | ||
| 
						 | 
					50078051bd | ||
| 
						 | 
					db01746978 | ||
| 
						 | 
					fe0444b17e | ||
| 
						 | 
					63b815583b | ||
| 
						 | 
					16c9148220 | ||
| 
						 | 
					ca82ac1fee | ||
| 
						 | 
					9d92486cfb | ||
| 
						 | 
					aff0542844 | ||
| 
						 | 
					bb41fdb5ec | ||
| 
						 | 
					beab098d53 | ||
| 
						 | 
					3410aa1aa8 | ||
| 
						 | 
					f50b911a3f | ||
| 
						 | 
					02b95b7499 | ||
| 
						 | 
					2a948bd306 | ||
| 
						 | 
					c4d471552f | ||
| 
						 | 
					d4e35514ba | ||
| 
						 | 
					01fc834bc9 | ||
| 
						 | 
					f7f8d82aaa | ||
| 
						 | 
					3fd6b9f6d4 | ||
| 
						 | 
					4f17dfcd75 | ||
| 
						 | 
					a598524ad6 | ||
| 
						 | 
					83b4f49c0a | ||
| 
						 | 
					828ce10ce7 | ||
| 
						 | 
					8939adbad9 | ||
| 
						 | 
					60790aff6f | ||
| 
						 | 
					ff160dba54 | ||
| 
						 | 
					e19d0ef068 | ||
| 
						 | 
					f5f7dffdd1 | ||
| 
						 | 
					fb5b7317a7 | ||
| 
						 | 
					edd55d08f5 | ||
| 
						 | 
					457f692eab | ||
| 
						 | 
					83743ad039 | ||
| 
						 | 
					163f5b236c | ||
| 
						 | 
					e077b5452f | ||
| 
						 | 
					513c01a591 | ||
| 
						 | 
					d9a2a89a17 | ||
| 
						 | 
					31939f1544 | ||
| 
						 | 
					11ce33a71d | ||
| 
						 | 
					9acef3bbd7 | ||
| 
						 | 
					164bc7dae8 | ||
| 
						 | 
					f59c941950 | ||
| 
						 | 
					0239876511 | ||
| 
						 | 
					93c929e411 | ||
| 
						 | 
					c2dac35a02 | ||
| 
						 | 
					a9cfd20da7 | ||
| 
						 | 
					727ef76ebd | ||
| 
						 | 
					22e6c2524e | ||
| 
						 | 
					bca52f7d4e | ||
| 
						 | 
					48c36fdb2a | ||
| 
						 | 
					6d8cbdcb53 | ||
| 
						 | 
					9b2042fac3 | ||
| 
						 | 
					54a7ea6f36 | ||
| 
						 | 
					816d785721 | ||
| 
						 | 
					742b139f54 | ||
| 
						 | 
					0e2f5ec2d2 | ||
| 
						 | 
					3b30121bd9 | ||
| 
						 | 
					9ee789e6c3 | ||
| 
						 | 
					8c5e375c8e | ||
| 
						 | 
					b9d2d20086 | ||
| 
						 | 
					b9d7ca9748 | ||
| 
						 | 
					5b194dfbd5 | ||
| 
						 | 
					7f6af7d9db | ||
| 
						 | 
					42b2b6a2d5 | ||
| 
						 | 
					d1465bac90 | ||
| 
						 | 
					3bbb0212f3 | ||
| 
						 | 
					a5db6fa576 | ||
| 
						 | 
					9236b5b013 | ||
| 
						 | 
					535fba4907 | ||
| 
						 | 
					7e4140f73f | ||
| 
						 | 
					1ae0a83bdd | ||
| 
						 | 
					7ae46c6761 | ||
| 
						 | 
					d584fd6b66 | ||
| 
						 | 
					54dbdd9837 | ||
| 
						 | 
					9d6c32d6d1 | ||
| 
						 | 
					26851b6b42 | ||
| 
						 | 
					ea5240a5ed | ||
| 
						 | 
					ce8a202831 | ||
| 
						 | 
					eec7968f18 | ||
| 
						 | 
					0ece1d304d | ||
| 
						 | 
					1cc087fe4f | ||
| 
						 | 
					7f0f9f1934 | ||
| 
						 | 
					040c687ce4 | ||
| 
						 | 
					8f09a154e3 | ||
| 
						 | 
					cd1226bc6a | ||
| 
						 | 
					7a04fdd87f | ||
| 
						 | 
					4e7566579e | ||
| 
						 | 
					fba1cfa06d | ||
| 
						 | 
					138f970e6e | ||
| 
						 | 
					110c6f72ec | ||
| 
						 | 
					27f7d430ce | ||
| 
						 | 
					5964e95c0a | ||
| 
						 | 
					1a0c1f9052 | ||
| 
						 | 
					f78ae9c0f2 | ||
| 
						 | 
					e072e16e92 | ||
| 
						 | 
					1774e22d6f | ||
| 
						 | 
					7a79b5601a | ||
| 
						 | 
					26abc8f01a | ||
| 
						 | 
					74b0c41e47 | ||
| 
						 | 
					5924c21608 | ||
| 
						 | 
					bbfbd4b270 | ||
| 
						 | 
					c93fbfaebc | ||
| 
						 | 
					88ec5a637f | ||
| 
						 | 
					0b1c00abeb | ||
| 
						 | 
					75fcbb43a7 | ||
| 
						 | 
					e4e049e489 | ||
| 
						 | 
					225e35bd36 | ||
| 
						 | 
					9f81f23742 | ||
| 
						 | 
					0ae4ad9e9f | ||
| 
						 | 
					721688c2f8 | ||
| 
						 | 
					a109220107 | ||
| 
						 | 
					4a4a04622e | ||
| 
						 | 
					d6fd88fffd | ||
| 
						 | 
					e96133e4cf | ||
| 
						 | 
					f65a75786b | ||
| 
						 | 
					a157379adc | ||
| 
						 | 
					1ed3815650 | ||
| 
						 | 
					0b55368306 | ||
| 
						 | 
					27310553b1 | ||
| 
						 | 
					43eb3b0130 | ||
| 
						 | 
					78490b9cc2 | ||
| 
						 | 
					0a861ab7f3 | ||
| 
						 | 
					7b36590b17 | ||
| 
						 | 
					a8b728445c | ||
| 
						 | 
					af0f0f3e8f | ||
| 
						 | 
					86ccb91ddb | ||
| 
						 | 
					8d570498a2 | ||
| 
						 | 
					4c771796d5 | ||
| 
						 | 
					8e4552ed30 | ||
| 
						 | 
					d6df2b281f | ||
| 
						 | 
					bc4a5ed341 | ||
| 
						 | 
					6fcf735497 | ||
| 
						 | 
					b5f96e8818 | ||
| 
						 | 
					3ae70939ba | ||
| 
						 | 
					d5157a6244 | ||
| 
						 | 
					c433d72593 | ||
| 
						 | 
					68b42986cb | ||
| 
						 | 
					57544ee224 | ||
| 
						 | 
					83b23ed967 | ||
| 
						 | 
					4342c5c1a0 | ||
| 
						 | 
					16b1b03543 | ||
| 
						 | 
					e6526fbf4d | ||
| 
						 | 
					d07e7c32c2 | ||
| 
						 | 
					8152d88799 | ||
| 
						 | 
					8f35294c1b | ||
| 
						 | 
					4ce4884a5b | ||
| 
						 | 
					db598fbce2 | ||
| 
						 | 
					8382ec5d37 | ||
| 
						 | 
					0998cfaadd | ||
| 
						 | 
					2bdcfbd7a3 | ||
| 
						 | 
					c4448f60d6 | ||
| 
						 | 
					63b6fe2bf6 | ||
| 
						 | 
					f85b68cd49 | ||
| 
						 | 
					46b695d850 | ||
| 
						 | 
					5679bcce07 | ||
| 
						 | 
					6076f21f5e | ||
| 
						 | 
					24692fc5d7 | ||
| 
						 | 
					4390d66179 | ||
| 
						 | 
					be34231656 | ||
| 
						 | 
					d678cc07ed | ||
| 
						 | 
					54e73364f1 | ||
| 
						 | 
					6dd6da6005 | ||
| 
						 | 
					c6b220d933 | ||
| 
						 | 
					03eeb07152 | ||
| 
						 | 
					1a15c89988 | ||
| 
						 | 
					d1c5c168b5 | ||
| 
						 | 
					d0a4bd00b6 | ||
| 
						 | 
					423b1a840c | ||
| 
						 | 
					931756b833 | ||
| 
						 | 
					a47789e849 | ||
| 
						 | 
					39e76bc454 | ||
| 
						 | 
					e5b0508a14 | ||
| 
						 | 
					961b565690 | ||
| 
						 | 
					c4d00669a0 | ||
| 
						 | 
					142cdf5ec9 | ||
| 
						 | 
					d6cab100fa | ||
| 
						 | 
					81bd0446a9 | ||
| 
						 | 
					520b76ffd9 | ||
| 
						 | 
					1e2b14e9ca | ||
| 
						 | 
					4fe70c7812 | ||
| 
						 | 
					1c2d141238 | ||
| 
						 | 
					32e75dd3f0 | ||
| 
						 | 
					21eb91c79e | ||
| 
						 | 
					abfc6a3a9b | ||
| 
						 | 
					5cc5ec1bba | ||
| 
						 | 
					f80153e20b | ||
| 
						 | 
					33b34a9d8f | ||
| 
						 | 
					9b94f215b1 | ||
| 
						 | 
					8b5bcef798 | ||
| 
						 | 
					ea17e1f00f | ||
| 
						 | 
					543105ac17 | ||
| 
						 | 
					3789284807 | ||
| 
						 | 
					be9bec9bc7 | ||
| 
						 | 
					9c35452842 | ||
| 
						 | 
					69104cdf34 | ||
| 
						 | 
					dfefdb41f7 | ||
| 
						 | 
					cd6ab56da0 | ||
| 
						 | 
					c988c9b839 | ||
| 
						 | 
					bff8e1dddb | ||
| 
						 | 
					641e6ef2cb | ||
| 
						 | 
					9e9e8cb6a8 | ||
| 
						 | 
					f118514501 | ||
| 
						 | 
					39c4b7092c | ||
| 
						 | 
					c7e7fc3ee4 | ||
| 
						 | 
					786b0075d5 | ||
| 
						 | 
					fb10590910 | ||
| 
						 | 
					abf21308d2 | ||
| 
						 | 
					8c84b677e2 | ||
| 
						 | 
					d5ef144222 | ||
| 
						 | 
					741dae576f | ||
| 
						 | 
					59ade20500 | ||
| 
						 | 
					c11b9af75e | ||
| 
						 | 
					08a54f6e6a | ||
| 
						 | 
					8305477157 | ||
| 
						 | 
					e8cc7de4f4 | ||
| 
						 | 
					3b6aa36c77 | ||
| 
						 | 
					03829b2b47 | ||
| 
						 | 
					87c9c659de | ||
| 
						 | 
					751ff1d376 | ||
| 
						 | 
					d3ae5b1c8a | ||
| 
						 | 
					0f3879455b | ||
| 
						 | 
					0c7d61ee0e | ||
| 
						 | 
					78951e7711 | ||
| 
						 | 
					9ba4cc007b | ||
| 
						 | 
					7b5a6c7a62 | ||
| 
						 | 
					44deca977d | ||
| 
						 | 
					536b73e78e | ||
| 
						 | 
					940767b03f | ||
| 
						 | 
					d4a47a5778 | ||
| 
						 | 
					b24668626e | ||
| 
						 | 
					ea3675b5b6 | ||
| 
						 | 
					c554155b58 | ||
| 
						 | 
					a1d12daed2 | ||
| 
						 | 
					6f528cac5a | ||
| 
						 | 
					10a66ad389 | ||
| 
						 | 
					9d80973ea1 | ||
| 
						 | 
					e986704d24 | ||
| 
						 | 
					ce06265a37 | ||
| 
						 | 
					e4fb312330 | ||
| 
						 | 
					439909a068 | ||
| 
						 | 
					1296e72d1d | ||
| 
						 | 
					d177e6180d | ||
| 
						 | 
					f077cf68af | ||
| 
						 | 
					48f1fa7482 | ||
| 
						 | 
					a69cc10af1 | ||
| 
						 | 
					aa9d896b0d | ||
| 
						 | 
					2dd060d94e | ||
| 
						 | 
					42a559163d | ||
| 
						 | 
					546490c00e | ||
| 
						 | 
					3285eb336c | ||
| 
						 | 
					409a5de586 | ||
| 
						 | 
					02da5bcd83 | ||
| 
						 | 
					84b1e84af1 | ||
| 
						 | 
					5250725ba5 | ||
| 
						 | 
					9ed1fa4813 | ||
| 
						 | 
					500df82a96 | ||
| 
						 | 
					84d5ad6181 | ||
| 
						 | 
					96c15b8aad | ||
| 
						 | 
					4fc2bf07b5 | ||
| 
						 | 
					e8e0e3716a | ||
| 
						 | 
					bc441b739b | ||
| 
						 | 
					2007fe63f8 | ||
| 
						 | 
					ee435c0d9c | ||
| 
						 | 
					e6539fe22d | ||
| 
						 | 
					ba5df66a8b | ||
| 
						 | 
					12d4e7b8c8 | ||
| 
						 | 
					3f691235da | ||
| 
						 | 
					bba2cb3ada | ||
| 
						 | 
					86a925b27e | ||
| 
						 | 
					52c4c51f02 | ||
| 
						 | 
					954d8e4f79 | ||
| 
						 | 
					767712fa62 | ||
| 
						 | 
					b575dff21a | ||
| 
						 | 
					90e8a3102b | ||
| 
						 | 
					b35ca7b257 | ||
| 
						 | 
					879650b866 | ||
| 
						 | 
					176f31ddec | ||
| 
						 | 
					fe14ee96db | ||
| 
						 | 
					0102bb94cb | ||
| 
						 | 
					57376542a0 | ||
| 
						 | 
					57bc7769b7 | ||
| 
						 | 
					b8dc9693a7 | ||
| 
						 | 
					0461b8c90b | ||
| 
						 | 
					6ac26a5ce5 | ||
| 
						 | 
					155bd1137e | ||
| 
						 | 
					f0dc08e656 | ||
| 
						 | 
					e9ec63961b | ||
| 
						 | 
					0185803cc2 | ||
| 
						 | 
					bd8e228d60 | ||
| 
						 | 
					5c9a9c9c33 | ||
| 
						 | 
					bad99f6a9d | ||
| 
						 | 
					63ff3e83fc | ||
| 
						 | 
					5600a9cba1 | ||
| 
						 | 
					607ae30be8 | ||
| 
						 | 
					b4f43344d5 | ||
| 
						 | 
					c8c5cec1f9 | ||
| 
						 | 
					37d9503a67 | ||
| 
						 | 
					66ecdf3bfb | ||
| 
						 | 
					a1033894d7 | ||
| 
						 | 
					7841edc9c1 | ||
| 
						 | 
					132eaa59da | ||
| 
						 | 
					5562cfaca4 | ||
| 
						 | 
					0480574310 | ||
| 
						 | 
					c8252b71b5 | ||
| 
						 | 
					94949a50aa | ||
| 
						 | 
					0214893e6a | ||
| 
						 | 
					5be4a42e99 | ||
| 
						 | 
					f2aa055ec6 | ||
| 
						 | 
					62e3163b1b | ||
| 
						 | 
					8214e74f76 | ||
| 
						 | 
					542a1b1a2e | ||
| 
						 | 
					5672e3a321 | ||
| 
						 | 
					fbbfd86b67 | ||
| 
						 | 
					d8cbc93585 | ||
| 
						 | 
					dab0aaa612 | ||
| 
						 | 
					6fcf1dbc50 | ||
| 
						 | 
					352df99302 | ||
| 
						 | 
					5b0b0e98ce | ||
| 
						 | 
					a3063b37ef | ||
| 
						 | 
					d5234c7b3a | ||
| 
						 | 
					cf13eaf1a1 | ||
| 
						 | 
					77e270d10e | ||
| 
						 | 
					c893bffae7 | ||
| 
						 | 
					988e8458ad | ||
| 
						 | 
					cc811b1d7e | ||
| 
						 | 
					758f942b88 | ||
| 
						 | 
					a81d9af7f7 | ||
| 
						 | 
					26e9724458 | ||
| 
						 | 
					4879ec7bf3 | ||
| 
						 | 
					b653327d47 | ||
| 
						 | 
					4cadedef57 | ||
| 
						 | 
					27068df7e0 | ||
| 
						 | 
					b12753dffc | ||
| 
						 | 
					79221bc265 | ||
| 
						 | 
					1dc94d4dcc | ||
| 
						 | 
					5a2485ce12 | ||
| 
						 | 
					ffa49dc3d9 | ||
| 
						 | 
					142398d3a7 | ||
| 
						 | 
					b7bbac72c4 | ||
| 
						 | 
					c1269c81fd | ||
| 
						 | 
					6c0118ee8e | ||
| 
						 | 
					765ca5ea06 | ||
| 
						 | 
					794a386af3 | ||
| 
						 | 
					97333eaff7 | ||
| 
						 | 
					e270cf9c5e | ||
| 
						 | 
					b088a2d3f9 | ||
| 
						 | 
					7e38616d1f | ||
| 
						 | 
					b9447ec1bc | ||
| 
						 | 
					85d686e723 | ||
| 
						 | 
					2d3de726c5 | ||
| 
						 | 
					4989f0599f | ||
| 
						 | 
					73bec6d4b7 | ||
| 
						 | 
					e4b52ac353 | ||
| 
						 | 
					abd22c9c46 | ||
| 
						 | 
					ba729265a8 | ||
| 
						 | 
					e4b95737f0 | ||
| 
						 | 
					9ec1d35f29 | ||
| 
						 | 
					cf56663fb7 | ||
| 
						 | 
					c13eba970c | ||
| 
						 | 
					ea513641d0 | ||
| 
						 | 
					4309b740ce | ||
| 
						 | 
					8537943e8b | ||
| 
						 | 
					a8f5b2ed50 | ||
| 
						 | 
					33075f229e | ||
| 
						 | 
					28f573a28d | ||
| 
						 | 
					e2c9c91b5b | ||
| 
						 | 
					d42d2d1ab6 | ||
| 
						 | 
					65b254e8c0 | ||
| 
						 | 
					82871eaa17 | ||
| 
						 | 
					24893ca999 | ||
| 
						 | 
					c0d4f622eb | ||
| 
						 | 
					27a9bf17c7 | ||
| 
						 | 
					37c660ff9b | ||
| 
						 | 
					a004b06237 | ||
| 
						 | 
					98eab43915 | ||
| 
						 | 
					772ec4135c | ||
| 
						 | 
					ef03883edd | ||
| 
						 | 
					0e9035ac98 | ||
| 
						 | 
					636631cdd5 | ||
| 
						 | 
					4e5d3a7f98 | ||
| 
						 | 
					02ff8c1b66 | ||
| 
						 | 
					379e568950 | ||
| 
						 | 
					c09a297892 | ||
| 
						 | 
					0b0be7a381 | ||
| 
						 | 
					2619676256 | ||
| 
						 | 
					33cc07f79a | ||
| 
						 | 
					83df7b20c4 | ||
| 
						 | 
					c029841e36 | ||
| 
						 | 
					90c60eee9d | ||
| 
						 | 
					bfa3555081 | ||
| 
						 | 
					8e1e238219 | ||
| 
						 | 
					5d780babe3 | ||
| 
						 | 
					88c1fec923 | ||
| 
						 | 
					5cd48abf9f | ||
| 
						 | 
					981469c80d | ||
| 
						 | 
					db5006df04 | ||
| 
						 | 
					b5a4fd98a5 | ||
| 
						 | 
					3d6a84c42a | ||
| 
						 | 
					bd573ee31a | ||
| 
						 | 
					5fe11c7533 | ||
| 
						 | 
					20dc821092 | ||
| 
						 | 
					a1d57849b3 | ||
| 
						 | 
					0b13e9f055 | ||
| 
						 | 
					6d85cd36e2 | ||
| 
						 | 
					96f7065f63 | ||
| 
						 | 
					f3c22ef10d | ||
| 
						 | 
					a85bef1899 | ||
| 
						 | 
					bb3e67f315 | ||
| 
						 | 
					10ac28e26d | ||
| 
						 | 
					c0a93e31ab | ||
| 
						 | 
					8f94b2010f | ||
| 
						 | 
					2e60ea7634 | ||
| 
						 | 
					d48e6a47bd | ||
| 
						 | 
					4e78074b39 | ||
| 
						 | 
					40b676aa4f | ||
| 
						 | 
					b637670f03 | ||
| 
						 | 
					bd1217a176 | ||
| 
						 | 
					7e4e392b07 | ||
| 
						 | 
					da45180de4 | ||
| 
						 | 
					82516e3baf | ||
| 
						 | 
					c1862f9136 | ||
| 
						 | 
					30e3c99d9f | ||
| 
						 | 
					9048c7245b | ||
| 
						 | 
					02bf9a151a | ||
| 
						 | 
					0f618d0576 | ||
| 
						 | 
					d3b5cb5343 | ||
| 
						 | 
					624feae8af | ||
| 
						 | 
					246f2b016b | ||
| 
						 | 
					97e6bf6b22 | ||
| 
						 | 
					04da4558dd | ||
| 
						 | 
					118204f9a7 | ||
| 
						 | 
					60d16c258a | ||
| 
						 | 
					0c3426da86 | ||
| 
						 | 
					9b3f03d5a2 | ||
| 
						 | 
					9abff96b2f | ||
| 
						 | 
					c56dbabcfd | ||
| 
						 | 
					30167ace51 | ||
| 
						 | 
					722d17cbac | ||
| 
						 | 
					b01db3b279 | ||
| 
						 | 
					59b846c515 | ||
| 
						 | 
					2af5880cfd | ||
| 
						 | 
					42bf2a5cdc | ||
| 
						 | 
					80bcbaa02f | ||
| 
						 | 
					ff3fa159d0 | ||
| 
						 | 
					7c4e24af38 | ||
| 
						 | 
					726c223143 | ||
| 
						 | 
					c440333535 | ||
| 
						 | 
					5322333b7b | ||
| 
						 | 
					59ae8c9419 | ||
| 
						 | 
					e98823d847 | ||
| 
						 | 
					0bdd2da5d2 | ||
| 
						 | 
					d87a127837 | ||
| 
						 | 
					2f09524501 | ||
| 
						 | 
					06492aef01 | ||
| 
						 | 
					0062e618f0 | ||
| 
						 | 
					c00cee00fd | ||
| 
						 | 
					8228f302dd | ||
| 
						 | 
					018c56fdca | ||
| 
						 | 
					282382cc14 | ||
| 
						 | 
					d745af4b0c | ||
| 
						 | 
					44ea41cfff | ||
| 
						 | 
					acad5755a2 | ||
| 
						 | 
					0a3aece096 | ||
| 
						 | 
					bc35d57932 | ||
| 
						 | 
					28b958f732 | ||
| 
						 | 
					dd1a3c26ba | ||
| 
						 | 
					4e59cd3bb6 | ||
| 
						 | 
					5f988984e4 | ||
| 
						 | 
					0748cdc7f1 | ||
| 
						 | 
					a74333f905 | ||
| 
						 | 
					365e14622a | ||
| 
						 | 
					8ec16ce711 | ||
| 
						 | 
					b2c71c489d | ||
| 
						 | 
					0e4aa0d2d2 | ||
| 
						 | 
					08cb96bba2 | ||
| 
						 | 
					2ce906cee7 | ||
| 
						 | 
					23b1ff0970 | ||
| 
						 | 
					c2777386fc | ||
| 
						 | 
					cdc5b4a41e | ||
| 
						 | 
					52e5e5c2ba | ||
| 
						 | 
					7a48984dd5 | ||
| 
						 | 
					c653b56937 | ||
| 
						 | 
					96f2552c8a | ||
| 
						 | 
					04aff67de4 | ||
| 
						 | 
					e5658b9331 | ||
| 
						 | 
					ac2336adb0 | ||
| 
						 | 
					1a6356b2ca | ||
| 
						 | 
					b05645902a | ||
| 
						 | 
					5da8738fea | ||
| 
						 | 
					54d4f8c320 | ||
| 
						 | 
					f9f6c92c52 | ||
| 
						 | 
					98753dd088 | ||
| 
						 | 
					c76153f31d | ||
| 
						 | 
					881cb8b108 | ||
| 
						 | 
					8cbb91c857 | ||
| 
						 | 
					66bca12856 | ||
| 
						 | 
					aaae0aa48b | ||
| 
						 | 
					256c5769b4 | ||
| 
						 | 
					0535d3b25f | ||
| 
						 | 
					b36ea7636b | ||
| 
						 | 
					62be003150 | ||
| 
						 | 
					1f7238a434 | ||
| 
						 | 
					364c7cd621 | ||
| 
						 | 
					9d5390a049 | ||
| 
						 | 
					bda2fa364d | ||
| 
						 | 
					2944c9c665 | ||
| 
						 | 
					129bd04329 | ||
| 
						 | 
					caa7b2ad4f | ||
| 
						 | 
					c14b4d6b38 | ||
| 
						 | 
					a6816db813 | ||
| 
						 | 
					1d76d78858 | ||
| 
						 | 
					0382c95e4d | ||
| 
						 | 
					fb70607064 | ||
| 
						 | 
					fda20f08d0 | ||
| 
						 | 
					959ba907df | ||
| 
						 | 
					afd41c9fc7 | ||
| 
						 | 
					dfc3b51e78 | ||
| 
						 | 
					2964ba8c6a | ||
| 
						 | 
					7f2e024e78 | ||
| 
						 | 
					c0cc5c3059 | ||
| 
						 | 
					193e764c0b | ||
| 
						 | 
					6b20c70b52 | ||
| 
						 | 
					e68cb95d84 | ||
| 
						 | 
					448666239c | ||
| 
						 | 
					69c5d47bd4 | ||
| 
						 | 
					c0ac323360 | ||
| 
						 | 
					daf5fafced | ||
| 
						 | 
					a0cd3ca62b | ||
| 
						 | 
					fa47b4d8b8 | ||
| 
						 | 
					4a9476dd8d | ||
| 
						 | 
					661ef5eead | ||
| 
						 | 
					8d2511688d | ||
| 
						 | 
					d38ef273cc | ||
| 
						 | 
					969511d2cb | ||
| 
						 | 
					989f48d8c1 | ||
| 
						 | 
					85ca752e33 | ||
| 
						 | 
					f8ea5cb579 | ||
| 
						 | 
					17244d193b | ||
| 
						 | 
					360e506710 | ||
| 
						 | 
					09ad2458b8 | ||
| 
						 | 
					df77232bdc | ||
| 
						 | 
					2ae5bd9bb6 | ||
| 
						 | 
					ad200a864e | ||
| 
						 | 
					9d1b5614f9 | ||
| 
						 | 
					416b19c6fc | ||
| 
						 | 
					5b7249f302 | ||
| 
						 | 
					8ce7348625 | ||
| 
						 | 
					699543e4a2 | ||
| 
						 | 
					4309c4ad46 | ||
| 
						 | 
					3f1cbad2e7 | ||
| 
						 | 
					4ebb5293fc | ||
| 
						 | 
					2814c62915 | ||
| 
						 | 
					876e96fdbf | ||
| 
						 | 
					e78a012305 | ||
| 
						 | 
					f68843e3d7 | ||
| 
						 | 
					19a97a1df0 | ||
| 
						 | 
					72997517b0 | ||
| 
						 | 
					2a9fca82d2 | ||
| 
						 | 
					55b1516770 | ||
| 
						 | 
					3cc9a89dda | ||
| 
						 | 
					4d1e5535b2 | ||
| 
						 | 
					46a0d4fbcb | ||
| 
						 | 
					04945fda66 | ||
| 
						 | 
					1954767b45 | ||
| 
						 | 
					97e2e71ef9 | ||
| 
						 | 
					0bc81d5135 | ||
| 
						 | 
					c8a647846c | ||
| 
						 | 
					90ce14cd84 | ||
| 
						 | 
					28e276f139 | ||
| 
						 | 
					f22e1e4dd2 | ||
| 
						 | 
					e0d769caa2 | ||
| 
						 | 
					4a37c48789 | ||
| 
						 | 
					ad492c3601 | ||
| 
						 | 
					6983b4615c | ||
| 
						 | 
					0c055b201e | ||
| 
						 | 
					339e4dd3ef | ||
| 
						 | 
					d57084f235 | ||
| 
						 | 
					7eed0fc041 | ||
| 
						 | 
					7a1c6aa2a3 | ||
| 
						 | 
					4a2e36b19e | ||
| 
						 | 
					1c2018f37f | ||
| 
						 | 
					948dcdb81b | ||
| 
						 | 
					08101d72ce | ||
| 
						 | 
					04572965ea | ||
| 
						 | 
					1832f5e751 | ||
| 
						 | 
					75c4028585 | ||
| 
						 | 
					85f258d1c2 | ||
| 
						 | 
					d3f56a69fb | ||
| 
						 | 
					bfbc667397 | ||
| 
						 | 
					49be7042dc | ||
| 
						 | 
					44fcd3ef3e | ||
| 
						 | 
					cb284033f5 | ||
| 
						 | 
					21cde7a41c | ||
| 
						 | 
					ef9d3a10c3 | ||
| 
						 | 
					8598289936 | ||
| 
						 | 
					20c9a50710 | ||
| 
						 | 
					35dde7480f | ||
| 
						 | 
					5e42f9ab46 | ||
| 
						 | 
					7acf00a633 | ||
| 
						 | 
					69339d254b | ||
| 
						 | 
					ec517d25e8 | ||
| 
						 | 
					5b9aa0e474 | ||
| 
						 | 
					475cc45a61 | ||
| 
						 | 
					21fa937c9f | ||
| 
						 | 
					bae500aa21 | ||
| 
						 | 
					5534b7f133 | ||
| 
						 | 
					163d6401c5 | ||
| 
						 | 
					fc24169eaf | ||
| 
						 | 
					ce9b1b0573 | ||
| 
						 | 
					0a2407a851 | ||
| 
						 | 
					0c78046356 | ||
| 
						 | 
					4b8e01a22f | ||
| 
						 | 
					76a03d568e | ||
| 
						 | 
					a882c80e6f | ||
| 
						 | 
					7c03f26393 | ||
| 
						 | 
					5de00c254d | ||
| 
						 | 
					9ff9e406ea | ||
| 
						 | 
					d7b612e737 | ||
| 
						 | 
					b5beb13abb | ||
| 
						 | 
					d95b69b32c | ||
| 
						 | 
					ceb12d3074 | ||
| 
						 | 
					1dbfa26b5a | ||
| 
						 | 
					59c0dd56ab | ||
| 
						 | 
					342a584c2b | ||
| 
						 | 
					dcf19c173c | ||
| 
						 | 
					718d8a931d | ||
| 
						 | 
					e235000169 | ||
| 
						 | 
					39db27cb83 | ||
| 
						 | 
					821951b851 | ||
| 
						 | 
					cc81432b5b | ||
| 
						 | 
					35ba1f17dc | ||
| 
						 | 
					ea8e0cc7c2 | ||
| 
						 | 
					c71414b3a9 | ||
| 
						 | 
					542e010aa5 | ||
| 
						 | 
					cb661c56b0 | ||
| 
						 | 
					84ce9aa177 | ||
| 
						 | 
					e904bd0ddc | ||
| 
						 | 
					4c94c028a7 | ||
| 
						 | 
					e9883d285d | ||
| 
						 | 
					88a908e50d | ||
| 
						 | 
					8d6ad9e39d | ||
| 
						 | 
					d7de7bcf3e | ||
| 
						 | 
					aa18245f7e | ||
| 
						 | 
					316bfb77b5 | ||
| 
						 | 
					cbdda5cc87 | ||
| 
						 | 
					4e356d9876 | ||
| 
						 | 
					9b58214e4a | ||
| 
						 | 
					ff3ab1699b | ||
| 
						 | 
					3c801fa460 | ||
| 
						 | 
					8eeefabf32 | ||
| 
						 | 
					1c9202004b | ||
| 
						 | 
					1004c99c29 | ||
| 
						 | 
					214b8b998a | ||
| 
						 | 
					2ef9e7efe6 | ||
| 
						 | 
					c9ecb1edd8 | ||
| 
						 | 
					449598e723 | ||
| 
						 | 
					8baf5fdca0 | ||
| 
						 | 
					5201cb5acb | ||
| 
						 | 
					aafafa314d | ||
| 
						 | 
					ab79ac44d5 | ||
| 
						 | 
					49e42a1f60 | ||
| 
						 | 
					e286dfe6ed | ||
| 
						 | 
					9cd16b1dea | ||
| 
						 | 
					17e3b273e6 | ||
| 
						 | 
					12cd28258d | ||
| 
						 | 
					c93c8d1123 | ||
| 
						 | 
					9564997222 | ||
| 
						 | 
					f968059c67 | ||
| 
						 | 
					d5bf2e06b3 | ||
| 
						 | 
					0b900a5e93 | ||
| 
						 | 
					09867a47a4 | ||
| 
						 | 
					bbd6c8bd16 | ||
| 
						 | 
					00f76ad0df | ||
| 
						 | 
					9d5c42b61b | ||
| 
						 | 
					4b70367430 | ||
| 
						 | 
					8e7a8b68d2 | ||
| 
						 | 
					ce9cbfc815 | ||
| 
						 | 
					4d625031a5 | ||
| 
						 | 
					26a60b2eb0 | ||
| 
						 | 
					07d09fdb66 | ||
| 
						 | 
					a92a9f02fb | ||
| 
						 | 
					b65d3741b3 | ||
| 
						 | 
					fcf8f4d453 | ||
| 
						 | 
					13617646da | ||
| 
						 | 
					4553ed276b | ||
| 
						 | 
					7a3565009e | ||
| 
						 | 
					62966f3829 | ||
| 
						 | 
					c445142505 | ||
| 
						 | 
					9f3864fde3 | ||
| 
						 | 
					db186beee4 | ||
| 
						 | 
					1f1a32541f | ||
| 
						 | 
					f70ddce761 | ||
| 
						 | 
					0465313e70 | ||
| 
						 | 
					e29246cb17 | ||
| 
						 | 
					8d2563f136 | ||
| 
						 | 
					146e6776f5 | ||
| 
						 | 
					21996c6d8e | ||
| 
						 | 
					fcc5349156 | ||
| 
						 | 
					a45051fbfc | ||
| 
						 | 
					1a07628209 | ||
| 
						 | 
					814af7e175 | ||
| 
						 | 
					ec9f67f610 | ||
| 
						 | 
					bf683ec609 | ||
| 
						 | 
					30c08f2e3d | ||
| 
						 | 
					e851895f04 | ||
| 
						 | 
					9f100cf344 | ||
| 
						 | 
					a5a01e9051 | ||
| 
						 | 
					6be4688bdc | ||
| 
						 | 
					a2049ba394 | ||
| 
						 | 
					717c5cdcc7 | ||
| 
						 | 
					a8239afc86 | ||
| 
						 | 
					bb38cd49e4 | ||
| 
						 | 
					0654bba39f | ||
| 
						 | 
					4d77d5b316 | ||
| 
						 | 
					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 | ||
| 
						 | 
					8826087a97 | ||
| 
						 | 
					8aa09a245c | ||
| 
						 | 
					a5fd84de41 | ||
| 
						 | 
					dc199cfaa2 | ||
| 
						 | 
					b81ef84227 | ||
| 
						 | 
					91203a9482 | ||
| 
						 | 
					134fea9d0f | ||
| 
						 | 
					a153c46d7f | ||
| 
						 | 
					8faad520ae | ||
| 
						 | 
					8f89ae928b | ||
| 
						 | 
					782ded56e5 | ||
| 
						 | 
					8e458d52b5 | ||
| 
						 | 
					1f475c1f6f | ||
| 
						 | 
					bc9867e672 | ||
| 
						 | 
					412fd4708d | ||
| 
						 | 
					273c624442 | ||
| 
						 | 
					8b591c2f8e | ||
| 
						 | 
					8f4a23e3b7 | ||
| 
						 | 
					c83d8e2ba6 | ||
| 
						 | 
					6afc70be84 | ||
| 
						 | 
					f503c2c9e6 | ||
| 
						 | 
					7656893d51 | ||
| 
						 | 
					ff38d68237 | ||
| 
						 | 
					aff3e60754 | ||
| 
						 | 
					8196d87371 | ||
| 
						 | 
					61b1ad197a | ||
| 
						 | 
					293bb4b1b8 | ||
| 
						 | 
					29ca164513 | ||
| 
						 | 
					97d58eadbf | ||
| 
						 | 
					8cdeec9f54 | ||
| 
						 | 
					082cd4e564 | ||
| 
						 | 
					2115a89212 | ||
| 
						 | 
					af3ec1e24e | ||
| 
						 | 
					f275683ae8 | ||
| 
						 | 
					da91e37d37 | ||
| 
						 | 
					2758c44398 | ||
| 
						 | 
					4e056a2894 | ||
| 
						 | 
					f60b017da8 | ||
| 
						 | 
					08634f1156 | ||
| 
						 | 
					a50d6a801f | ||
| 
						 | 
					0439a5a8a7 | ||
| 
						 | 
					8ffe66b4ce | ||
| 
						 | 
					d62ec8362a | ||
| 
						 | 
					259b33d5a3 | ||
| 
						 | 
					6393c09cda | ||
| 
						 | 
					9421f1ab9c | ||
| 
						 | 
					5bf0d0ea1e | ||
| 
						 | 
					769f74b818 | ||
| 
						 | 
					64051a3a71 | ||
| 
						 | 
					8260eded07 | ||
| 
						 | 
					402b4a784d | ||
| 
						 | 
					651e7ddf7e | ||
| 
						 | 
					40bace2da6 | ||
| 
						 | 
					e89c82f549 | ||
| 
						 | 
					812d100d06 | ||
| 
						 | 
					b759742352 | ||
| 
						 | 
					475e4d23bd | ||
| 
						 | 
					bf4ae6dcfa | ||
| 
						 | 
					17d4f07658 | ||
| 
						 | 
					5ec797f263 | ||
| 
						 | 
					5b1aea7afe | ||
| 
						 | 
					327e113775 | ||
| 
						 | 
					58f3009aba | ||
| 
						 | 
					b193f29a9b | ||
| 
						 | 
					7ab58bf012 | ||
| 
						 | 
					cd10ba9c39 | ||
| 
						 | 
					96a3369c4a | ||
| 
						 | 
					e8ad570e3f | ||
| 
						 | 
					ad1ddf413c | ||
| 
						 | 
					e2c2152be9 | ||
| 
						 | 
					919b2a9673 | ||
| 
						 | 
					024a20905d | ||
| 
						 | 
					69ba8a00ad | ||
| 
						 | 
					f6a0c4f853 | ||
| 
						 | 
					040ade9bee | ||
| 
						 | 
					46ce790727 | ||
| 
						 | 
					9831d941ca | ||
| 
						 | 
					707ceb29e0 | ||
| 
						 | 
					3d470fc7b7 | ||
| 
						 | 
					edb7b28a00 | ||
| 
						 | 
					c4efde7403 | ||
| 
						 | 
					a1edc87664 | ||
| 
						 | 
					9cbc3356e7 | ||
| 
						 | 
					9161c2ff51 | ||
| 
						 | 
					21f8cf65e6 | ||
| 
						 | 
					8bcc049399 | ||
| 
						 | 
					95900b8592 | ||
| 
						 | 
					20a50cb517 | ||
| 
						 | 
					a71a482250 | ||
| 
						 | 
					8b6ee018c2 | ||
| 
						 | 
					ddab3c9327 | ||
| 
						 | 
					6a9a7ff259 | ||
| 
						 | 
					f7cd5462c9 | ||
| 
						 | 
					d268511c84 | ||
| 
						 | 
					190467767e | ||
| 
						 | 
					8d699c8c93 | ||
| 
						 | 
					e2a93e38d6 | ||
| 
						 | 
					41c2fb962c | ||
| 
						 | 
					455bacd4d3 | ||
| 
						 | 
					e85cbdad7a | ||
| 
						 | 
					c752563e43 | ||
| 
						 | 
					0eae6cd5f2 | ||
| 
						 | 
					0bf707e346 | ||
| 
						 | 
					96a2c35d91 | ||
| 
						 | 
					f9fde13590 | ||
| 
						 | 
					74174b9d05 | ||
| 
						 | 
					89eda1fc01 | ||
| 
						 | 
					bbec79a0c1 | ||
| 
						 | 
					6f7ba4be1f | ||
| 
						 | 
					2ccb522c5b | ||
| 
						 | 
					0bf76767b0 | ||
| 
						 | 
					732c9fe179 | ||
| 
						 | 
					4f99ab58f7 | ||
| 
						 | 
					339abc9bd9 | ||
| 
						 | 
					4407fbc2d4 | ||
| 
						 | 
					27f08d6d48 | ||
| 
						 | 
					a9e0953900 | ||
| 
						 | 
					9597027693 | ||
| 
						 | 
					78f41a4e89 | ||
| 
						 | 
					76dcae8020 | ||
| 
						 | 
					190ef122b2 | ||
| 
						 | 
					dc74e7d5d7 | ||
| 
						 | 
					3d76ceddff | ||
| 
						 | 
					b963f807be | ||
| 
						 | 
					005bbb52ff | ||
| 
						 | 
					a690102da2 | ||
| 
						 | 
					09db11783d | ||
| 
						 | 
					f6733ae577 | ||
| 
						 | 
					2d2ca3aab1 | ||
| 
						 | 
					cfc7620572 | ||
| 
						 | 
					9a01bc0732 | ||
| 
						 | 
					dbcc560717 | ||
| 
						 | 
					449d39f41c | ||
| 
						 | 
					84236041c1 | ||
| 
						 | 
					8d44d96ec3 | ||
| 
						 | 
					707e098687 | ||
| 
						 | 
					88de74ad83 | ||
| 
						 | 
					97b8718f15 | ||
| 
						 | 
					388a6f937f | ||
| 
						 | 
					a61050ad96 | ||
| 
						 | 
					baaeac3036 | ||
| 
						 | 
					d19370b617 | ||
| 
						 | 
					8376acbf7f | ||
| 
						 | 
					12a2ff9625 | ||
| 
						 | 
					292a217b51 | ||
| 
						 | 
					104117c5e7 | ||
| 
						 | 
					7ab3c662e3 | ||
| 
						 | 
					4fd5e85a18 | ||
| 
						 | 
					e9a9211e75 | ||
| 
						 | 
					d438845ac8 | ||
| 
						 | 
					b1d495b2c4 | ||
| 
						 | 
					6b7a46b721 | ||
| 
						 | 
					ff90d659e6 | ||
| 
						 | 
					8f841c70c4 | ||
| 
						 | 
					052c0f276e | ||
| 
						 | 
					1e7e392419 | ||
| 
						 | 
					e11b82c337 | ||
| 
						 | 
					04ad43af9e | ||
| 
						 | 
					227aec9a0f | ||
| 
						 | 
					b0165ce439 | ||
| 
						 | 
					3c8756f024 | ||
| 
						 | 
					1801bc0658 | ||
| 
						 | 
					ebbad107bf | ||
| 
						 | 
					fc0ab2eac2 | ||
| 
						 | 
					64cb996206 | ||
| 
						 | 
					413f2b2247 | ||
| 
						 | 
					fbf4c7b4f1 | ||
| 
						 | 
					99542d8763 | ||
| 
						 | 
					b3c1d18d03 | ||
| 
						 | 
					6c8aec60ca | ||
| 
						 | 
					c0ca52952e | ||
| 
						 | 
					39d727d0c3 | ||
| 
						 | 
					6319853811 | ||
| 
						 | 
					6b3a385f85 | ||
| 
						 | 
					27a80b7906 | ||
| 
						 | 
					4e33db9a3f | ||
| 
						 | 
					ca9a114f7a | ||
| 
						 | 
					ce1dc2e9b2 | ||
| 
						 | 
					b4b62004a6 | ||
| 
						 | 
					f7eb95852c | ||
| 
						 | 
					12a296edfc | ||
| 
						 | 
					e696a05791 | ||
| 
						 | 
					4a13e4b36c | ||
| 
						 | 
					b7fb041f31 | ||
| 
						 | 
					a98beb3a2d | ||
| 
						 | 
					f627c159b1 | ||
| 
						 | 
					535cedf136 | ||
| 
						 | 
					3a00964dd3 | ||
| 
						 | 
					a69d50b02d | ||
| 
						 | 
					ed7443661c | ||
| 
						 | 
					3d2aa62cb6 | ||
| 
						 | 
					9925249ba5 | ||
| 
						 | 
					d7041ea5de | ||
| 
						 | 
					68a9ee13e8 | ||
| 
						 | 
					a64f08f3dd | ||
| 
						 | 
					384897f46b | ||
| 
						 | 
					08e60fc0ff | ||
| 
						 | 
					ea050a6eb3 | ||
| 
						 | 
					bde63f803a | ||
| 
						 | 
					e73308638a | ||
| 
						 | 
					1ac3419ef6 | ||
| 
						 | 
					1e9858a28b | ||
| 
						 | 
					8f4a09e531 | ||
| 
						 | 
					3b2f77d88e | ||
| 
						 | 
					52ccf9e1c1 | ||
| 
						 | 
					5e947727a9 | ||
| 
						 | 
					d7bd58cf36 | ||
| 
						 | 
					b84e473d63 | ||
| 
						 | 
					4aecd67d04 | ||
| 
						 | 
					74a25e9cd9 | ||
| 
						 | 
					d020139db7 | ||
| 
						 | 
					f84acec8ea | ||
| 
						 | 
					d3b282e01f | ||
| 
						 | 
					85d9e2f2f0 | ||
| 
						 | 
					04ed3994e2 | ||
| 
						 | 
					6100502726 | ||
| 
						 | 
					a1f09ea8f8 | ||
| 
						 | 
					bce625987d | ||
| 
						 | 
					3c1a6f441b | ||
| 
						 | 
					97d640e1f0 | ||
| 
						 | 
					ddf7602425 | ||
| 
						 | 
					d3c32ffbcc | ||
| 
						 | 
					1d2a3fe246 | ||
| 
						 | 
					00c8546d21 | ||
| 
						 | 
					31e441a805 | ||
| 
						 | 
					c4a28caa32 | ||
| 
						 | 
					c3eb0c1e7f | ||
| 
						 | 
					d18f681310 | ||
| 
						 | 
					ea5214328b | ||
| 
						 | 
					0833a40d13 | ||
| 
						 | 
					ab1a01e9b2 | ||
| 
						 | 
					f1e1d6d6af | ||
| 
						 | 
					b012127a99 | ||
| 
						 | 
					265a9e2c5d | ||
| 
						 | 
					b0b3b11dbf | ||
| 
						 | 
					c578208d63 | ||
| 
						 | 
					038461a61b | ||
| 
						 | 
					716c94492a | ||
| 
						 | 
					a4f335ba3e | ||
| 
						 | 
					90832c891e | ||
| 
						 | 
					dc2ab9f4fa | ||
| 
						 | 
					162d858a90 | ||
| 
						 | 
					13ac37d01a | ||
| 
						 | 
					c2decc56b0 | ||
| 
						 | 
					1649d5fee1 | ||
| 
						 | 
					f8279b8ea3 | ||
| 
						 | 
					76b8f839c2 | ||
| 
						 | 
					8d37f07e09 | ||
| 
						 | 
					450c73d98b | ||
| 
						 | 
					2ead4a5df6 | ||
| 
						 | 
					addafc08a5 | ||
| 
						 | 
					e970fa0022 | ||
| 
						 | 
					458bb156bf | ||
| 
						 | 
					bca9dc2a51 | ||
| 
						 | 
					3720ea24f0 | ||
| 
						 | 
					72a37c03be | ||
| 
						 | 
					93d1969c78 | ||
| 
						 | 
					6178bb8fe9 | ||
| 
						 | 
					5b195b5a0e | ||
| 
						 | 
					4289131ae6 | ||
| 
						 | 
					b721e1e239 | ||
| 
						 | 
					6cf2012a4d | ||
| 
						 | 
					e459ebaed1 | ||
| 
						 | 
					e9e3ce40c5 | ||
| 
						 | 
					56d84db1d4 | ||
| 
						 | 
					16758de0a2 | ||
| 
						 | 
					f19b6474fe | ||
| 
						 | 
					2f6f2970c4 | ||
| 
						 | 
					f227a1af7d | ||
| 
						 | 
					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,5 +1,5 @@
 | 
				
			|||||||
openssl.pc
 | 
					openssl.pc
 | 
				
			||||||
Makefile.ssl
 | 
					Makefile
 | 
				
			||||||
MINFO
 | 
					MINFO
 | 
				
			||||||
makefile.one
 | 
					makefile.one
 | 
				
			||||||
tmp
 | 
					tmp
 | 
				
			||||||
@@ -14,3 +14,4 @@ cctest.c
 | 
				
			|||||||
cctest.a
 | 
					cctest.a
 | 
				
			||||||
libcrypto.so.*
 | 
					libcrypto.so.*
 | 
				
			||||||
libssl.so.*
 | 
					libssl.so.*
 | 
				
			||||||
 | 
					libcrypto.sha1
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										607
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										607
									
								
								CHANGES
									
									
									
									
									
								
							@@ -2,338 +2,266 @@
 | 
				
			|||||||
 OpenSSL CHANGES
 | 
					 OpenSSL CHANGES
 | 
				
			||||||
 _______________
 | 
					 _______________
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Changes between 0.9.7 and 0.9.8  [xx XXX 2002]
 | 
					 Changes between 0.9.7d and 0.9.7e  [XX xxx XXXX]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Add the ASN.1 structures and functions for CertificatePair, which
 | 
					  *) Reduce the chances of duplicate issuer name and serial numbers (in
 | 
				
			||||||
     is defined as follows (according to X.509_4thEditionDraftV6.pdf):
 | 
					     violation of RFC3280) using the OpenSSL certificate creation utilities.
 | 
				
			||||||
 | 
					     This is done by creating a random 64 bit value for the initial serial
 | 
				
			||||||
     CertificatePair ::= SEQUENCE {
 | 
					     number when a serial number file is created or when a self signed
 | 
				
			||||||
	forward		[0]	Certificate OPTIONAL,
 | 
					     certificate is created using 'openssl req -x509'. The initial serial
 | 
				
			||||||
	reverse		[1]	Certificate OPTIONAL,
 | 
					     number file is created using 'openssl x509 -next_serial' in CA.pl
 | 
				
			||||||
	-- at least one of the pair shall be present -- }
 | 
					     rather than being initialized to 1.
 | 
				
			||||||
 | 
					 | 
				
			||||||
     Also implement the PEM functions to read and write certificate
 | 
					 | 
				
			||||||
     pairs, and defined the PEM tag as "CERTIFICATE PAIR".
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     This needed to be defined, mostly for the sake of the LDAP
 | 
					 | 
				
			||||||
     attribute crossCertificatePair, but may prove useful elsewhere as
 | 
					 | 
				
			||||||
     well.
 | 
					 | 
				
			||||||
     [Richard Levitte]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Make it possible to inhibit symlinking of shared libraries in
 | 
					 | 
				
			||||||
     Makefile.shared, for Cygwin's sake.
 | 
					 | 
				
			||||||
     [Richard Levitte]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Extend the BIGNUM API by creating new macros that behave like
 | 
					 | 
				
			||||||
     functions
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          void BN_set_sign(BIGNUM *a, int neg);
 | 
					 | 
				
			||||||
          int BN_get_sign(const BIGNUM *a);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     and avoid the need to access 'a->neg' directly in applications.
 | 
					 | 
				
			||||||
     [Nils Larsch  <nla@trustcenter.de>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Implement fast modular reduction for pseudo-Mersenne primes
 | 
					 | 
				
			||||||
     used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c).
 | 
					 | 
				
			||||||
     EC_GROUP_new_curve_GFp() will now automatically use this
 | 
					 | 
				
			||||||
     if applicable.
 | 
					 | 
				
			||||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Add new lock type (CRYPTO_LOCK_BN).
 | 
					 | 
				
			||||||
     [Bodo Moeller]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Change the ENGINE framework to automatically load engines
 | 
					 | 
				
			||||||
     dynamically from specific directories unless they could be
 | 
					 | 
				
			||||||
     found to already be built in or loaded.  Move all the
 | 
					 | 
				
			||||||
     current engines except for the cryptodev one to a new
 | 
					 | 
				
			||||||
     directory engines/.
 | 
					 | 
				
			||||||
     The engines in engines/ are built as shared libraries if
 | 
					 | 
				
			||||||
     the "shared" options was given to ./Configure or ./config.
 | 
					 | 
				
			||||||
     Otherwise, they are inserted in libcrypto.a.
 | 
					 | 
				
			||||||
     /usr/local/ssl/engines is the default directory for dynamic
 | 
					 | 
				
			||||||
     engines, but that can be overriden at configure time through
 | 
					 | 
				
			||||||
     the usual use of --prefix and/or --openssldir, and at run
 | 
					 | 
				
			||||||
     time with the environment variable OPENSSL_ENGINES.
 | 
					 | 
				
			||||||
     [Geoff Thorpe and Richard Levitte]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Add Makefile.shared, a helper makefile to build shared
 | 
					 | 
				
			||||||
     libraries.  Addapt Makefile.org.
 | 
					 | 
				
			||||||
     [Richard Levitte]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Add version info to Win32 DLLs.
 | 
					 | 
				
			||||||
     [Peter 'Luna' Runestig" <peter@runestig.com>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Add new 'medium level' PKCS#12 API. Certificates and keys
 | 
					 | 
				
			||||||
     can be added using this API to created arbitrary PKCS#12
 | 
					 | 
				
			||||||
     files while avoiding the low level API.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     New options to PKCS12_create(), key or cert can be NULL and
 | 
					 | 
				
			||||||
     will then be omitted from the output file. The encryption
 | 
					 | 
				
			||||||
     algorithm NIDs can be set to -1 for no encryption, the mac
 | 
					 | 
				
			||||||
     iteration count can be set to 0 to omit the mac.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     Enhance pkcs12 utility by making the -nokeys and -nocerts
 | 
					 | 
				
			||||||
     options work when creating a PKCS#12 file. New option -nomac
 | 
					 | 
				
			||||||
     to omit the mac, NONE can be set for an encryption algorithm.
 | 
					 | 
				
			||||||
     New code is modified to use the enhanced PKCS12_create()
 | 
					 | 
				
			||||||
     instead of the low level API.
 | 
					 | 
				
			||||||
     [Steve Henson]
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Extend ASN1 encoder to support indefinite length constructed
 | 
					 Changes between 0.9.7c and 0.9.7d  [17 Mar 2004]
 | 
				
			||||||
     encoding. This can output sequences tags and octet strings in
 | 
					 | 
				
			||||||
     this form. Modify pk7_asn1.c to support indefinite length
 | 
					 | 
				
			||||||
     encoding. This is experimental and needs additional code to
 | 
					 | 
				
			||||||
     be useful, such as an ASN1 bio and some enhanced streaming
 | 
					 | 
				
			||||||
     PKCS#7 code.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     Extend template encode functionality so that tagging is passed
 | 
					  *) Fix null-pointer assignment in do_change_cipher_spec() revealed           
 | 
				
			||||||
     down to the template encoder.
 | 
					     by using the Codenomicon TLS Test Tool (CAN-2004-0079)                    
 | 
				
			||||||
 | 
					     [Joe Orton, Steve Henson]   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Fix flaw in SSL/TLS handshaking when using Kerberos ciphersuites
 | 
				
			||||||
 | 
					     (CAN-2004-0112)
 | 
				
			||||||
 | 
					     [Joe Orton, Steve Henson]   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Make it possible to have multiple active certificates with the same
 | 
				
			||||||
 | 
					     subject in the CA index file.  This is done only if the keyword
 | 
				
			||||||
 | 
					     'unique_subject' is set to 'no' in the main CA section (default
 | 
				
			||||||
 | 
					     if 'CA_default') of the configuration file.  The value is saved
 | 
				
			||||||
 | 
					     with the database itself in a separate index attribute file,
 | 
				
			||||||
 | 
					     named like the index file with '.attr' appended to the name.
 | 
				
			||||||
 | 
					     [Richard Levitte]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) X509 verify fixes. Disable broken certificate workarounds when 
 | 
				
			||||||
 | 
					     X509_V_FLAGS_X509_STRICT is set. Check CRL issuer has cRLSign set if
 | 
				
			||||||
 | 
					     keyUsage extension present. Don't accept CRLs with unhandled critical
 | 
				
			||||||
 | 
					     extensions: since verify currently doesn't process CRL extensions this
 | 
				
			||||||
 | 
					     rejects a CRL with *any* critical extensions. Add new verify error codes
 | 
				
			||||||
 | 
					     for these cases.
 | 
				
			||||||
     [Steve Henson]
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Let 'openssl req' fail if an argument to '-newkey' is not
 | 
					  *) When creating an OCSP nonce use an OCTET STRING inside the extnValue.
 | 
				
			||||||
     recognized instead of using RSA as a default.
 | 
					     A clarification of RFC2560 will require the use of OCTET STRINGs and 
 | 
				
			||||||
 | 
					     some implementations cannot handle the current raw format. Since OpenSSL
 | 
				
			||||||
 | 
					     copies and compares OCSP nonces as opaque blobs without any attempt at
 | 
				
			||||||
 | 
					     parsing them this should not create any compatibility issues.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) New md flag EVP_MD_CTX_FLAG_REUSE this allows md_data to be reused when
 | 
				
			||||||
 | 
					     calling EVP_MD_CTX_copy_ex() to avoid calling OPENSSL_malloc(). Without
 | 
				
			||||||
 | 
					     this HMAC (and other) operations are several times slower than OpenSSL
 | 
				
			||||||
 | 
					     < 0.9.7.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex().
 | 
				
			||||||
 | 
					     [Peter Sylvester <Peter.Sylvester@EdelWeb.fr>]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Use the correct content when signing type "other".
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.7b and 0.9.7c  [30 Sep 2003]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Fix various bugs revealed by running the NISCC test suite:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     Stop out of bounds reads in the ASN1 code when presented with
 | 
				
			||||||
 | 
					     invalid tags (CAN-2003-0543 and CAN-2003-0544).
 | 
				
			||||||
 | 
					     
 | 
				
			||||||
 | 
					     Free up ASN1_TYPE correctly if ANY type is invalid (CAN-2003-0545).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     If verify callback ignores invalid public key errors don't try to check
 | 
				
			||||||
 | 
					     certificate signature with the NULL public key.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) New -ignore_err option in ocsp application to stop the server
 | 
				
			||||||
 | 
					     exiting on the first error in a request.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate
 | 
				
			||||||
 | 
					     if the server requested one: as stated in TLS 1.0 and SSL 3.0
 | 
				
			||||||
 | 
					     specifications.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional
 | 
				
			||||||
 | 
					     extra data after the compression methods not only for TLS 1.0
 | 
				
			||||||
 | 
					     but also for SSL 3.0 (as required by the specification).
 | 
				
			||||||
 | 
					     [Bodo Moeller; problem pointed out by Matthias Loepfe]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Change X509_certificate_type() to mark the key as exported/exportable
 | 
				
			||||||
 | 
					     when it's 512 *bits* long, not 512 bytes.
 | 
				
			||||||
 | 
					     [Richard Levitte]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Change AES_cbc_encrypt() so it outputs exact multiple of
 | 
				
			||||||
 | 
					     blocks during encryption.
 | 
				
			||||||
 | 
					     [Richard Levitte]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Various fixes to base64 BIO and non blocking I/O. On write 
 | 
				
			||||||
 | 
					     flushes were not handled properly if the BIO retried. On read
 | 
				
			||||||
 | 
					     data was not being buffered properly and had various logic bugs.
 | 
				
			||||||
 | 
					     This also affects blocking I/O when the data being decoded is a
 | 
				
			||||||
 | 
					     certain size.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Various S/MIME bugfixes and compatibility changes:
 | 
				
			||||||
 | 
					     output correct application/pkcs7 MIME type if
 | 
				
			||||||
 | 
					     PKCS7_NOOLDMIMETYPE is set. Tolerate some broken signatures.
 | 
				
			||||||
 | 
					     Output CR+LF for EOL if PKCS7_CRLFEOL is set (this makes opening
 | 
				
			||||||
 | 
					     of files as .eml work). Correctly handle very long lines in MIME
 | 
				
			||||||
 | 
					     parser.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.7a and 0.9.7b  [10 Apr 2003]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Countermeasure against the Klima-Pokorny-Rosa extension of
 | 
				
			||||||
 | 
					     Bleichbacher's attack on PKCS #1 v1.5 padding: treat
 | 
				
			||||||
 | 
					     a protocol version number mismatch like a decryption error
 | 
				
			||||||
 | 
					     in ssl3_get_client_key_exchange (ssl/s3_srvr.c).
 | 
				
			||||||
     [Bodo Moeller]
 | 
					     [Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt.
 | 
					  *) Turn on RSA blinding by default in the default implementation
 | 
				
			||||||
     As these are not official, they are not included in "ALL";
 | 
					     to avoid a timing attack. Applications that don't want it can call
 | 
				
			||||||
     the "ECCdraft" ciphersuite group alias can be used to select them.
 | 
					     RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING.
 | 
				
			||||||
     [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)]
 | 
					     They would be ill-advised to do so in most cases.
 | 
				
			||||||
 | 
					     [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Add ECDH engine support.
 | 
					  *) Change RSA blinding code so that it works when the PRNG is not
 | 
				
			||||||
     [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)]
 | 
					     seeded (in this case, the secret RSA exponent is abused as
 | 
				
			||||||
 | 
					     an unpredictable seed -- if it is not unpredictable, there
 | 
				
			||||||
  *) Add ECDH in new directory crypto/ecdh/.
 | 
					     is no point in blinding anyway).  Make RSA blinding thread-safe
 | 
				
			||||||
TODO: more general interface (return  x  coordinate, not its hash)
 | 
					     by remembering the creator's thread ID in rsa->blinding and
 | 
				
			||||||
TODO: bug: pad  x  with leading zeros if necessary
 | 
					     having all other threads use local one-time blinding factors
 | 
				
			||||||
     [Douglas Stebila (Sun Microsystems Laboratories)]
 | 
					     (this requires more computation than sharing rsa->blinding, but
 | 
				
			||||||
 | 
					     avoids excessive locking; and if an RSA object is not shared
 | 
				
			||||||
  *) Let BN_rand_range() abort with an error after 100 iterations
 | 
					     between threads, blinding will still be very fast).
 | 
				
			||||||
     without success (which indicates a broken PRNG).
 | 
					 | 
				
			||||||
     [Bodo Moeller]
 | 
					     [Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Change BN_mod_sqrt() so that it verifies that the input value
 | 
					  *) Fixed a typo bug that would cause ENGINE_set_default() to set an
 | 
				
			||||||
     is really the square of the return value.  (Previously,
 | 
					     ENGINE as defaults for all supported algorithms irrespective of
 | 
				
			||||||
     BN_mod_sqrt would show GIGO behaviour.)
 | 
					     the 'flags' parameter. 'flags' is now honoured, so applications
 | 
				
			||||||
     [Bodo Moeller]
 | 
					     should make sure they are passing it correctly.
 | 
				
			||||||
 | 
					     [Geoff Thorpe]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Add named elliptic curves over binary fields from X9.62, SECG,
 | 
					  *) Target "mingw" now allows native Windows code to be generated in
 | 
				
			||||||
     and WAP/WTLS; add OIDs that were still missing.
 | 
					     the Cygwin environment as well as with the MinGW compiler.
 | 
				
			||||||
 | 
					     [Ulf Moeller] 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     [Sheueling Chang Shantz and Douglas Stebila
 | 
					 Changes between 0.9.7 and 0.9.7a  [19 Feb 2003]
 | 
				
			||||||
     (Sun Microsystems Laboratories)]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Extend the EC library for elliptic curves over binary fields
 | 
					  *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
 | 
				
			||||||
     (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/).
 | 
					     via timing by performing a MAC computation even if incorrrect
 | 
				
			||||||
     New EC_METHOD:
 | 
					     block cipher padding has been found.  This is a countermeasure
 | 
				
			||||||
 | 
					     against active attacks where the attacker has to distinguish
 | 
				
			||||||
 | 
					     between bad padding and a MAC verification error. (CAN-2003-0078)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          EC_GF2m_simple_method
 | 
					     [Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
 | 
				
			||||||
 | 
					     Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
 | 
				
			||||||
 | 
					     Martin Vuagnoux (EPFL, Ilion)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     New API functions:
 | 
					  *) Make the no-err option work as intended.  The intention with no-err
 | 
				
			||||||
 | 
					     is not to have the whole error stack handling routines removed from
 | 
				
			||||||
 | 
					     libcrypto, it's only intended to remove all the function name and
 | 
				
			||||||
 | 
					     reason texts, thereby removing some of the footprint that may not
 | 
				
			||||||
 | 
					     be interesting if those errors aren't displayed anyway.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          EC_GROUP_new_curve_GF2m
 | 
					     NOTE: it's still possible for any application or module to have it's
 | 
				
			||||||
          EC_GROUP_set_curve_GF2m
 | 
					     own set of error texts inserted.  The routines are there, just not
 | 
				
			||||||
          EC_GROUP_get_curve_GF2m
 | 
					     used by default when no-err is given.
 | 
				
			||||||
          EC_POINT_set_affine_coordinates_GF2m
 | 
					     [Richard Levitte]
 | 
				
			||||||
          EC_POINT_get_affine_coordinates_GF2m
 | 
					 | 
				
			||||||
          EC_POINT_set_compressed_coordinates_GF2m
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     Point compression for binary fields is disabled by default for
 | 
					  *) Add support for FreeBSD on IA64.
 | 
				
			||||||
     patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to
 | 
					     [dirk.meyer@dinoex.sub.org via Richard Levitte, resolves #454]
 | 
				
			||||||
     enable it).
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     As binary polynomials are represented as BIGNUMs, various members
 | 
					  *) Adjust DES_cbc_cksum() so it returns the same value as the MIT
 | 
				
			||||||
     of the EC_GROUP and EC_POINT data structures can be shared
 | 
					     Kerberos function mit_des_cbc_cksum().  Before this change,
 | 
				
			||||||
     between the implementations for prime fields and binary fields;
 | 
					     the value returned by DES_cbc_cksum() was like the one from
 | 
				
			||||||
     the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m)
 | 
					     mit_des_cbc_cksum(), except the bytes were swapped.
 | 
				
			||||||
     are essentially identical to their ..._GFp counterparts.
 | 
					     [Kevin Greaney <Kevin.Greaney@hp.com> and Richard Levitte]
 | 
				
			||||||
     (For simplicity, the '..._GFp' prefix has been dropped from
 | 
					 | 
				
			||||||
     various internal method names.)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     An internal 'field_div' method (similar to 'field_mul' and
 | 
					  *) Allow an application to disable the automatic SSL chain building.
 | 
				
			||||||
     'field_sqr') has been added; this is used only for binary fields.
 | 
					     Before this a rather primitive chain build was always performed in
 | 
				
			||||||
 | 
					     ssl3_output_cert_chain(): an application had no way to send the 
 | 
				
			||||||
 | 
					     correct chain if the automatic operation produced an incorrect result.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     [Sheueling Chang Shantz and Douglas Stebila
 | 
					     Now the chain builder is disabled if either:
 | 
				
			||||||
     (Sun Microsystems Laboratories)]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult()
 | 
					     1. Extra certificates are added via SSL_CTX_add_extra_chain_cert().
 | 
				
			||||||
     through methods ('mul', 'precompute_mult').
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     The generic implementations (now internally called 'ec_wNAF_mul'
 | 
					     2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set.
 | 
				
			||||||
     and 'ec_wNAF_precomputed_mult') remain the default if these
 | 
					 | 
				
			||||||
     methods are undefined.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     [Sheueling Chang Shantz and Douglas Stebila
 | 
					     The reasoning behind this is that an application would not want the
 | 
				
			||||||
     (Sun Microsystems Laboratories)]
 | 
					     auto chain building to take place if extra chain certificates are
 | 
				
			||||||
 | 
					     present and it might also want a means of sending no additional
 | 
				
			||||||
 | 
					     certificates (for example the chain has two certificates and the
 | 
				
			||||||
 | 
					     root is omitted).
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) New function EC_GROUP_get_degree, which is defined through
 | 
					  *) Add the possibility to build without the ENGINE framework.
 | 
				
			||||||
     EC_METHOD.  For curves over prime fields, this returns the bit
 | 
					     [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
 | 
				
			||||||
     length of the modulus.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     [Sheueling Chang Shantz and Douglas Stebila
 | 
					  *) Under Win32 gmtime() can return NULL: check return value in
 | 
				
			||||||
     (Sun Microsystems Laboratories)]
 | 
					     OPENSSL_gmtime(). Add error code for case where gmtime() fails.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) New functions EC_GROUP_dup, EC_POINT_dup.
 | 
					  *) DSA routines: under certain error conditions uninitialized BN objects
 | 
				
			||||||
     (These simply call ..._new  and ..._copy).
 | 
					     could be freed. Solution: make sure initialization is performed early
 | 
				
			||||||
 | 
					     enough. (Reported and fix supplied by Ivan D Nestlerode <nestler@MIT.EDU>,
 | 
				
			||||||
 | 
					     Nils Larsch <nla@trustcenter.de> via PR#459)
 | 
				
			||||||
 | 
					     [Lutz Jaenicke]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     [Sheueling Chang Shantz and Douglas Stebila
 | 
					  *) Another fix for SSLv2 session ID handling: the session ID was incorrectly
 | 
				
			||||||
     (Sun Microsystems Laboratories)]
 | 
					     checked on reconnect on the client side, therefore session resumption
 | 
				
			||||||
 | 
					     could still fail with a "ssl session id is different" error. This
 | 
				
			||||||
 | 
					     behaviour is masked when SSL_OP_ALL is used due to
 | 
				
			||||||
 | 
					     SSL_OP_MICROSOFT_SESS_ID_BUG being set.
 | 
				
			||||||
 | 
					     Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
 | 
				
			||||||
 | 
					     followup to PR #377.
 | 
				
			||||||
 | 
					     [Lutz Jaenicke]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c.
 | 
					  *) IA-32 assembler support enhancements: unified ELF targets, support
 | 
				
			||||||
     Polynomials are represented as BIGNUMs (where the sign bit is not
 | 
					     for SCO/Caldera platforms, fix for Cygwin shared build.
 | 
				
			||||||
     used) in the following functions [macros]:  
 | 
					     [Andy Polyakov]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          BN_GF2m_add
 | 
					  *) Add support for FreeBSD on sparc64.  As a consequence, support for
 | 
				
			||||||
          BN_GF2m_sub             [= BN_GF2m_add]
 | 
					     FreeBSD on non-x86 processors is separate from x86 processors on
 | 
				
			||||||
          BN_GF2m_mod             [wrapper for BN_GF2m_mod_arr]
 | 
					     the config script, much like the NetBSD support.
 | 
				
			||||||
          BN_GF2m_mod_mul         [wrapper for BN_GF2m_mod_mul_arr]
 | 
					     [Richard Levitte & Kris Kennaway <kris@obsecurity.org>]
 | 
				
			||||||
          BN_GF2m_mod_sqr         [wrapper for BN_GF2m_mod_sqr_arr]
 | 
					 | 
				
			||||||
          BN_GF2m_mod_inv
 | 
					 | 
				
			||||||
          BN_GF2m_mod_exp         [wrapper for BN_GF2m_mod_exp_arr]
 | 
					 | 
				
			||||||
          BN_GF2m_mod_sqrt        [wrapper for BN_GF2m_mod_sqrt_arr]
 | 
					 | 
				
			||||||
          BN_GF2m_mod_solve_quad  [wrapper for BN_GF2m_mod_solve_quad_arr]
 | 
					 | 
				
			||||||
          BN_GF2m_cmp             [= BN_ucmp]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     (Note that only the 'mod' functions are actually for fields GF(2^m).
 | 
					 Changes between 0.9.6h and 0.9.7  [31 Dec 2002]
 | 
				
			||||||
     BN_GF2m_add() is misnomer, but this is for the sake of consistency.)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     For some functions, an the irreducible polynomial defining a
 | 
					  [NB: OpenSSL 0.9.6i and later 0.9.6 patch levels were released after
 | 
				
			||||||
     field can be given as an 'unsigned int[]' with strictly
 | 
					  OpenSSL 0.9.7.]
 | 
				
			||||||
     decreasing elements giving the indices of those bits that are set;
 | 
					 | 
				
			||||||
     i.e., p[] represents the polynomial
 | 
					 | 
				
			||||||
          f(t) = t^p[0] + t^p[1] + ... + t^p[k]
 | 
					 | 
				
			||||||
     where
 | 
					 | 
				
			||||||
          p[0] > p[1] > ... > p[k] = 0.
 | 
					 | 
				
			||||||
     This applies to the following functions:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
          BN_GF2m_mod_arr
 | 
					  *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
 | 
				
			||||||
          BN_GF2m_mod_mul_arr
 | 
					     code (06) was taken as the first octet of the session ID and the last
 | 
				
			||||||
          BN_GF2m_mod_sqr_arr
 | 
					     octet was ignored consequently. As a result SSLv2 client side session
 | 
				
			||||||
          BN_GF2m_mod_inv_arr        [wrapper for BN_GF2m_mod_inv]
 | 
					     caching could not have worked due to the session ID mismatch between
 | 
				
			||||||
          BN_GF2m_mod_div_arr        [wrapper for BN_GF2m_mod_div]
 | 
					     client and server.
 | 
				
			||||||
          BN_GF2m_mod_exp_arr
 | 
					     Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
 | 
				
			||||||
          BN_GF2m_mod_sqrt_arr
 | 
					     PR #377.
 | 
				
			||||||
          BN_GF2m_mod_solve_quad_arr
 | 
					     [Lutz Jaenicke]
 | 
				
			||||||
          BN_GF2m_poly2arr
 | 
					 | 
				
			||||||
          BN_GF2m_arr2poly
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
     Conversion can be performed by the following functions:
 | 
					  *) 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]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          BN_GF2m_poly2arr
 | 
					  *) The hw_ncipher.c engine requires dynamic locks.  Unfortunately, it
 | 
				
			||||||
          BN_GF2m_arr2poly
 | 
					     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]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     bntest.c has additional tests for binary polynomial arithmetic.
 | 
					  *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content
 | 
				
			||||||
 | 
					     octets have been read, EOF or an error occurs. Without this change
 | 
				
			||||||
     Two implementations for BN_GF2m_mod_div() are available.
 | 
					     some truncated ASN1 structures will not produce an error.
 | 
				
			||||||
     The default algorithm simply uses BN_GF2m_mod_inv() and
 | 
					     [Steve Henson]
 | 
				
			||||||
     BN_GF2m_mod_mul().  The alternative algorithm is compiled in only
 | 
					 | 
				
			||||||
     if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the
 | 
					 | 
				
			||||||
     copyright notice in crypto/bn/bn_gf2m.c before enabling it).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     [Sheueling Chang Shantz and Douglas Stebila
 | 
					 | 
				
			||||||
     (Sun Microsystems Laboratories)]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Add new error code 'ERR_R_DISABLED' that can be used when some
 | 
					 | 
				
			||||||
     functionality is disabled at compile-time.
 | 
					 | 
				
			||||||
     [Douglas Stebila <douglas.stebila@sun.com>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Change default behaviour of 'openssl asn1parse' so that more
 | 
					 | 
				
			||||||
     information is visible when viewing, e.g., a certificate:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     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>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) 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
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     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>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) 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>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) 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>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) 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]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) 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]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Add a function EC_GROUP_check_discriminant() (defined via
 | 
					 | 
				
			||||||
     EC_METHOD) that verifies that the curve discriminant is non-zero.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     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 ECDSA in new directory crypto/ecdsa/.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     Add applications 'openssl ecparam' and 'openssl ecdsa'
 | 
					 | 
				
			||||||
     (these are based on 'openssl dsaparam' and 'openssl dsa').
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     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;
 | 
					 | 
				
			||||||
     - ECDSA engine support has been added.
 | 
					 | 
				
			||||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  *) Include some named elliptic curves, and add OIDs from X9.62,
 | 
					 | 
				
			||||||
     SECG, and WAP/WTLS.  Each curve can be obtained from the new
 | 
					 | 
				
			||||||
     function
 | 
					 | 
				
			||||||
          EC_GROUP_new_by_nid(),
 | 
					 | 
				
			||||||
     and the list of available named curves can be obtained with
 | 
					 | 
				
			||||||
          EC_get_builtin_curves().
 | 
					 | 
				
			||||||
     Also add a 'curve_name' member to EC_GROUP objects, which can be
 | 
					 | 
				
			||||||
     accessed via
 | 
					 | 
				
			||||||
         EC_GROUP_set_nid()
 | 
					 | 
				
			||||||
         EC_GROUP_get_nid()
 | 
					 | 
				
			||||||
     [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 Changes between 0.9.6h and 0.9.7  [XX xxx 2002]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Disable Heimdal support, since it hasn't been fully implemented.
 | 
					  *) Disable Heimdal support, since it hasn't been fully implemented.
 | 
				
			||||||
     Still give the possibility to force the use of Heimdal, but with
 | 
					     Still give the possibility to force the use of Heimdal, but with
 | 
				
			||||||
@@ -475,7 +403,7 @@ TODO: bug: pad  x  with leading zeros if necessary
 | 
				
			|||||||
	# is assumed to contain the absolute OpenSSL source directory.
 | 
						# is assumed to contain the absolute OpenSSL source directory.
 | 
				
			||||||
	mkdir -p 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 objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
				
			||||||
	(cd $OPENSSL_SOURCE; find . -type f -o -type l) | while read F; do
 | 
						(cd $OPENSSL_SOURCE; find . -type f) | while read F; do
 | 
				
			||||||
		mkdir -p `dirname $F`
 | 
							mkdir -p `dirname $F`
 | 
				
			||||||
		ln -s $OPENSSL_SOURCE/$F $F
 | 
							ln -s $OPENSSL_SOURCE/$F $F
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
@@ -1975,6 +1903,11 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
				
			|||||||
     be reduced modulo  m.
 | 
					     be reduced modulo  m.
 | 
				
			||||||
     [Lenka Fibikova <fibikova@exp-math.uni-essen.de>, Bodo Moeller]
 | 
					     [Lenka Fibikova <fibikova@exp-math.uni-essen.de>, Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
					     The following entry accidentily appeared in the CHANGES file
 | 
				
			||||||
 | 
					     distributed with OpenSSL 0.9.7.  The modifications described in
 | 
				
			||||||
 | 
					     it do *not* apply to OpenSSL 0.9.7.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
 | 
					  *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
 | 
				
			||||||
     was actually never needed) and in BN_mul().  The removal in BN_mul()
 | 
					     was actually never needed) and in BN_mul().  The removal in BN_mul()
 | 
				
			||||||
     required a small change in bn_mul_part_recursive() and the addition
 | 
					     required a small change in bn_mul_part_recursive() and the addition
 | 
				
			||||||
@@ -1983,6 +1916,7 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
				
			|||||||
     bn_sub_words() and bn_add_words() except they take arrays with
 | 
					     bn_sub_words() and bn_add_words() except they take arrays with
 | 
				
			||||||
     differing sizes.
 | 
					     differing sizes.
 | 
				
			||||||
     [Richard Levitte]
 | 
					     [Richard Levitte]
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) In 'openssl passwd', verify passwords read from the terminal
 | 
					  *) In 'openssl passwd', verify passwords read from the terminal
 | 
				
			||||||
     unless the '-salt' option is used (which usually means that
 | 
					     unless the '-salt' option is used (which usually means that
 | 
				
			||||||
@@ -2114,7 +2048,84 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
				
			|||||||
  *) Clean old EAY MD5 hack from e_os.h.
 | 
					  *) Clean old EAY MD5 hack from e_os.h.
 | 
				
			||||||
     [Richard Levitte]
 | 
					     [Richard Levitte]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Changes between 0.9.6g and 0.9.6h  [xx XXX xxxx]
 | 
					 Changes between 0.9.6l and 0.9.6m  [17 Mar 2004]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Fix null-pointer assignment in do_change_cipher_spec() revealed
 | 
				
			||||||
 | 
					     by using the Codenomicon TLS Test Tool (CAN-2004-0079)
 | 
				
			||||||
 | 
					     [Joe Orton, Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.6k and 0.9.6l  [04 Nov 2003]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Fix additional bug revealed by the NISCC test suite:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     Stop bug triggering large recursion when presented with
 | 
				
			||||||
 | 
					     certain ASN.1 tags (CAN-2003-0851)
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.6j and 0.9.6k  [30 Sep 2003]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Fix various bugs revealed by running the NISCC test suite:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     Stop out of bounds reads in the ASN1 code when presented with
 | 
				
			||||||
 | 
					     invalid tags (CAN-2003-0543 and CAN-2003-0544).
 | 
				
			||||||
 | 
					     
 | 
				
			||||||
 | 
					     If verify callback ignores invalid public key errors don't try to check
 | 
				
			||||||
 | 
					     certificate signature with the NULL public key.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate
 | 
				
			||||||
 | 
					     if the server requested one: as stated in TLS 1.0 and SSL 3.0
 | 
				
			||||||
 | 
					     specifications.
 | 
				
			||||||
 | 
					     [Steve Henson]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional
 | 
				
			||||||
 | 
					     extra data after the compression methods not only for TLS 1.0
 | 
				
			||||||
 | 
					     but also for SSL 3.0 (as required by the specification).
 | 
				
			||||||
 | 
					     [Bodo Moeller; problem pointed out by Matthias Loepfe]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Change X509_certificate_type() to mark the key as exported/exportable
 | 
				
			||||||
 | 
					     when it's 512 *bits* long, not 512 bytes.
 | 
				
			||||||
 | 
					     [Richard Levitte]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.6i and 0.9.6j  [10 Apr 2003]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Countermeasure against the Klima-Pokorny-Rosa extension of
 | 
				
			||||||
 | 
					     Bleichbacher's attack on PKCS #1 v1.5 padding: treat
 | 
				
			||||||
 | 
					     a protocol version number mismatch like a decryption error
 | 
				
			||||||
 | 
					     in ssl3_get_client_key_exchange (ssl/s3_srvr.c).
 | 
				
			||||||
 | 
					     [Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Turn on RSA blinding by default in the default implementation
 | 
				
			||||||
 | 
					     to avoid a timing attack. Applications that don't want it can call
 | 
				
			||||||
 | 
					     RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING.
 | 
				
			||||||
 | 
					     They would be ill-advised to do so in most cases.
 | 
				
			||||||
 | 
					     [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) Change RSA blinding code so that it works when the PRNG is not
 | 
				
			||||||
 | 
					     seeded (in this case, the secret RSA exponent is abused as
 | 
				
			||||||
 | 
					     an unpredictable seed -- if it is not unpredictable, there
 | 
				
			||||||
 | 
					     is no point in blinding anyway).  Make RSA blinding thread-safe
 | 
				
			||||||
 | 
					     by remembering the creator's thread ID in rsa->blinding and
 | 
				
			||||||
 | 
					     having all other threads use local one-time blinding factors
 | 
				
			||||||
 | 
					     (this requires more computation than sharing rsa->blinding, but
 | 
				
			||||||
 | 
					     avoids excessive locking; and if an RSA object is not shared
 | 
				
			||||||
 | 
					     between threads, blinding will still be very fast).
 | 
				
			||||||
 | 
					     [Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.6h and 0.9.6i  [19 Feb 2003]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
 | 
				
			||||||
 | 
					     via timing by performing a MAC computation even if incorrrect
 | 
				
			||||||
 | 
					     block cipher padding has been found.  This is a countermeasure
 | 
				
			||||||
 | 
					     against active attacks where the attacker has to distinguish
 | 
				
			||||||
 | 
					     between bad padding and a MAC verification error. (CAN-2003-0078)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     [Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
 | 
				
			||||||
 | 
					     Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
 | 
				
			||||||
 | 
					     Martin Vuagnoux (EPFL, Ilion)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Changes between 0.9.6g and 0.9.6h  [5 Dec 2002]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) New function OPENSSL_cleanse(), which is used to cleanse a section of
 | 
					  *) 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
 | 
					     memory from it's contents.  This is done with a counter that will
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										313
									
								
								Configure
									
									
									
									
									
								
							
							
						
						
									
										313
									
								
								Configure
									
									
									
									
									
								
							@@ -10,7 +10,7 @@ use strict;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# see INSTALL for instructions.
 | 
					# see INSTALL for instructions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
 | 
					my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [[no-]fips] [debug] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Options:
 | 
					# Options:
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -38,6 +38,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
 | 
				
			|||||||
# --test-sanity Make a number of sanity checks on the data in this file.
 | 
					# --test-sanity Make a number of sanity checks on the data in this file.
 | 
				
			||||||
#               This is a debugging tool for OpenSSL developers.
 | 
					#               This is a debugging tool for OpenSSL developers.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					# no-engine     do not compile in any engine code.
 | 
				
			||||||
# no-hw-xxx     do not compile support for specific crypto hardware.
 | 
					# no-hw-xxx     do not compile support for specific crypto hardware.
 | 
				
			||||||
#               Generic OpenSSL-style methods relating to this support
 | 
					#               Generic OpenSSL-style methods relating to this support
 | 
				
			||||||
#               are always compiled but return NULL if the hardware
 | 
					#               are always compiled but return NULL if the hardware
 | 
				
			||||||
@@ -107,7 +108,6 @@ my $tlib="-lnsl -lsocket";
 | 
				
			|||||||
my $bits1="THIRTY_TWO_BIT ";
 | 
					my $bits1="THIRTY_TWO_BIT ";
 | 
				
			||||||
my $bits2="SIXTY_FOUR_BIT ";
 | 
					my $bits2="SIXTY_FOUR_BIT ";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $x86_sol_asm="asm/bn86-sol.o asm/co86-sol.o:asm/dx86-sol.o asm/yx86-sol.o:asm/bx86-sol.o:asm/mx86-sol.o:asm/sx86-sol.o:asm/cx86-sol.o:asm/rx86-sol.o:asm/rm86-sol.o:asm/r586-sol.o";
 | 
					 | 
				
			||||||
my $x86_elf_asm="asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o:asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o";
 | 
					my $x86_elf_asm="asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o:asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o";
 | 
				
			||||||
my $x86_out_asm="asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o:asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o";
 | 
					my $x86_out_asm="asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o:asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o";
 | 
				
			||||||
my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/mx86bsdi.o:asm/sx86bsdi.o:asm/cx86bsdi.o:asm/rx86bsdi.o:asm/rm86bsdi.o:asm/r586bsdi.o";
 | 
					my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/mx86bsdi.o:asm/sx86bsdi.o:asm/cx86bsdi.o:asm/rx86bsdi.o:asm/rm86bsdi.o:asm/r586bsdi.o";
 | 
				
			||||||
@@ -135,20 +135,21 @@ my %table=(
 | 
				
			|||||||
# Our development configs
 | 
					# Our development configs
 | 
				
			||||||
"purify",	"purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
 | 
					"purify",	"purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
 | 
				
			||||||
"debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
 | 
					"debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
 | 
				
			||||||
"debug-ben",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
 | 
					"debug-ben",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
 | 
				
			||||||
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 | 
					"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 | 
				
			||||||
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 | 
					"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 | 
				
			||||||
"debug-ben-debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::",
 | 
					"debug-ben-debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::::",
 | 
				
			||||||
"debug-ben-strict",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
 | 
					"debug-ben-strict",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
 | 
				
			||||||
 | 
					"debug-ben-fips-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_FIPS -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
 | 
				
			||||||
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
					"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
				
			||||||
"debug-bodo",	"gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
					"debug-bodo",	"gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
				
			||||||
"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-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",	"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-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 -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-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 -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-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 -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-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 -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)",
 | 
					"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 -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)::::::",
 | 
					"dist",		"cc:-O::(unknown)::::::",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Basic configs that should work on any (32 and less bit) box
 | 
					# Basic configs that should work on any (32 and less bit) box
 | 
				
			||||||
@@ -161,25 +162,25 @@ my %table=(
 | 
				
			|||||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
 | 
					# surrounds it with #APP #NO_APP comment pair which (at least Solaris
 | 
				
			||||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
 | 
					# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
 | 
				
			||||||
# error message.
 | 
					# 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_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Solaris x86 with Sun C setups
 | 
					#### 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)",
 | 
					"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
 | 
					#### 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-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::.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
 | 
					# -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)",
 | 
					"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:.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
 | 
					# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
 | 
				
			||||||
# but keep the assembler modules.
 | 
					# 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)",
 | 
					"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:.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-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::.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
 | 
					#### 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
 | 
					# DO NOT use /xO[34] on sparc with SC3.0.  It is broken, and will not pass the tests
 | 
				
			||||||
@@ -203,9 +204,8 @@ my %table=(
 | 
				
			|||||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
 | 
					# it's a real mess with -mcpu=ultrasparc option under Linux, but
 | 
				
			||||||
# -Wa,-Av8plus should do the trick no matter what.
 | 
					# -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)",
 | 
					"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!!!
 | 
					# GCC 3.1 is a requirement
 | 
				
			||||||
#    We have to wait till 64-bit glibc for SPARC is operational!!!
 | 
					"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)",
 | 
				
			||||||
#"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:",
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Sunos configs, assuming sparc for the gcc one.
 | 
					# Sunos configs, assuming sparc for the gcc one.
 | 
				
			||||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:::",
 | 
					##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:::",
 | 
				
			||||||
@@ -217,13 +217,13 @@ my %table=(
 | 
				
			|||||||
"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
#### IRIX 6.x configs
 | 
					#### IRIX 6.x configs
 | 
				
			||||||
# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
 | 
					# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
 | 
				
			||||||
# './Configure irix-[g]cc' manually.
 | 
					# './Configure irix-cc -o32' manually.
 | 
				
			||||||
# -mips4 flag is added by ./config when appropriate.
 | 
					# -mips4 flag is added by ./config when appropriate.
 | 
				
			||||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
# N64 ABI builds.
 | 
					# N64 ABI builds.
 | 
				
			||||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Unified HP-UX ANSI C configs.
 | 
					#### Unified HP-UX ANSI C configs.
 | 
				
			||||||
# Special notes:
 | 
					# Special notes:
 | 
				
			||||||
@@ -261,24 +261,24 @@ my %table=(
 | 
				
			|||||||
# 64bit PARISC for GCC without optimization, which seems to make problems.
 | 
					# 64bit PARISC for GCC without optimization, which seems to make problems.
 | 
				
			||||||
# Submitted by <ross.alexander@uk.neceur.com>
 | 
					# Submitted by <ross.alexander@uk.neceur.com>
 | 
				
			||||||
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# IA-64 targets
 | 
					# IA-64 targets
 | 
				
			||||||
# I have no idea if this one actually works, feedback needed. <appro>
 | 
					"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
 | 
					# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
 | 
				
			||||||
# with debugging of the following config.
 | 
					# with debugging of the following config.
 | 
				
			||||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
 | 
					# More attempts at unified 10.X and 11.X targets for HP C compiler.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Chris Ruemmler <ruemmler@cup.hp.com>
 | 
					# Chris Ruemmler <ruemmler@cup.hp.com>
 | 
				
			||||||
# Kevin Steves <ks@hp.se>
 | 
					# Kevin Steves <ks@hp.se>
 | 
				
			||||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
 | 
					# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
 | 
				
			||||||
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
 | 
					# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
 | 
				
			||||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# HPUX 9.X config.
 | 
					# HPUX 9.X config.
 | 
				
			||||||
# Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or
 | 
					# Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or
 | 
				
			||||||
@@ -385,17 +385,21 @@ my %table=(
 | 
				
			|||||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
					"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
				
			||||||
"linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
					"linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
				
			||||||
"linux-mipsel",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
 | 
					"linux-mipsel",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"linux-mips",   "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
 | 
					"linux-mips",   "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"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-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-m68k",   "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
 | 
				
			||||||
"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-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-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-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-ia64-ecc",   "ecc:-DL_ENDIAN -DTERMIO -O2 -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-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-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)",
 | 
					"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)",
 | 
				
			||||||
"FreeBSD-elf",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"FreeBSD-elf",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"FreeBSD-sparc64","gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"FreeBSD-ia64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64-cpp.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"FreeBSD",      "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
					"FreeBSD",      "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
				
			||||||
"bsdi-gcc",     "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown):::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
 | 
					"bsdi-gcc",     "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown):::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
 | 
				
			||||||
"bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
@@ -403,7 +407,7 @@ my %table=(
 | 
				
			|||||||
"nextstep3.3",	"cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
					"nextstep3.3",	"cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# NCR MP-RAS UNIX ver 02.03.01
 | 
					# NCR MP-RAS UNIX ver 02.03.01
 | 
				
			||||||
"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
					"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl -lc89:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# QNX 4
 | 
					# QNX 4
 | 
				
			||||||
"qnx4",	"cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
 | 
					"qnx4",	"cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
 | 
				
			||||||
@@ -414,33 +418,36 @@ my %table=(
 | 
				
			|||||||
# Linux on ARM
 | 
					# Linux on ARM
 | 
				
			||||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# SCO/Caldera targets.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
 | 
				
			||||||
 | 
					# Now we only have blended unixware-* as it's the only one used by ./config.
 | 
				
			||||||
 | 
					# If you want to optimize for particular microarchitecture, bypass ./config
 | 
				
			||||||
 | 
					# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
 | 
				
			||||||
 | 
					# Note that not all targets include assembler support. Mostly because of
 | 
				
			||||||
 | 
					# lack of motivation to support out-of-date platforms with out-of-date
 | 
				
			||||||
 | 
					# compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
 | 
				
			||||||
 | 
					# patiently assisted to debug most of it.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
# UnixWare 2.0x fails destest with -O
 | 
					# UnixWare 2.0x fails destest with -O
 | 
				
			||||||
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
					"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
				
			||||||
"unixware-2.0-pentium","cc:-DFILIO_H -DNO_STRINGS_H -Kpentium::-Kthread::-lsocket -lnsl -lresolv -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# UnixWare 2.1
 | 
					 | 
				
			||||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
					"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
				
			||||||
"unixware-2.1-pentium","cc:-O -DFILIO_H -Kpentium::-Kthread::-lsocket -lnsl -lresolv -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
					"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
"unixware-2.1-p6","cc:-O -DFILIO_H -Kp6::-Kthread::-lsocket -lnsl -lresolv -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
					"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"sco3-gcc",  "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
 | 
				
			||||||
 | 
					# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
 | 
				
			||||||
 | 
					"sco5-cc",  "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					"sco5-gcc",  "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# UnixWare 7
 | 
					 | 
				
			||||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
"unixware-7-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
"unixware-7-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OpenUNIX 8
 | 
					 | 
				
			||||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
"OpenUNIX-8-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
"OpenUNIX-8-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# IBM's AIX.
 | 
					# IBM's AIX.
 | 
				
			||||||
"aix-cc",   "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 | 
					"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:::",
 | 
					"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-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
 | 
				
			||||||
"aix43-gcc",  "gcc:-O1 -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",
 | 
					"aix64-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Cray T90 and similar (SDSC)
 | 
					# Cray T90 and similar (SDSC)
 | 
				
			||||||
@@ -473,15 +480,6 @@ my %table=(
 | 
				
			|||||||
"dgux-R4-gcc",	"gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::",
 | 
					"dgux-R4-gcc",	"gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::",
 | 
				
			||||||
"dgux-R4-x86-gcc",	"gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
					"dgux-R4-x86-gcc",	"gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# SCO 3 - Tim Rice <tim@multitalents.net>
 | 
					 | 
				
			||||||
"sco3-gcc",  "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the
 | 
					 | 
				
			||||||
# 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 ...
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Sinix/ReliantUNIX RM400
 | 
					# Sinix/ReliantUNIX RM400
 | 
				
			||||||
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g  */
 | 
					# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g  */
 | 
				
			||||||
"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:reliantunix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
					"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:reliantunix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
				
			||||||
@@ -508,13 +506,11 @@ my %table=(
 | 
				
			|||||||
"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
					"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Borland C++ 4.5
 | 
					# Borland C++ 4.5
 | 
				
			||||||
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX::::::::::win32",
 | 
					"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN::::::::::win32",
 | 
				
			||||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
					"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Mingw32
 | 
					# MinGW
 | 
				
			||||||
# (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl
 | 
					"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-mno-cygwin -lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32::::.dll",
 | 
				
			||||||
# and its library files in util/pl/*)
 | 
					 | 
				
			||||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# UWIN 
 | 
					# UWIN 
 | 
				
			||||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
					"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
				
			||||||
@@ -527,7 +523,7 @@ my %table=(
 | 
				
			|||||||
"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}::::::::::",
 | 
					"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 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):::::::",
 | 
					"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
 | 
				
			||||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
 | 
					# K&R C is no longer supported; you need gcc on old Ultrix installations
 | 
				
			||||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
 | 
					##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
 | 
				
			||||||
@@ -566,6 +562,8 @@ my %table=(
 | 
				
			|||||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
 | 
					"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","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
 | 
				
			||||||
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
 | 
					"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
 | 
				
			||||||
 | 
					"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
 | 
				
			||||||
 | 
					"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::::::::::::::::ranlibmips:",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##### Compaq Non-Stop Kernel (Tandem)
 | 
					##### 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:::",
 | 
					"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
 | 
				
			||||||
@@ -612,7 +610,7 @@ my $threads=0;
 | 
				
			|||||||
my $no_asm=0;
 | 
					my $no_asm=0;
 | 
				
			||||||
my $no_dso=0;
 | 
					my $no_dso=0;
 | 
				
			||||||
my @skip=();
 | 
					my @skip=();
 | 
				
			||||||
my $Makefile="Makefile.ssl";
 | 
					my $Makefile="Makefile";
 | 
				
			||||||
my $des_locl="crypto/des/des_locl.h";
 | 
					my $des_locl="crypto/des/des_locl.h";
 | 
				
			||||||
my $des	="crypto/des/des.h";
 | 
					my $des	="crypto/des/des.h";
 | 
				
			||||||
my $bn	="crypto/bn/bn.h";
 | 
					my $bn	="crypto/bn/bn.h";
 | 
				
			||||||
@@ -624,6 +622,7 @@ my $rc2	="crypto/rc2/rc2.h";
 | 
				
			|||||||
my $bf	="crypto/bf/bf_locl.h";
 | 
					my $bf	="crypto/bf/bf_locl.h";
 | 
				
			||||||
my $bn_asm	="bn_asm.o";
 | 
					my $bn_asm	="bn_asm.o";
 | 
				
			||||||
my $des_enc="des_enc.o fcrypt_b.o";
 | 
					my $des_enc="des_enc.o fcrypt_b.o";
 | 
				
			||||||
 | 
					my $fips_des_enc="fips_des_enc.o";
 | 
				
			||||||
my $bf_enc	="bf_enc.o";
 | 
					my $bf_enc	="bf_enc.o";
 | 
				
			||||||
my $cast_enc="c_enc.o";
 | 
					my $cast_enc="c_enc.o";
 | 
				
			||||||
my $rc4_enc="rc4_enc.o";
 | 
					my $rc4_enc="rc4_enc.o";
 | 
				
			||||||
@@ -634,6 +633,8 @@ my $rmd160_obj="";
 | 
				
			|||||||
my $processor="";
 | 
					my $processor="";
 | 
				
			||||||
my $default_ranlib;
 | 
					my $default_ranlib;
 | 
				
			||||||
my $perl;
 | 
					my $perl;
 | 
				
			||||||
 | 
					my $fips=0;
 | 
				
			||||||
 | 
					my $debug=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $no_ssl2=0;
 | 
					my $no_ssl2=0;
 | 
				
			||||||
my $no_ssl3=0;
 | 
					my $no_ssl3=0;
 | 
				
			||||||
@@ -656,6 +657,7 @@ my $openssl_thread_defines;
 | 
				
			|||||||
my $openssl_sys_defines="";
 | 
					my $openssl_sys_defines="";
 | 
				
			||||||
my $openssl_other_defines;
 | 
					my $openssl_other_defines;
 | 
				
			||||||
my $libs;
 | 
					my $libs;
 | 
				
			||||||
 | 
					my $libkrb5="";
 | 
				
			||||||
my $target;
 | 
					my $target;
 | 
				
			||||||
my $options;
 | 
					my $options;
 | 
				
			||||||
my $symlink;
 | 
					my $symlink;
 | 
				
			||||||
@@ -696,6 +698,11 @@ PROCESS_ARGS:
 | 
				
			|||||||
			$flags .= "-DOPENSSL_NO_ASM ";
 | 
								$flags .= "-DOPENSSL_NO_ASM ";
 | 
				
			||||||
			$openssl_other_defines .= "#define OPENSSL_NO_ASM\n";
 | 
								$openssl_other_defines .= "#define OPENSSL_NO_ASM\n";
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							elsif (/^no-err$/)
 | 
				
			||||||
 | 
							 	{
 | 
				
			||||||
 | 
								$flags .= "-DOPENSSL_NO_ERR ";
 | 
				
			||||||
 | 
								$openssl_other_defines .= "#define OPENSSL_NO_ERR\n";
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		elsif (/^no-hw-(.+)$/)
 | 
							elsif (/^no-hw-(.+)$/)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			my $hw=$1;
 | 
								my $hw=$1;
 | 
				
			||||||
@@ -736,6 +743,8 @@ PROCESS_ARGS:
 | 
				
			|||||||
			{ $no_ssl3 = 1; }
 | 
								{ $no_ssl3 = 1; }
 | 
				
			||||||
		elsif (/^no-tls1?$/)
 | 
							elsif (/^no-tls1?$/)
 | 
				
			||||||
			{ $no_tls1 = 1; }
 | 
								{ $no_tls1 = 1; }
 | 
				
			||||||
 | 
							elsif (/^no-fips$/)
 | 
				
			||||||
 | 
								{ $fips = 0; }
 | 
				
			||||||
		elsif (/^no-(.+)$/)
 | 
							elsif (/^no-(.+)$/)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			my $algo=$1;
 | 
								my $algo=$1;
 | 
				
			||||||
@@ -759,27 +768,6 @@ PROCESS_ARGS:
 | 
				
			|||||||
				$depflags .= "-DOPENSSL_NO_MDC2 ";
 | 
									$depflags .= "-DOPENSSL_NO_MDC2 ";
 | 
				
			||||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n";
 | 
									$openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n";
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			if ($algo eq "EC")
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				push @skip, "ecdsa";
 | 
					 | 
				
			||||||
				push @skip, "ecdh";
 | 
					 | 
				
			||||||
				$options .= " no-ecdsa";
 | 
					 | 
				
			||||||
				$options .= " no-ecdh";
 | 
					 | 
				
			||||||
				$flags .= "-DOPENSSL_NO_ECDSA ";
 | 
					 | 
				
			||||||
				$flags .= "-DOPENSSL_NO_ECDH ";
 | 
					 | 
				
			||||||
				$depflags .= "-DOPENSSL_NO_ECDSA ";
 | 
					 | 
				
			||||||
				$depflags .= "-DOPENSSL_NO_ECDH ";
 | 
					 | 
				
			||||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_ECDSA\n";
 | 
					 | 
				
			||||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_ECDH\n";
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			if ($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")
 | 
								if ($algo eq "MD5")
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				$no_md5 = 1;
 | 
									$no_md5 = 1;
 | 
				
			||||||
@@ -822,6 +810,14 @@ PROCESS_ARGS:
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		elsif (/^386$/)
 | 
							elsif (/^386$/)
 | 
				
			||||||
			{ $processor=386; }
 | 
								{ $processor=386; }
 | 
				
			||||||
 | 
							elsif (/^fips$/)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								$fips=1;
 | 
				
			||||||
 | 
							        }
 | 
				
			||||||
 | 
							elsif (/^debug$/)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								$debug=1;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		elsif (/^rsaref$/)
 | 
							elsif (/^rsaref$/)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			# No RSAref support any more since it's not needed.
 | 
								# No RSAref support any more since it's not needed.
 | 
				
			||||||
@@ -977,6 +973,8 @@ my $shared_extension = $fields[$idx_shared_extension];
 | 
				
			|||||||
my $ranlib = $fields[$idx_ranlib];
 | 
					my $ranlib = $fields[$idx_ranlib];
 | 
				
			||||||
my $arflags = $fields[$idx_arflags];
 | 
					my $arflags = $fields[$idx_arflags];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					my $no_shared_warn=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$cflags="$flags$cflags" if ($flags ne "");
 | 
					$cflags="$flags$cflags" if ($flags ne "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Kerberos settings.  The flavor must be provided from outside, either through
 | 
					# Kerberos settings.  The flavor must be provided from outside, either through
 | 
				
			||||||
@@ -1037,7 +1035,7 @@ else
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	$withargs{"krb5-lib"} .= " -lresolv"
 | 
						$withargs{"krb5-lib"} .= " -lresolv"
 | 
				
			||||||
		if ("$lresolv");
 | 
							if ("$lresolv" ne "");
 | 
				
			||||||
	$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
 | 
						$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
 | 
				
			||||||
		if $withargs{"krb5-include"} eq "" &&
 | 
							if $withargs{"krb5-include"} eq "" &&
 | 
				
			||||||
		   $withargs{"krb5-dir"} ne "";
 | 
							   $withargs{"krb5-dir"} ne "";
 | 
				
			||||||
@@ -1096,7 +1094,7 @@ else
 | 
				
			|||||||
#		}
 | 
					#		}
 | 
				
			||||||
	}	
 | 
						}	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$lflags="$libs$lflags"if ($libs ne "");
 | 
					$lflags="$libs$lflags" if ($libs ne "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ($no_asm)
 | 
					if ($no_asm)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -1104,6 +1102,11 @@ if ($no_asm)
 | 
				
			|||||||
	$sha1_obj=$md5_obj=$rmd160_obj="";
 | 
						$sha1_obj=$md5_obj=$rmd160_obj="";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (!$no_shared)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						$cast_obj="";	# CAST assembler is not PIC
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ($threads)
 | 
					if ($threads)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	$cflags=$thread_cflags;
 | 
						$cflags=$thread_cflags;
 | 
				
			||||||
@@ -1119,31 +1122,17 @@ if ($zlib)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
 | 
					# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
 | 
				
			||||||
my $shared_mark = "";
 | 
					my $shared_mark = "";
 | 
				
			||||||
if ($shared_target ne "")
 | 
					if ($shared_target eq "")
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						$no_shared_warn = 1 if !$no_shared;
 | 
				
			||||||
 | 
						$no_shared = 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					if (!$no_shared)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	if ($shared_cflag ne "")
 | 
						if ($shared_cflag ne "")
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		$cflags = "$shared_cflag $cflags";
 | 
							$cflags = "$shared_cflag $cflags";
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if (!$no_shared)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		#$shared_mark = "\$(SHARED_LIBS)";
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	$no_shared = 1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if ($no_shared)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	$cflags="-DOPENSSL_NO_DYNAMIC_ENGINE $cflags";
 | 
					 | 
				
			||||||
	$openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n";
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	$cflags="-DOPENSSL_NO_STATIC_ENGINE $cflags";
 | 
					 | 
				
			||||||
	$openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ($sys_id ne "")
 | 
					if ($sys_id ne "")
 | 
				
			||||||
@@ -1164,12 +1153,20 @@ if ($ranlib eq "")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
$bn_obj = $bn_asm unless $bn_obj ne "";
 | 
					$bn_obj = $bn_asm unless $bn_obj ne "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$des_obj=$des_enc	unless ($des_obj =~ /\.o$/);
 | 
					if ($fips)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						$des_obj=$sha1_obj="";
 | 
				
			||||||
 | 
						$openssl_other_defines.="#define OPENSSL_FIPS\n";
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					$des_obj=$des_enc	unless (!$fips && $des_obj =~ /\.o$/);
 | 
				
			||||||
 | 
					my $fips_des_obj='asm/fips-dx86-elf.o';
 | 
				
			||||||
 | 
					$fips_des_obj=$fips_des_enc unless $processor eq '386';
 | 
				
			||||||
 | 
					my $fips_sha1_obj='asm/sx86-elf.o' if $processor eq '386';
 | 
				
			||||||
$bf_obj=$bf_enc		unless ($bf_obj =~ /\.o$/);
 | 
					$bf_obj=$bf_enc		unless ($bf_obj =~ /\.o$/);
 | 
				
			||||||
$cast_obj=$cast_enc	unless ($cast_obj =~ /\.o$/);
 | 
					$cast_obj=$cast_enc	unless ($cast_obj =~ /\.o$/);
 | 
				
			||||||
$rc4_obj=$rc4_enc	unless ($rc4_obj =~ /\.o$/);
 | 
					$rc4_obj=$rc4_enc	unless ($rc4_obj =~ /\.o$/);
 | 
				
			||||||
$rc5_obj=$rc5_enc	unless ($rc5_obj =~ /\.o$/);
 | 
					$rc5_obj=$rc5_enc	unless ($rc5_obj =~ /\.o$/);
 | 
				
			||||||
if ($sha1_obj =~ /\.o$/)
 | 
					if ($sha1_obj =~ /\.o$/ || $fips_sha1_obj =~ /\.o$/)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
#	$sha1_obj=$sha1_enc;
 | 
					#	$sha1_obj=$sha1_enc;
 | 
				
			||||||
	$cflags.=" -DSHA1_ASM";
 | 
						$cflags.=" -DSHA1_ASM";
 | 
				
			||||||
@@ -1185,12 +1182,17 @@ if ($rmd160_obj =~ /\.o$/)
 | 
				
			|||||||
	$cflags.=" -DRMD160_ASM";
 | 
						$cflags.=" -DRMD160_ASM";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if ($debug)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						$cflags.=" -g";
 | 
				
			||||||
 | 
						$cflags=~s/-fomit-frame-pointer//;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# "Stringify" the C flags string.  This permits it to be made part of a string
 | 
					# "Stringify" the C flags string.  This permits it to be made part of a string
 | 
				
			||||||
# and works as well on command lines.
 | 
					# and works as well on command lines.
 | 
				
			||||||
$cflags =~ s/([\\\"])/\\\1/g;
 | 
					$cflags =~ s/([\\\"])/\\\1/g;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $version = "unknown";
 | 
					my $version = "unknown";
 | 
				
			||||||
my $version_num = "unknown";
 | 
					 | 
				
			||||||
my $major = "unknown";
 | 
					my $major = "unknown";
 | 
				
			||||||
my $minor = "unknown";
 | 
					my $minor = "unknown";
 | 
				
			||||||
my $shlib_version_number = "unknown";
 | 
					my $shlib_version_number = "unknown";
 | 
				
			||||||
@@ -1202,7 +1204,6 @@ open(IN,'<crypto/opensslv.h') || die "unable to read opensslv.h:$!\n";
 | 
				
			|||||||
while (<IN>)
 | 
					while (<IN>)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	$version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /;
 | 
						$version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /;
 | 
				
			||||||
	$version_num=$1 if /OPENSSL.VERSION.NUMBER.*0x(\S+)/;
 | 
					 | 
				
			||||||
	$shlib_version_number=$1 if /SHLIB_VERSION_NUMBER *"([^"]+)"/;
 | 
						$shlib_version_number=$1 if /SHLIB_VERSION_NUMBER *"([^"]+)"/;
 | 
				
			||||||
	$shlib_version_history=$1 if /SHLIB_VERSION_HISTORY *"([^"]*)"/;
 | 
						$shlib_version_history=$1 if /SHLIB_VERSION_HISTORY *"([^"]*)"/;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -1259,12 +1260,14 @@ while (<IN>)
 | 
				
			|||||||
	s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
 | 
						s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
 | 
				
			||||||
	s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
 | 
						s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
 | 
				
			||||||
	s/^DES_ENC=.*$/DES_ENC= $des_obj/;
 | 
						s/^DES_ENC=.*$/DES_ENC= $des_obj/;
 | 
				
			||||||
 | 
						s/^FIPS_DES_ENC=.*$/FIPS_DES_ENC= $fips_des_obj/;
 | 
				
			||||||
	s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
 | 
						s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
 | 
				
			||||||
	s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
 | 
						s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
 | 
				
			||||||
	s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
 | 
						s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
 | 
				
			||||||
	s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/;
 | 
						s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/;
 | 
				
			||||||
	s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
 | 
						s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
 | 
				
			||||||
	s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
 | 
						s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
 | 
				
			||||||
 | 
						s/^FIPS_SHA1_ASM_OBJ=.*$/FIPS_SHA1_ASM_OBJ= $fips_sha1_obj/;
 | 
				
			||||||
	s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
 | 
						s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
 | 
				
			||||||
	s/^PROCESSOR=.*/PROCESSOR= $processor/;
 | 
						s/^PROCESSOR=.*/PROCESSOR= $processor/;
 | 
				
			||||||
	s/^RANLIB=.*/RANLIB= $ranlib/;
 | 
						s/^RANLIB=.*/RANLIB= $ranlib/;
 | 
				
			||||||
@@ -1319,8 +1322,6 @@ print "ARFLAGS       =$arflags\n";
 | 
				
			|||||||
print "PERL          =$perl\n";
 | 
					print "PERL          =$perl\n";
 | 
				
			||||||
print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n"
 | 
					print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n"
 | 
				
			||||||
	if $withargs{"krb5-include"} ne "";
 | 
						if $withargs{"krb5-include"} ne "";
 | 
				
			||||||
print "LIBKRB5       =",$withargs{"krb5-lib"},"\n"
 | 
					 | 
				
			||||||
	if $withargs{"krb5-lib"} ne "";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $des_ptr=0;
 | 
					my $des_ptr=0;
 | 
				
			||||||
my $des_risc1=0;
 | 
					my $des_risc1=0;
 | 
				
			||||||
@@ -1499,7 +1500,7 @@ if($IsWindows) {
 | 
				
			|||||||
	printf OUT <<EOF;
 | 
						printf OUT <<EOF;
 | 
				
			||||||
#ifndef MK1MF_BUILD
 | 
					#ifndef MK1MF_BUILD
 | 
				
			||||||
  /* auto-generated by Configure for crypto/cversion.c:
 | 
					  /* auto-generated by Configure for crypto/cversion.c:
 | 
				
			||||||
   * for Unix builds, crypto/Makefile.ssl generates functional definitions;
 | 
					   * for Unix builds, crypto/Makefile generates functional definitions;
 | 
				
			||||||
   * Windows builds (and other mk1mf builds) compile cversion.c with
 | 
					   * Windows builds (and other mk1mf builds) compile cversion.c with
 | 
				
			||||||
   * -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
 | 
					   * -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
 | 
				
			||||||
  #error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
 | 
					  #error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
 | 
				
			||||||
@@ -1507,7 +1508,7 @@ if($IsWindows) {
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
	close(OUT);
 | 
						close(OUT);
 | 
				
			||||||
} else {
 | 
					} else {
 | 
				
			||||||
	my $make_command = "make -f Makefile.ssl PERL=\'$perl\'";
 | 
						my $make_command = "make PERL=\'$perl\'";
 | 
				
			||||||
	my $make_targets = "";
 | 
						my $make_targets = "";
 | 
				
			||||||
	$make_targets .= " links" if $symlink;
 | 
						$make_targets .= " links" if $symlink;
 | 
				
			||||||
	$make_targets .= " depend" if $depflags ne "" && $make_depend;
 | 
						$make_targets .= " depend" if $depflags ne "" && $make_depend;
 | 
				
			||||||
@@ -1535,68 +1536,6 @@ EOF
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# create the ms/version32.rc file if needed
 | 
					 | 
				
			||||||
if ($IsWindows) {
 | 
					 | 
				
			||||||
	my ($v1, $v2, $v3, $v4);
 | 
					 | 
				
			||||||
	if ($version_num =~ /(^[0-9a-f]{1})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i) {
 | 
					 | 
				
			||||||
		$v1=hex $1;
 | 
					 | 
				
			||||||
		$v2=hex $2;
 | 
					 | 
				
			||||||
		$v3=hex $3;
 | 
					 | 
				
			||||||
		$v4=hex $4;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	open (OUT,">ms/version32.rc") || die "Can't open ms/version32.rc";
 | 
					 | 
				
			||||||
	print OUT <<EOF;
 | 
					 | 
				
			||||||
#include <winver.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LANGUAGE 0x09,0x01
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
1 VERSIONINFO
 | 
					 | 
				
			||||||
  FILEVERSION $v1,$v2,$v3,$v4
 | 
					 | 
				
			||||||
  PRODUCTVERSION $v1,$v2,$v3,$v4
 | 
					 | 
				
			||||||
  FILEFLAGSMASK 0x3fL
 | 
					 | 
				
			||||||
#ifdef _DEBUG
 | 
					 | 
				
			||||||
  FILEFLAGS 0x01L
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
  FILEFLAGS 0x00L
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
  FILEOS VOS__WINDOWS32
 | 
					 | 
				
			||||||
  FILETYPE VFT_DLL
 | 
					 | 
				
			||||||
  FILESUBTYPE 0x0L
 | 
					 | 
				
			||||||
BEGIN
 | 
					 | 
				
			||||||
    BLOCK "StringFileInfo"
 | 
					 | 
				
			||||||
    BEGIN
 | 
					 | 
				
			||||||
	BLOCK "040904b0"
 | 
					 | 
				
			||||||
	BEGIN
 | 
					 | 
				
			||||||
	    // Required:	    
 | 
					 | 
				
			||||||
	    VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
 | 
					 | 
				
			||||||
	    VALUE "FileDescription", "OpenSSL Shared Library\\0"
 | 
					 | 
				
			||||||
	    VALUE "FileVersion", "$version\\0"
 | 
					 | 
				
			||||||
#if defined(CRYPTO)
 | 
					 | 
				
			||||||
	    VALUE "InternalName", "libeay32\\0"
 | 
					 | 
				
			||||||
	    VALUE "OriginalFilename", "libeay32.dll\\0"
 | 
					 | 
				
			||||||
#elif defined(SSL)
 | 
					 | 
				
			||||||
	    VALUE "InternalName", "ssleay32\\0"
 | 
					 | 
				
			||||||
	    VALUE "OriginalFilename", "ssleay32.dll\\0"
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	    VALUE "ProductName", "The OpenSSL Toolkit\\0"
 | 
					 | 
				
			||||||
	    VALUE "ProductVersion", "$version\\0"
 | 
					 | 
				
			||||||
	    // Optional:
 | 
					 | 
				
			||||||
	    //VALUE "Comments", "\\0"
 | 
					 | 
				
			||||||
	    VALUE "LegalCopyright", "Copyright <20> 1998-2002 The OpenSSL Project. Copyright <20> 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"
 | 
					 | 
				
			||||||
	    //VALUE "LegalTrademarks", "\\0"
 | 
					 | 
				
			||||||
	    //VALUE "PrivateBuild", "\\0"
 | 
					 | 
				
			||||||
	    //VALUE "SpecialBuild", "\\0"
 | 
					 | 
				
			||||||
	END
 | 
					 | 
				
			||||||
    END
 | 
					 | 
				
			||||||
    BLOCK "VarFileInfo"
 | 
					 | 
				
			||||||
    BEGIN
 | 
					 | 
				
			||||||
        VALUE "Translation", 0x409, 0x4b0
 | 
					 | 
				
			||||||
    END
 | 
					 | 
				
			||||||
END
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
	close(OUT);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
print <<EOF;
 | 
					print <<EOF;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Configured for $target.
 | 
					Configured for $target.
 | 
				
			||||||
@@ -1609,6 +1548,16 @@ applications as the compiler options required on this system are not known.
 | 
				
			|||||||
See file INSTALL for details if you need multi-threading.
 | 
					See file INSTALL for details if you need multi-threading.
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					print <<\EOF if ($no_shared_warn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You gave the option 'shared'.  Normally, that would give you shared libraries.
 | 
				
			||||||
 | 
					Unfortunately, the OpenSSL configuration doesn't include shared library support
 | 
				
			||||||
 | 
					for this platform yet, so it will pretend you gave the option 'no-shared'.  If
 | 
				
			||||||
 | 
					you can inform the developpers (openssl-dev\@openssl.org) how to support shared
 | 
				
			||||||
 | 
					libraries on this platform, they will at least look at it and try their best
 | 
				
			||||||
 | 
					(but please first make sure you have tried with a current version of OpenSSL).
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit(0);
 | 
					exit(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub usage
 | 
					sub usage
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										100
									
								
								FAQ
									
									
									
									
									
								
							
							
						
						
									
										100
									
								
								FAQ
									
									
									
									
									
								
							@@ -44,6 +44,8 @@ OpenSSL  -  Frequently Asked Questions
 | 
				
			|||||||
* What is special about OpenSSL on Redhat?
 | 
					* What is special about OpenSSL on Redhat?
 | 
				
			||||||
* Why does the OpenSSL compilation fail on MacOS X?
 | 
					* 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 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
 | 
					[PROG] Questions about programming with OpenSSL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -66,7 +68,7 @@ OpenSSL  -  Frequently Asked Questions
 | 
				
			|||||||
* Which is the current version of OpenSSL?
 | 
					* Which is the current version of OpenSSL?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The current version is available from <URL: http://www.openssl.org>.
 | 
					The current version is available from <URL: http://www.openssl.org>.
 | 
				
			||||||
OpenSSL 0.9.6g was released on August 9, 2002.
 | 
					OpenSSL 0.9.7d was released on March 17, 2004.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In addition to the current stable release, you can also access daily
 | 
					In addition to the current stable release, you can also access daily
 | 
				
			||||||
snapshots of the OpenSSL development version at <URL:
 | 
					snapshots of the OpenSSL development version at <URL:
 | 
				
			||||||
@@ -114,11 +116,14 @@ OpenSSL.  Information on the OpenSSL mailing lists is available from
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* Where can I get a compiled version of OpenSSL?
 | 
					* Where can I get a compiled version of OpenSSL?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can finder pointers to binary distributions in
 | 
				
			||||||
 | 
					http://www.openssl.org/related/binaries.html .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Some applications that use OpenSSL are distributed in binary form.
 | 
					Some applications that use OpenSSL are distributed in binary form.
 | 
				
			||||||
When using such an application, you don't need to install OpenSSL
 | 
					When using such an application, you don't need to install OpenSSL
 | 
				
			||||||
yourself; the application will include the required parts (e.g. DLLs).
 | 
					yourself; the application will include the required parts (e.g. DLLs).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If you want to install OpenSSL on a Windows system and you don't have
 | 
					If you want to build OpenSSL on a Windows system and you don't have
 | 
				
			||||||
a C compiler, read the "Mingw32" section of INSTALL.W32 for information
 | 
					a C compiler, read the "Mingw32" section of INSTALL.W32 for information
 | 
				
			||||||
on how to obtain and install the free GNU C compiler.
 | 
					on how to obtain and install the free GNU C compiler.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -187,18 +192,30 @@ for permission to use their software with OpenSSL.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Cryptographic software needs a source of unpredictable data to work
 | 
					Cryptographic software needs a source of unpredictable data to work
 | 
				
			||||||
correctly.  Many open source operating systems provide a "randomness
 | 
					correctly.  Many open source operating systems provide a "randomness
 | 
				
			||||||
device" that serves this purpose.  On other systems, applications have
 | 
					device" (/dev/urandom or /dev/random) that serves this purpose.
 | 
				
			||||||
to call the RAND_add() or RAND_seed() function with appropriate data
 | 
					All OpenSSL versions try to use /dev/urandom by default; starting with
 | 
				
			||||||
before generating keys or performing public key encryption.
 | 
					version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not
 | 
				
			||||||
(These functions initialize the pseudo-random number generator, PRNG.)
 | 
					available.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Some broken applications do not do this.  As of version 0.9.5, the
 | 
					On other systems, applications have to call the RAND_add() or
 | 
				
			||||||
OpenSSL functions that need randomness report an error if the random
 | 
					RAND_seed() function with appropriate data before generating keys or
 | 
				
			||||||
number generator has not been seeded with at least 128 bits of
 | 
					performing public key encryption. (These functions initialize the
 | 
				
			||||||
randomness.  If this error occurs, please contact the author of the
 | 
					pseudo-random number generator, PRNG.)  Some broken applications do
 | 
				
			||||||
application you are using.  It is likely that it never worked
 | 
					not do this.  As of version 0.9.5, the OpenSSL functions that need
 | 
				
			||||||
correctly.  OpenSSL 0.9.5 and later make the error visible by refusing
 | 
					randomness report an error if the random number generator has not been
 | 
				
			||||||
to perform potentially insecure encryption.
 | 
					seeded with at least 128 bits of randomness.  If this error occurs and
 | 
				
			||||||
 | 
					is not discussed in the documentation of the application you are
 | 
				
			||||||
 | 
					using, please contact the author of that application; it is likely
 | 
				
			||||||
 | 
					that it never worked correctly.  OpenSSL 0.9.5 and later make the
 | 
				
			||||||
 | 
					error visible by refusing to perform potentially insecure encryption.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you are using Solaris 8, you can add /dev/urandom and /dev/random
 | 
				
			||||||
 | 
					devices by installing patch 112438 (Sparc) or 112439 (x86), which are
 | 
				
			||||||
 | 
					available via the Patchfinder at <URL: http://sunsolve.sun.com>
 | 
				
			||||||
 | 
					(Solaris 9 includes these devices by default). For /dev/random support
 | 
				
			||||||
 | 
					for earlier Solaris versions, see Sun's statement at
 | 
				
			||||||
 | 
					<URL: http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski>
 | 
				
			||||||
 | 
					(the SUNWski package is available in patch 105710).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
On systems without /dev/urandom and /dev/random, it is a good idea to
 | 
					On systems without /dev/urandom and /dev/random, it is a good idea to
 | 
				
			||||||
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
 | 
					use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
 | 
				
			||||||
@@ -231,18 +248,6 @@ OpenSSL command line tools. Applications using the OpenSSL library
 | 
				
			|||||||
provide their own configuration options to specify the entropy source,
 | 
					provide their own configuration options to specify the entropy source,
 | 
				
			||||||
please check out the documentation coming the with application.
 | 
					please check out the documentation coming the with application.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
 | 
					 | 
				
			||||||
installing the SUNski package from Sun patch 105710-01 (Sparc) which
 | 
					 | 
				
			||||||
adds a /dev/random device and make sure it gets used, usually through
 | 
					 | 
				
			||||||
$RANDFILE.  There are probably similar patches for the other Solaris
 | 
					 | 
				
			||||||
versions.  An official statement from Sun with respect to /dev/random
 | 
					 | 
				
			||||||
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?
 | 
					* Why do I get an "unable to write 'random state'" error message?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -455,7 +460,7 @@ get the best result from OpenSSL.  A bit more complicated solution is the
 | 
				
			|||||||
following:
 | 
					following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
----- snip:start -----
 | 
					----- snip:start -----
 | 
				
			||||||
  make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \
 | 
					  make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile | \
 | 
				
			||||||
       sed -e 's/ -O[0-9] / -O0 /'`"
 | 
					       sed -e 's/ -O[0-9] / -O0 /'`"
 | 
				
			||||||
  rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
 | 
					  rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
 | 
				
			||||||
  make
 | 
					  make
 | 
				
			||||||
@@ -488,10 +493,13 @@ and then redo the compilation.  What you should really do is make sure
 | 
				
			|||||||
Sometimes, you may get reports from VC++ command line (cl) that it
 | 
					Sometimes, you may get reports from VC++ command line (cl) that it
 | 
				
			||||||
can't find standard include files like stdio.h and other weirdnesses.
 | 
					can't find standard include files like stdio.h and other weirdnesses.
 | 
				
			||||||
One possible cause is that the environment isn't correctly set up.
 | 
					One possible cause is that the environment isn't correctly set up.
 | 
				
			||||||
To solve that problem, one should run VCVARS32.BAT which is found in
 | 
					To solve that problem for VC++ versions up to 6, one should run
 | 
				
			||||||
the 'bin' subdirectory of the VC++ installation directory (somewhere
 | 
					VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++
 | 
				
			||||||
under 'Program Files').  This needs to be done prior to running NMAKE,
 | 
					installation directory (somewhere under 'Program Files').  For VC++
 | 
				
			||||||
and the changes are only valid for the current DOS session.
 | 
					version 7 (and up?), which is also called VS.NET, the file is called
 | 
				
			||||||
 | 
					VSVARS32.BAT instead.
 | 
				
			||||||
 | 
					This needs to be done prior to running NMAKE, and the changes are only
 | 
				
			||||||
 | 
					valid for the current DOS session.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* What is special about OpenSSL on Redhat?
 | 
					* What is special about OpenSSL on Redhat?
 | 
				
			||||||
@@ -552,6 +560,37 @@ libraries you just built.
 | 
				
			|||||||
Look in the file PROBLEMS for a more detailed explanation and for possible
 | 
					Look in the file PROBLEMS for a more detailed explanation and for possible
 | 
				
			||||||
solutions.
 | 
					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 patch your assembler
 | 
				
			||||||
 | 
					according to <URL: http://www.openssl.org/~appro/gas-1.92.3.OpenBSD.patch>.
 | 
				
			||||||
 | 
					For your convenience a pre-compiled replacement binary is provided at
 | 
				
			||||||
 | 
					<URL: http://www.openssl.org/~appro/gas-1.92.3.static.aout.bin>.
 | 
				
			||||||
 | 
					Reportedly elder *BSD a.out platforms also suffer from this problem and
 | 
				
			||||||
 | 
					remedy should be same. Provided binary is statically linked and should be
 | 
				
			||||||
 | 
					working across wider range of *BSD branches, not just OpenBSD.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[PROG] ========================================================================
 | 
					[PROG] ========================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Is OpenSSL thread-safe?
 | 
					* Is OpenSSL thread-safe?
 | 
				
			||||||
@@ -696,6 +735,7 @@ The general answer is to check the config.log file generated when running
 | 
				
			|||||||
the OpenSSH configure script. It should contain the detailed information
 | 
					the OpenSSH configure script. It should contain the detailed information
 | 
				
			||||||
on why the OpenSSL library was not detected or considered incompatible.
 | 
					on why the OpenSSL library was not detected or considered incompatible.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
 | 
					* Can I use OpenSSL's SSL library with non-blocking I/O?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Yes; make sure to read the SSL_get_error(3) manual page!
 | 
					Yes; make sure to read the SSL_get_error(3) manual page!
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										34
									
								
								INSTALL
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								INSTALL
									
									
									
									
									
								
							@@ -123,7 +123,7 @@
 | 
				
			|||||||
     generic configurations "cc" or "gcc" should usually work on 32 bit
 | 
					     generic configurations "cc" or "gcc" should usually work on 32 bit
 | 
				
			||||||
     systems.
 | 
					     systems.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     Configure creates the file Makefile.ssl from Makefile.org and
 | 
					     Configure creates the file Makefile from Makefile.org and
 | 
				
			||||||
     defines various macros in crypto/opensslconf.h (generated from
 | 
					     defines various macros in crypto/opensslconf.h (generated from
 | 
				
			||||||
     crypto/opensslconf.h.in).
 | 
					     crypto/opensslconf.h.in).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -140,8 +140,8 @@
 | 
				
			|||||||
     standard headers).  If it is a problem with OpenSSL itself, please
 | 
					     standard headers).  If it is a problem with OpenSSL itself, please
 | 
				
			||||||
     report the problem to <openssl-bugs@openssl.org> (note that your
 | 
					     report the problem to <openssl-bugs@openssl.org> (note that your
 | 
				
			||||||
     message will be recorded in the request tracker publicly readable
 | 
					     message will be recorded in the request tracker publicly readable
 | 
				
			||||||
     via http://www.openssl.org/rt2.html and will be forwarded to a public
 | 
					     via http://www.openssl.org/support/rt2.html and will be forwarded to a
 | 
				
			||||||
     mailing list). Include the output of "make report" in your message.
 | 
					     public mailing list). Include the output of "make report" in your message.
 | 
				
			||||||
     Please check out the request tracker. Maybe the bug was already
 | 
					     Please check out the request tracker. Maybe the bug was already
 | 
				
			||||||
     reported or has already been fixed.
 | 
					     reported or has already been fixed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -158,11 +158,11 @@
 | 
				
			|||||||
     If a test fails, look at the output.  There may be reasons for
 | 
					     If a test fails, look at the output.  There may be reasons for
 | 
				
			||||||
     the failure that isn't a problem in OpenSSL itself (like a missing
 | 
					     the failure that isn't a problem in OpenSSL itself (like a missing
 | 
				
			||||||
     or malfunctioning bc).  If it is a problem with OpenSSL itself,
 | 
					     or malfunctioning bc).  If it is a problem with OpenSSL itself,
 | 
				
			||||||
     try removing any compiler optimization flags from the CFLAGS line
 | 
					     try removing any compiler optimization flags from the CFLAG line
 | 
				
			||||||
     in Makefile.ssl and run "make clean; make". Please send a bug
 | 
					     in Makefile and run "make clean; make". Please send a bug
 | 
				
			||||||
     report to <openssl-bugs@openssl.org>, including the output of
 | 
					     report to <openssl-bugs@openssl.org>, including the output of
 | 
				
			||||||
     "make report" in order to be added to the request tracker at
 | 
					     "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
 | 
					  4. If everything tests ok, install OpenSSL with
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -308,3 +308,25 @@
 | 
				
			|||||||
 to install additional support software to obtain random seed.
 | 
					 to install additional support software to obtain random seed.
 | 
				
			||||||
 Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
 | 
					 Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
 | 
				
			||||||
 and the FAQ for more information.
 | 
					 and the FAQ for more information.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Note on support for multiple builds
 | 
				
			||||||
 | 
					 -----------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 OpenSSL is usually built in it's source tree.  Unfortunately, this doesn't
 | 
				
			||||||
 | 
					 support building for multiple platforms from the same source tree very well.
 | 
				
			||||||
 | 
					 It is however possible to build in a separate tree through the use of lots
 | 
				
			||||||
 | 
					 of symbolic links, which should be prepared like this:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
				
			||||||
 | 
						cd objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
				
			||||||
 | 
						(cd $OPENSSL_SOURCE; find . -type f) | while read F; do
 | 
				
			||||||
 | 
							mkdir -p `dirname $F`
 | 
				
			||||||
 | 
							rm -f $F; ln -s $OPENSSL_SOURCE/$F $F
 | 
				
			||||||
 | 
							echo $F '->' $OPENSSL_SOURCE/$F
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
						make -f Makefile.org clean
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 OPENSSL_SOURCE is an environment variable that contains the absolute (this
 | 
				
			||||||
 | 
					 is important!) path to the OpenSSL source tree.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Also, operations like 'make update' should still be made in the source tree.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,12 +12,14 @@
 | 
				
			|||||||
 latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
 | 
					 latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
 | 
				
			||||||
 requires that PERL and BC also be installed.
 | 
					 requires that PERL and BC also be installed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 All of these can be obtained from the usual DJGPP mirror sites, such as
 | 
					 All of these can be obtained from the usual DJGPP mirror sites, such
 | 
				
			||||||
 "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to have
 | 
					 as "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to
 | 
				
			||||||
 the WATT-32 networking package installed before you try to compile
 | 
					 have the WATT-32 networking package installed before you try to compile
 | 
				
			||||||
 openssl. This can be obtained from "http://www.bgnett.no/~giva/". The
 | 
					 openssl. This can be obtained from "http://www.bgnett.no/~giva/".
 | 
				
			||||||
 Makefile assumes that the WATT-32 code is in directory "watt32" under
 | 
					 The Makefile assumes that the WATT-32 code is in the directory
 | 
				
			||||||
 /dev/env/DJDIR.
 | 
					 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
 | 
					 To compile openssl, start your BASH shell. Then configure for DOS by
 | 
				
			||||||
 running "./Configure" with appropriate arguments. The basic syntax for
 | 
					 running "./Configure" with appropriate arguments. The basic syntax for
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										152
									
								
								INSTALL.W32
									
									
									
									
									
								
							
							
						
						
									
										152
									
								
								INSTALL.W32
									
									
									
									
									
								
							@@ -10,33 +10,12 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 You need Perl for Win32.  Unless you will build on Cygwin, you will need
 | 
					 You need Perl for Win32.  Unless you will build on Cygwin, you will need
 | 
				
			||||||
 ActiveState Perl, available from http://www.activestate.com/ActivePerl.
 | 
					 ActiveState Perl, available from http://www.activestate.com/ActivePerl.
 | 
				
			||||||
 For Cygwin users, there's more info in the Cygwin section.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 and one of the following C compilers:
 | 
					 and one of the following C compilers:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  * Visual C++
 | 
					  * Visual C++
 | 
				
			||||||
  * Borland C
 | 
					  * Borland C
 | 
				
			||||||
  * GNU C (Mingw32 or Cygwin)
 | 
					  * GNU C (Cygwin or MinGW)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 If you want to compile in the assembly language routines with Visual C++ then
 | 
					 | 
				
			||||||
 you will need an assembler. This is worth doing because it will result in
 | 
					 | 
				
			||||||
 faster code: for example it will typically result in a 2 times speedup in the
 | 
					 | 
				
			||||||
 RSA routines. Currently the following assemblers are supported:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  * Microsoft MASM (aka "ml")
 | 
					 | 
				
			||||||
  * Free Netwide Assembler NASM.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 MASM was at one point distributed with VC++. It is now distributed with some
 | 
					 | 
				
			||||||
 Microsoft DDKs, for example the Windows NT 4.0 DDK and the Windows 98 DDK. If
 | 
					 | 
				
			||||||
 you do not have either of these DDKs then you can just download the binaries
 | 
					 | 
				
			||||||
 for the Windows 98 DDK and extract and rename the two files XXXXXml.exe and
 | 
					 | 
				
			||||||
 XXXXXml.err, to ml.exe and ml.err and install somewhere on your PATH. Both
 | 
					 | 
				
			||||||
 DDKs can be downloaded from the Microsoft developers site www.msdn.com.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 NASM is freely available. Version 0.98 was used during testing: other versions
 | 
					 | 
				
			||||||
 may also work. It is available from many places, see for example:
 | 
					 | 
				
			||||||
 http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
 | 
					 | 
				
			||||||
 The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 If you are compiling from a tarball or a CVS snapshot then the Win32 files
 | 
					 If you are compiling from a tarball or a CVS snapshot then the Win32 files
 | 
				
			||||||
 may well be not up to date. This may mean that some "tweaking" is required to
 | 
					 may well be not up to date. This may mean that some "tweaking" is required to
 | 
				
			||||||
@@ -46,12 +25,34 @@
 | 
				
			|||||||
 Visual C++
 | 
					 Visual C++
 | 
				
			||||||
 ----------
 | 
					 ----------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Firstly you should run Configure:
 | 
					 If you want to compile in the assembly language routines with Visual C++ then
 | 
				
			||||||
 | 
					 you will need an assembler. This is worth doing because it will result in
 | 
				
			||||||
 | 
					 faster code: for example it will typically result in a 2 times speedup in the
 | 
				
			||||||
 | 
					 RSA routines. Currently the following assemblers are supported:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * Microsoft MASM (aka "ml")
 | 
				
			||||||
 | 
					  * Free Netwide Assembler NASM.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 MASM is distributed with most versions of VC++. For the versions where it is
 | 
				
			||||||
 | 
					 not included in VC++, it is also distributed with some Microsoft DDKs, for
 | 
				
			||||||
 | 
					 example the Windows NT 4.0 DDK and the Windows 98 DDK. If you do not have
 | 
				
			||||||
 | 
					 either of these DDKs then you can just download the binaries for the Windows
 | 
				
			||||||
 | 
					 98 DDK and extract and rename the two files XXXXXml.exe and XXXXXml.err, to
 | 
				
			||||||
 | 
					 ml.exe and ml.err and install somewhere on your PATH. Both DDKs can be
 | 
				
			||||||
 | 
					 downloaded from the Microsoft developers site www.msdn.com.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 NASM is freely available. Version 0.98 was used during testing: other versions
 | 
				
			||||||
 | 
					 may also work. It is available from many places, see for example:
 | 
				
			||||||
 | 
					 http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
 | 
				
			||||||
 | 
					 The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Firstly you should run Configure (to build a FIPS-certified variant of
 | 
				
			||||||
 | 
					 OpenSSL, add the option "fips"):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 > perl Configure VC-WIN32
 | 
					 > perl Configure VC-WIN32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Next you need to build the Makefiles and optionally the assembly language
 | 
					 Next you need to build the Makefiles and optionally the assembly language
 | 
				
			||||||
 files:
 | 
					 files (to build a FIPS-certified variant of OpenSSL, add the argument "fips"):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 - If you are using MASM then run:
 | 
					 - If you are using MASM then run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -100,10 +101,12 @@
 | 
				
			|||||||
 Borland C++ builder 5
 | 
					 Borland C++ builder 5
 | 
				
			||||||
 ---------------------
 | 
					 ---------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * Configure for building with Borland Builder:
 | 
					 * Configure for building with Borland Builder (to build a FIPS-certified
 | 
				
			||||||
 | 
					   variant of OpenSSL, add the option "fips"):
 | 
				
			||||||
   > perl Configure BC-32
 | 
					   > perl Configure BC-32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * Create the appropriate makefile
 | 
					 * Create the appropriate makefile (to build a FIPS-certified variant of
 | 
				
			||||||
 | 
					   OpenSSL, add the argument "fips")
 | 
				
			||||||
   > ms\do_nasm
 | 
					   > ms\do_nasm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * Build
 | 
					 * Build
 | 
				
			||||||
@@ -119,62 +122,35 @@
 | 
				
			|||||||
 * Run make:
 | 
					 * Run make:
 | 
				
			||||||
   > make -f bcb.mak
 | 
					   > make -f bcb.mak
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 GNU C (Mingw32)
 | 
					 | 
				
			||||||
 ---------------
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 To build OpenSSL, you need the Mingw32 package and GNU make.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 * Compiler installation:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/
 | 
					 | 
				
			||||||
   gnu-win32/mingw32/gcc-2.95.2/gcc-2.95.2-msvcrt.exe>. Extract it
 | 
					 | 
				
			||||||
   to a directory such as C:\gcc-2.95.2 and add c:\gcc-2.95.2\bin to
 | 
					 | 
				
			||||||
   the PATH environment variable in "System Properties"; or edit and
 | 
					 | 
				
			||||||
   run C:\gcc-2.95.2\mingw32.bat to set the PATH.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 * Compile OpenSSL:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   > ms\mingw32
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   This will create the library and binaries in out. In case any problems
 | 
					 | 
				
			||||||
   occur, try
 | 
					 | 
				
			||||||
   > ms\mingw32 no-asm
 | 
					 | 
				
			||||||
   instead.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   libcrypto.a and libssl.a are the static libraries. To use the DLLs,
 | 
					 | 
				
			||||||
   link with libeay32.a and libssl32.a instead.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   See troubleshooting if you get error messages about functions not having
 | 
					 | 
				
			||||||
   a number assigned.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 * You can now try the tests:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   > cd out
 | 
					 | 
				
			||||||
   > ..\ms\test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 GNU C (Cygwin)
 | 
					 GNU C (Cygwin)
 | 
				
			||||||
 --------------
 | 
					 --------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Cygwin provides a bash shell and GNU tools environment running
 | 
					 Cygwin provides a bash shell and GNU tools environment running
 | 
				
			||||||
 on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
 | 
					 on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
 | 
				
			||||||
 Consequently, a make of OpenSSL with Cygwin is closer to a GNU
 | 
					 Consequently, a make of OpenSSL with Cygwin is closer to a GNU
 | 
				
			||||||
 bash environment such as Linux than to other W32 makes which are
 | 
					 bash environment such as Linux than to other the other Win32
 | 
				
			||||||
 based on a single makefile approach. Cygwin implements Posix/Unix
 | 
					 makes.
 | 
				
			||||||
 calls through cygwin1.dll, and is contrasted to Mingw32 which links
 | 
					
 | 
				
			||||||
 dynamically to msvcrt.dll or crtdll.dll.
 | 
					 Cygwin implements a Posix/Unix runtime system (cygwin1.dll).
 | 
				
			||||||
 | 
					 It is also possible to create Win32 binaries that only use the
 | 
				
			||||||
 | 
					 Microsoft C runtime system (msvcrt.dll or crtdll.dll) using
 | 
				
			||||||
 | 
					 MinGW. MinGW can be used in the Cygwin development environment
 | 
				
			||||||
 | 
					 or in a standalone setup as described in the following section.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 To build OpenSSL using Cygwin:
 | 
					 To build OpenSSL using Cygwin:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * Install Cygwin (see http://cygwin.com/)
 | 
					 * Install Cygwin (see http://cygwin.com/)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * Install Perl and ensure it is in the path (recent Cygwin perl 
 | 
					 * Install Perl and ensure it is in the path. Both Cygwin perl
 | 
				
			||||||
   (version 5.6.1-2 of the latter has been reported to work) or
 | 
					   (5.6.1-2 or newer) and ActivePerl work.
 | 
				
			||||||
   ActivePerl)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * Run the Cygwin bash shell
 | 
					 * Run the Cygwin bash shell
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * $ tar zxvf openssl-x.x.x.tar.gz
 | 
					 * $ tar zxvf openssl-x.x.x.tar.gz
 | 
				
			||||||
   $ cd openssl-x.x.x
 | 
					   $ cd openssl-x.x.x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   To build the Cygwin version of OpenSSL:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   $ ./config
 | 
					   $ ./config
 | 
				
			||||||
   [...]
 | 
					   [...]
 | 
				
			||||||
   $ make
 | 
					   $ make
 | 
				
			||||||
@@ -182,7 +158,16 @@
 | 
				
			|||||||
   $ make test
 | 
					   $ make test
 | 
				
			||||||
   $ make install
 | 
					   $ make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 This will create a default install in /usr/local/ssl.
 | 
					   This will create a default install in /usr/local/ssl.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   To build the MinGW version (native Windows) in Cygwin:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   $ ./Configure mingw
 | 
				
			||||||
 | 
					   [...]
 | 
				
			||||||
 | 
					   $ make
 | 
				
			||||||
 | 
					   [...]
 | 
				
			||||||
 | 
					   $ make test
 | 
				
			||||||
 | 
					   $ make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Cygwin Notes:
 | 
					 Cygwin Notes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -195,6 +180,37 @@
 | 
				
			|||||||
 non-fatal error in "make test" but is otherwise harmless.  If
 | 
					 non-fatal error in "make test" but is otherwise harmless.  If
 | 
				
			||||||
 desired and needed, GNU bc can be built with Cygwin without change.
 | 
					 desired and needed, GNU bc can be built with Cygwin without change.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 GNU C (MinGW)
 | 
				
			||||||
 | 
					 -------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 * Compiler installation:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   MinGW is available from http://www.mingw.org. Run the installer and
 | 
				
			||||||
 | 
					   set the MinGW bin directory to the PATH in "System Properties" or
 | 
				
			||||||
 | 
					   autoexec.bat.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 * Compile OpenSSL:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   > ms\mingw32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   This will create the library and binaries in out. In case any problems
 | 
				
			||||||
 | 
					   occur, try
 | 
				
			||||||
 | 
					   > ms\mingw32 no-asm
 | 
				
			||||||
 | 
					   instead.
 | 
				
			||||||
 | 
					   If you want to build a FIPS-certified variant of OpenSSL, add the argument
 | 
				
			||||||
 | 
					   "fips"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   libcrypto.a and libssl.a are the static libraries. To use the DLLs,
 | 
				
			||||||
 | 
					   link with libeay32.a and libssl32.a instead.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   See troubleshooting if you get error messages about functions not having
 | 
				
			||||||
 | 
					   a number assigned.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 * You can now try the tests:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   > cd out
 | 
				
			||||||
 | 
					   > ..\ms\test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Installation
 | 
					 Installation
 | 
				
			||||||
 ------------
 | 
					 ------------
 | 
				
			||||||
@@ -214,7 +230,7 @@
 | 
				
			|||||||
	$ md c:\openssl\lib
 | 
						$ md c:\openssl\lib
 | 
				
			||||||
	$ md c:\openssl\include
 | 
						$ md c:\openssl\include
 | 
				
			||||||
	$ md c:\openssl\include\openssl
 | 
						$ md c:\openssl\include\openssl
 | 
				
			||||||
	$ copy /b inc32\*               c:\openssl\include\openssl
 | 
						$ copy /b inc32\openssl\*       c:\openssl\include\openssl
 | 
				
			||||||
	$ copy /b out32dll\ssleay32.lib c:\openssl\lib
 | 
						$ copy /b out32dll\ssleay32.lib c:\openssl\lib
 | 
				
			||||||
	$ copy /b out32dll\libeay32.lib c:\openssl\lib
 | 
						$ copy /b out32dll\libeay32.lib c:\openssl\lib
 | 
				
			||||||
	$ copy /b out32dll\ssleay32.dll c:\openssl\bin
 | 
						$ copy /b out32dll\ssleay32.dll c:\openssl\bin
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,6 +11,9 @@
 | 
				
			|||||||
 You also need Perl for Win32.  You will need ActiveState Perl, available
 | 
					 You also need Perl for Win32.  You will need ActiveState Perl, available
 | 
				
			||||||
 from http://www.activestate.com/ActivePerl.
 | 
					 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
 | 
					 The C Runtime Library implementation for Windows CE that is included with
 | 
				
			||||||
 Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
 | 
					 Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
 | 
				
			||||||
 incorrect.  wcecompat plugs the holes and tries to bring the Windows CE
 | 
					 incorrect.  wcecompat plugs the holes and tries to bring the Windows CE
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							@@ -12,7 +12,7 @@
 | 
				
			|||||||
  ---------------
 | 
					  ---------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* ====================================================================
 | 
					/* ====================================================================
 | 
				
			||||||
 * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
 | 
					 * Copyright (c) 1998-2004 The OpenSSL Project.  All rights reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Redistribution and use in source and binary forms, with or without
 | 
					 * Redistribution and use in source and binary forms, with or without
 | 
				
			||||||
 * modification, are permitted provided that the following conditions
 | 
					 * modification, are permitted provided that the following conditions
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										532
									
								
								Makefile.org
									
									
									
									
									
								
							
							
						
						
									
										532
									
								
								Makefile.org
									
									
									
									
									
								
							@@ -15,6 +15,11 @@ OPTIONS=
 | 
				
			|||||||
CONFIGURE_ARGS=
 | 
					CONFIGURE_ARGS=
 | 
				
			||||||
SHLIB_TARGET=
 | 
					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
 | 
					# INSTALL_PREFIX is for package builders so that they can configure
 | 
				
			||||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
 | 
					# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
 | 
				
			||||||
# Normally it is left empty.
 | 
					# Normally it is left empty.
 | 
				
			||||||
@@ -67,6 +72,14 @@ TAR= tar
 | 
				
			|||||||
TARFLAGS= --no-recursion
 | 
					TARFLAGS= --no-recursion
 | 
				
			||||||
MAKEDEPPROG=makedepend
 | 
					MAKEDEPPROG=makedepend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# We let the C compiler driver to take care of .s files. This is done in
 | 
				
			||||||
 | 
					# order to be excused from maintaining a separate set of architecture
 | 
				
			||||||
 | 
					# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
 | 
				
			||||||
 | 
					# gcc, then the driver will automatically translate it to -xarch=v8plus
 | 
				
			||||||
 | 
					# and pass it down to assembler.
 | 
				
			||||||
 | 
					AS=$(CC) -c
 | 
				
			||||||
 | 
					ASFLAG=$(CFLAG)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set BN_ASM to bn_asm.o if you want to use the C version
 | 
					# Set BN_ASM to bn_asm.o if you want to use the C version
 | 
				
			||||||
BN_ASM= bn_asm.o
 | 
					BN_ASM= bn_asm.o
 | 
				
			||||||
#BN_ASM= bn_asm.o
 | 
					#BN_ASM= bn_asm.o
 | 
				
			||||||
@@ -88,6 +101,7 @@ PROCESSOR=
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Set DES_ENC to des_enc.o if you want to use the C version
 | 
					# Set DES_ENC to des_enc.o if you want to use the C version
 | 
				
			||||||
#There are 4 x86 assember options.
 | 
					#There are 4 x86 assember options.
 | 
				
			||||||
 | 
					FIPS_DES_ENC= des_enc.o fcrypt_b.o
 | 
				
			||||||
DES_ENC= asm/dx86-out.o asm/yx86-out.o
 | 
					DES_ENC= asm/dx86-out.o asm/yx86-out.o
 | 
				
			||||||
#DES_ENC= des_enc.o fcrypt_b.o          # C
 | 
					#DES_ENC= des_enc.o fcrypt_b.o          # C
 | 
				
			||||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
 | 
					#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
 | 
				
			||||||
@@ -140,6 +154,7 @@ MD5_ASM_OBJ= asm/mx86-out.o
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Also need SHA1_ASM defined
 | 
					# Also need SHA1_ASM defined
 | 
				
			||||||
SHA1_ASM_OBJ= asm/sx86-out.o
 | 
					SHA1_ASM_OBJ= asm/sx86-out.o
 | 
				
			||||||
 | 
					FIPS_SHA1_ASM_OBJ= asm/sx86-out.o
 | 
				
			||||||
#SHA1_ASM_OBJ= asm/sx86-elf.o       # elf
 | 
					#SHA1_ASM_OBJ= asm/sx86-elf.o       # elf
 | 
				
			||||||
#SHA1_ASM_OBJ= asm/sx86-sol.o       # solaris
 | 
					#SHA1_ASM_OBJ= asm/sx86-sol.o       # solaris
 | 
				
			||||||
#SHA1_ASM_OBJ= asm/sx86-out.o       # a.out, FreeBSD
 | 
					#SHA1_ASM_OBJ= asm/sx86-out.o       # a.out, FreeBSD
 | 
				
			||||||
@@ -156,28 +171,33 @@ RMD160_ASM_OBJ= asm/rm86-out.o
 | 
				
			|||||||
KRB5_INCLUDES=
 | 
					KRB5_INCLUDES=
 | 
				
			||||||
LIBKRB5=
 | 
					LIBKRB5=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DIRS=   crypto ssl engines apps test tools
 | 
					# When we're prepared to use shared libraries in the programs we link here
 | 
				
			||||||
SHLIBDIRS= crypto ssl
 | 
					# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
 | 
				
			||||||
 | 
					SHLIB_MARK=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DIRS=   crypto fips ssl $(SHLIB_MARK) sigs apps test tools
 | 
				
			||||||
 | 
					SHLIBDIRS= fips crypto ssl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# dirs in crypto to build
 | 
					# dirs in crypto to build
 | 
				
			||||||
SDIRS=  \
 | 
					SDIRS=  objects \
 | 
				
			||||||
	md2 md4 md5 sha mdc2 hmac ripemd \
 | 
						md2 md4 md5 sha mdc2 hmac ripemd \
 | 
				
			||||||
	des rc2 rc4 rc5 idea bf cast \
 | 
						des rc2 rc4 rc5 idea bf cast \
 | 
				
			||||||
	bn ec rsa dsa ecdsa dh ecdh dso engine aes \
 | 
						bn ec rsa dsa dh dso engine aes \
 | 
				
			||||||
	buffer bio stack lhash rand err objects \
 | 
						buffer bio stack lhash rand err \
 | 
				
			||||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
						evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FDIRS=	sha1 rand des aes dsa rsa
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# tests to perform.  "alltests" is a special word indicating that all tests
 | 
					# tests to perform.  "alltests" is a special word indicating that all tests
 | 
				
			||||||
# should be performed.
 | 
					# should be performed.
 | 
				
			||||||
TESTS = alltests
 | 
					TESTS = alltests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAKEFILE= Makefile.ssl
 | 
					MAKEFILE= Makefile
 | 
				
			||||||
NEWMAKE=  make
 | 
					 | 
				
			||||||
MAKE=     $(NEWMAKE) -f Makefile.ssl
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
MANDIR=$(OPENSSLDIR)/man
 | 
					MANDIR=$(OPENSSLDIR)/man
 | 
				
			||||||
MAN1=1
 | 
					MAN1=1
 | 
				
			||||||
MAN3=3
 | 
					MAN3=3
 | 
				
			||||||
 | 
					MANSUFFIX=
 | 
				
			||||||
SHELL=/bin/sh
 | 
					SHELL=/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TOP=    .
 | 
					TOP=    .
 | 
				
			||||||
@@ -185,6 +205,7 @@ ONEDIRS=out tmp
 | 
				
			|||||||
EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
 | 
					EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
 | 
				
			||||||
WDIRS=  windows
 | 
					WDIRS=  windows
 | 
				
			||||||
LIBS=   libcrypto.a libssl.a
 | 
					LIBS=   libcrypto.a libssl.a
 | 
				
			||||||
 | 
					SIGS=	libcrypto.sha1
 | 
				
			||||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 | 
					SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 | 
				
			||||||
SHARED_SSL=libssl$(SHLIB_EXT)
 | 
					SHARED_SSL=libssl$(SHLIB_EXT)
 | 
				
			||||||
SHARED_LIBS=
 | 
					SHARED_LIBS=
 | 
				
			||||||
@@ -199,33 +220,39 @@ WTARFILE=       $(NAME)-win.tar
 | 
				
			|||||||
EXHEADER=       e_os2.h
 | 
					EXHEADER=       e_os2.h
 | 
				
			||||||
HEADER=         e_os.h
 | 
					HEADER=         e_os.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
all: Makefile.ssl build_all openssl.pc
 | 
					# 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BUILD_CMD=if echo " $(DIRS) " | grep " $$i " >/dev/null 2>/dev/null; then \
 | 
					all: Makefile sub_all openssl.pc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sigs:	$(SIGS)
 | 
				
			||||||
 | 
					libcrypto.sha1: libcrypto.a
 | 
				
			||||||
 | 
						if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
 | 
				
			||||||
 | 
							$(RANLIB) libcrypto.a; \
 | 
				
			||||||
 | 
							fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.sha1; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sub_all:
 | 
				
			||||||
 | 
						@for i in $(DIRS); \
 | 
				
			||||||
 | 
						do \
 | 
				
			||||||
	if [ -d "$$i" ]; then \
 | 
						if [ -d "$$i" ]; then \
 | 
				
			||||||
		(cd $$i && echo "making all in $$i..." && \
 | 
							(cd $$i && echo "making all in $$i..." && \
 | 
				
			||||||
		$(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}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
 | 
							$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
 | 
				
			||||||
	else \
 | 
						else \
 | 
				
			||||||
		$(MAKE) $$i; \
 | 
							$(MAKE) $$i; \
 | 
				
			||||||
	fi; fi
 | 
						fi; \
 | 
				
			||||||
 | 
						done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub_all: build_all
 | 
					sub_target:
 | 
				
			||||||
build_all: build_libs build_apps build_tests build_tools
 | 
						@for i in $(DIRS); \
 | 
				
			||||||
 | 
						do \
 | 
				
			||||||
build_libs: build_crypto build_ssl build_engines
 | 
						if [ -d "$$i" ]; then \
 | 
				
			||||||
 | 
							(cd $$i && echo "making $(TARGET) in $$i..." && \
 | 
				
			||||||
build_crypto:
 | 
							$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \
 | 
				
			||||||
	@i=crypto; $(BUILD_CMD)
 | 
						else \
 | 
				
			||||||
build_ssl:
 | 
							$(MAKE) $$i; \
 | 
				
			||||||
	@i=ssl; $(BUILD_CMD)
 | 
						fi; \
 | 
				
			||||||
build_engines:
 | 
						done;
 | 
				
			||||||
	@i=engines; $(BUILD_CMD)
 | 
					 | 
				
			||||||
build_apps:
 | 
					 | 
				
			||||||
	@i=apps; $(BUILD_CMD)
 | 
					 | 
				
			||||||
build_tests:
 | 
					 | 
				
			||||||
	@i=test; $(BUILD_CMD)
 | 
					 | 
				
			||||||
build_tools:
 | 
					 | 
				
			||||||
	@i=tools; $(BUILD_CMD)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
libcrypto$(SHLIB_EXT): libcrypto.a
 | 
					libcrypto$(SHLIB_EXT): libcrypto.a
 | 
				
			||||||
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
 | 
						@if [ "$(SHLIB_TARGET)" != "" ]; then \
 | 
				
			||||||
@@ -251,34 +278,328 @@ clean-shared:
 | 
				
			|||||||
		fi; \
 | 
							fi; \
 | 
				
			||||||
		( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
 | 
							( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
 | 
				
			||||||
		if [ "$(PLATFORM)" = "Cygwin" ]; then \
 | 
							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; \
 | 
							fi; \
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
link-shared:
 | 
					link-shared:
 | 
				
			||||||
	@ for i in ${SHLIBDIRS}; do \
 | 
						@if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
 | 
				
			||||||
		$(NEWMAKE) -f Makefile.shared \
 | 
							tmp="$(SHARED_LIBS_LINK_EXTS)"; \
 | 
				
			||||||
			LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
							for i in $(SHLIBDIRS); do \
 | 
				
			||||||
			LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
 | 
								prev=lib$$i$(SHLIB_EXT); \
 | 
				
			||||||
			symlink.$(SHLIB_TARGET); \
 | 
								for j in $${tmp:-x}; do \
 | 
				
			||||||
		libs="$$libs -l$$i"; \
 | 
									( set -x; \
 | 
				
			||||||
 | 
									rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
 | 
				
			||||||
 | 
									prev=lib$$i$$j; \
 | 
				
			||||||
 | 
								done; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					do_bsd-gcc-shared: do_gnu-shared
 | 
				
			||||||
 | 
					do_linux-shared: do_gnu-shared
 | 
				
			||||||
 | 
					do_gnu-shared:
 | 
				
			||||||
 | 
						libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
						fi; \
 | 
				
			||||||
 | 
						( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
							-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
							-Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
							-Wl,-Bsymbolic \
 | 
				
			||||||
 | 
							-Wl,--whole-archive lib$$i.a \
 | 
				
			||||||
 | 
							-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
				
			||||||
 | 
						libs="-l$$i $$libs"; \
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
build-shared: do_$(SHLIB_TARGET) link-shared
 | 
					DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
 | 
				
			||||||
 | 
					
 | 
				
			||||||
do_$(SHLIB_TARGET):
 | 
					# For Darwin AKA Mac OS/X (dyld)
 | 
				
			||||||
	@ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
					do_darwin-shared: 
 | 
				
			||||||
		$(NEWMAKE) -f Makefile.shared \
 | 
						libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
			CC="$(CC)" LDFLAGS="$(LDFLAGS)" \
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
			SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
			LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
						fi; \
 | 
				
			||||||
			LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
 | 
						( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
 | 
				
			||||||
			LIBDEPS="$$libs $(EX_LIBS)" \
 | 
							lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
			link_a.$(SHLIB_TARGET); \
 | 
							-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
 | 
				
			||||||
		libs="$$libs -l$$i"; \
 | 
							-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
 | 
				
			||||||
 | 
						libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
 | 
				
			||||||
 | 
						echo "" ; \
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
openssl.pc:
 | 
					do_cygwin-shared:
 | 
				
			||||||
 | 
						libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
						fi; \
 | 
				
			||||||
 | 
						( 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 \
 | 
				
			||||||
 | 
							-Wl,--no-whole-archive $$libs ) || exit 1; \
 | 
				
			||||||
 | 
						libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					do_alpha-osf1-shared:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
								-shared -o lib$$i.so \
 | 
				
			||||||
 | 
								-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
 | 
				
			||||||
 | 
								-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
 | 
				
			||||||
 | 
					# option passed to the linker.
 | 
				
			||||||
 | 
					do_tru64-shared:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
								-shared -msym -o lib$$i.so \
 | 
				
			||||||
 | 
								-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
 | 
				
			||||||
 | 
								-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					# The difference between tru64-shared and tru64-shared-rpath is the
 | 
				
			||||||
 | 
					# -rpath ${INSTALLTOP}/lib passed to the linker.
 | 
				
			||||||
 | 
					do_tru64-shared-rpath:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
								-shared -msym -o lib$$i.so \
 | 
				
			||||||
 | 
								-rpath  ${INSTALLTOP}/lib \
 | 
				
			||||||
 | 
								-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
 | 
				
			||||||
 | 
								-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					do_solaris-shared:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
 | 
				
			||||||
 | 
							  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} \
 | 
				
			||||||
 | 
								$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
 | 
				
			||||||
 | 
								$$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# OpenServer 5 native compilers used
 | 
				
			||||||
 | 
					do_svr3-shared:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
 | 
				
			||||||
 | 
							  find . -name "*.o" -print > allobjs ; \
 | 
				
			||||||
 | 
							  OBJS= ; export OBJS ; \
 | 
				
			||||||
 | 
							  for obj in `ar t lib$$i.a` ; do \
 | 
				
			||||||
 | 
							    OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
 | 
				
			||||||
 | 
							  done ; \
 | 
				
			||||||
 | 
							  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
								-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
								-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
								$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# UnixWare 7 and OpenUNIX 8 native compilers used
 | 
				
			||||||
 | 
					do_svr5-shared:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
 | 
				
			||||||
 | 
							  SHARE_FLAG='-G'; \
 | 
				
			||||||
 | 
							  (${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
 | 
				
			||||||
 | 
							  find . -name "*.o" -print > allobjs ; \
 | 
				
			||||||
 | 
							  OBJS= ; export OBJS ; \
 | 
				
			||||||
 | 
							  for obj in `ar t lib$$i.a` ; do \
 | 
				
			||||||
 | 
							    OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
 | 
				
			||||||
 | 
							  done ; \
 | 
				
			||||||
 | 
							  set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
 | 
				
			||||||
 | 
								${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
								$${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
								-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
								$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					do_irix-shared:
 | 
				
			||||||
 | 
						if ${DETECT_GNU_LD}; then \
 | 
				
			||||||
 | 
							$(MAKE) do_gnu-shared; \
 | 
				
			||||||
 | 
						else \
 | 
				
			||||||
 | 
							libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
							if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
								libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
							( WHOLELIB="-all lib$$i.a -notall"; \
 | 
				
			||||||
 | 
							  (${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-notall"; \
 | 
				
			||||||
 | 
							  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
								-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
								-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
								$${WHOLELIB} $$libs ${EX_LIBS} -lc) || exit 1; \
 | 
				
			||||||
 | 
							libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
							done; \
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					# HP-UX includes the full pathname of libs we depend on, so we would get
 | 
				
			||||||
 | 
					# ./libcrypto (with ./ as path information) compiled into libssl, hence
 | 
				
			||||||
 | 
					# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
 | 
				
			||||||
 | 
					# anyway.
 | 
				
			||||||
 | 
					# The object modules are loaded from lib$i.a using the undocumented -Fl
 | 
				
			||||||
 | 
					# option.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
 | 
				
			||||||
 | 
					#          by temporarily specifying "+s"!
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					do_hpux-shared:
 | 
				
			||||||
 | 
						for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
						fi; \
 | 
				
			||||||
 | 
						( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
							+vnocompatwarnings \
 | 
				
			||||||
 | 
							-b -z +s \
 | 
				
			||||||
 | 
							-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
							+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
							-Fl lib$$i.a -ldld -lc ) || exit 1; \
 | 
				
			||||||
 | 
						chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This assumes that GNU utilities are *not* used
 | 
				
			||||||
 | 
					# HP-UX includes the full pathname of libs we depend on, so we would get
 | 
				
			||||||
 | 
					# ./libcrypto (with ./ as path information) compiled into libssl, hence
 | 
				
			||||||
 | 
					# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
 | 
				
			||||||
 | 
					# anyway.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# HP-UX in 64bit mode has "+s" enabled by default; it will search for
 | 
				
			||||||
 | 
					# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					do_hpux64-shared:
 | 
				
			||||||
 | 
						for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
						fi; \
 | 
				
			||||||
 | 
						( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
 | 
				
			||||||
 | 
							-b -z \
 | 
				
			||||||
 | 
							-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
							+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
				
			||||||
 | 
							+forceload lib$$i.a -ldl -lc ) || exit 1; \
 | 
				
			||||||
 | 
						chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The following method is said to work on all platforms.  Tests will
 | 
				
			||||||
 | 
					# determine if that's how it's gong to be used.
 | 
				
			||||||
 | 
					# This assumes that for all but GNU systems, GNU utilities are *not* used.
 | 
				
			||||||
 | 
					# ALLSYMSFLAGS would be:
 | 
				
			||||||
 | 
					#  GNU systems: --whole-archive
 | 
				
			||||||
 | 
					#  Tru64 Unix:  -all
 | 
				
			||||||
 | 
					#  Solaris:     -z allextract
 | 
				
			||||||
 | 
					#  Irix:        -all
 | 
				
			||||||
 | 
					#  HP/UX-32bit: -Fl
 | 
				
			||||||
 | 
					#  HP/UX-64bit: +forceload
 | 
				
			||||||
 | 
					#  AIX:		-bnogc
 | 
				
			||||||
 | 
					# SHAREDFLAGS would be:
 | 
				
			||||||
 | 
					#  GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 | 
				
			||||||
 | 
					#  Tru64 Unix:  -shared \
 | 
				
			||||||
 | 
					#		-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
 | 
				
			||||||
 | 
					#  Solaris:     -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 | 
				
			||||||
 | 
					#  Irix:        -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 | 
				
			||||||
 | 
					#  HP/UX-32bit: +vnocompatwarnings -b -z +s \
 | 
				
			||||||
 | 
					#		+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
 | 
				
			||||||
 | 
					#  HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
 | 
				
			||||||
 | 
					#  AIX:		-G -bE:lib$$i.exp -bM:SRE
 | 
				
			||||||
 | 
					# SHAREDCMD would be:
 | 
				
			||||||
 | 
					#  GNU systems: $(CC)
 | 
				
			||||||
 | 
					#  Tru64 Unix:  $(CC)
 | 
				
			||||||
 | 
					#  Solaris:     $(CC)
 | 
				
			||||||
 | 
					#  Irix:        $(CC)
 | 
				
			||||||
 | 
					#  HP/UX-32bit: /usr/ccs/bin/ld
 | 
				
			||||||
 | 
					#  HP/UX-64bit: /usr/ccs/bin/ld
 | 
				
			||||||
 | 
					#  AIX:		$(CC)
 | 
				
			||||||
 | 
					ALLSYMSFLAG=-bnogc
 | 
				
			||||||
 | 
					SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
 | 
				
			||||||
 | 
					SHAREDCMD=$(CC)
 | 
				
			||||||
 | 
					do_aix-shared:
 | 
				
			||||||
 | 
						libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
						fi; \
 | 
				
			||||||
 | 
						( set -x; \
 | 
				
			||||||
 | 
						  ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
 | 
				
			||||||
 | 
						  ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
 | 
				
			||||||
 | 
						    $(SHAREDCMD) $(SHAREDFLAGS) \
 | 
				
			||||||
 | 
							-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
 | 
				
			||||||
 | 
							$$libs ${EX_LIBS} ) ) \
 | 
				
			||||||
 | 
						|| exit 1; \
 | 
				
			||||||
 | 
						libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					do_reliantunix-shared:
 | 
				
			||||||
 | 
						libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
				
			||||||
 | 
						if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
				
			||||||
 | 
							libs="$(LIBKRB5) $$libs"; \
 | 
				
			||||||
 | 
						fi; \
 | 
				
			||||||
 | 
						tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
 | 
				
			||||||
 | 
						( set -x; \
 | 
				
			||||||
 | 
						  ( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
 | 
				
			||||||
 | 
						    cd $$tmpdir || exit 1 ; ar x $$Opwd/lib$$i.a ; \
 | 
				
			||||||
 | 
						    ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} *.o \
 | 
				
			||||||
 | 
						  ) || exit 1; \
 | 
				
			||||||
 | 
						  cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
 | 
				
			||||||
 | 
						) || exit 1; \
 | 
				
			||||||
 | 
						rm -rf $$tmpdir ; \
 | 
				
			||||||
 | 
						libs="-l$$i $$libs"; \
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					openssl.pc: Makefile
 | 
				
			||||||
	@ ( echo 'prefix=$(INSTALLTOP)'; \
 | 
						@ ( echo 'prefix=$(INSTALLTOP)'; \
 | 
				
			||||||
	    echo 'exec_prefix=$${prefix}'; \
 | 
						    echo 'exec_prefix=$${prefix}'; \
 | 
				
			||||||
	    echo 'libdir=$${exec_prefix}/lib'; \
 | 
						    echo 'libdir=$${exec_prefix}/lib'; \
 | 
				
			||||||
@@ -288,19 +609,19 @@ openssl.pc:
 | 
				
			|||||||
	    echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
 | 
						    echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
 | 
				
			||||||
	    echo 'Version: '$(VERSION); \
 | 
						    echo 'Version: '$(VERSION); \
 | 
				
			||||||
	    echo 'Requires: '; \
 | 
						    echo 'Requires: '; \
 | 
				
			||||||
	    echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
 | 
						    echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
 | 
				
			||||||
	    echo 'Cflags: -I$${includedir}' ) > openssl.pc
 | 
						    echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Makefile.ssl: Makefile.org
 | 
					Makefile: Makefile.org
 | 
				
			||||||
	@echo "Makefile.ssl is older than Makefile.org."
 | 
						@echo "Makefile is older than Makefile.org."
 | 
				
			||||||
	@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
 | 
						@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
 | 
				
			||||||
	@false
 | 
						@false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libclean:
 | 
					libclean:
 | 
				
			||||||
	rm -f *.so *.so.* engines/*.so *.a */lib */*/lib
 | 
						rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:	libclean
 | 
				
			||||||
	rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
 | 
						rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
 | 
				
			||||||
	@for i in $(DIRS) ;\
 | 
						@for i in $(DIRS) ;\
 | 
				
			||||||
	do \
 | 
						do \
 | 
				
			||||||
	if [ -d "$$i" ]; then \
 | 
						if [ -d "$$i" ]; then \
 | 
				
			||||||
@@ -310,7 +631,7 @@ clean:
 | 
				
			|||||||
	fi; \
 | 
						fi; \
 | 
				
			||||||
	done;
 | 
						done;
 | 
				
			||||||
	rm -f openssl.pc
 | 
						rm -f openssl.pc
 | 
				
			||||||
	rm -f *.a *.o speed.* *.map *.so .pure core
 | 
						rm -f speed.* .pure
 | 
				
			||||||
	rm -f $(TARFILE)
 | 
						rm -f $(TARFILE)
 | 
				
			||||||
	@for i in $(ONEDIRS) ;\
 | 
						@for i in $(ONEDIRS) ;\
 | 
				
			||||||
	do \
 | 
						do \
 | 
				
			||||||
@@ -322,7 +643,7 @@ makefile.one: files
 | 
				
			|||||||
	sh util/do_ms.sh
 | 
						sh util/do_ms.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
files:
 | 
					files:
 | 
				
			||||||
	$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
 | 
						$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
 | 
				
			||||||
	@for i in $(DIRS) ;\
 | 
						@for i in $(DIRS) ;\
 | 
				
			||||||
	do \
 | 
						do \
 | 
				
			||||||
	if [ -d "$$i" ]; then \
 | 
						if [ -d "$$i" ]; then \
 | 
				
			||||||
@@ -332,19 +653,18 @@ files:
 | 
				
			|||||||
	done;
 | 
						done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
links:
 | 
					links:
 | 
				
			||||||
	@$(TOP)/util/point.sh Makefile.ssl Makefile
 | 
					 | 
				
			||||||
	@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
 | 
						@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
 | 
						@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
 | 
				
			||||||
	@for i in $(DIRS); do \
 | 
						@for i in $(DIRS); do \
 | 
				
			||||||
	if [ -d "$$i" ]; then \
 | 
						if [ -d "$$i" ]; then \
 | 
				
			||||||
		(cd $$i && echo "making links in $$i..." && \
 | 
							(cd $$i && echo "making links in $$i..." && \
 | 
				
			||||||
		$(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}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
 | 
							$(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}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
 | 
				
			||||||
	fi; \
 | 
						fi; \
 | 
				
			||||||
	done;
 | 
						done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
gentests:
 | 
					gentests:
 | 
				
			||||||
	@(cd test && echo "generating dummy tests (if needed)..." && \
 | 
						@(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 );
 | 
						$(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}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_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:
 | 
					dclean:
 | 
				
			||||||
	rm -f *.bak
 | 
						rm -f *.bak
 | 
				
			||||||
@@ -360,8 +680,11 @@ rehash: rehash.time
 | 
				
			|||||||
rehash.time: certs
 | 
					rehash.time: certs
 | 
				
			||||||
	@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
 | 
						@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
 | 
				
			||||||
		export OPENSSL OPENSSL_DEBUG_MEMORY; \
 | 
							export OPENSSL OPENSSL_DEBUG_MEMORY; \
 | 
				
			||||||
		LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
 | 
							LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
 | 
				
			||||||
		if [ "$(PLATFORM)" != "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
 | 
							DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
 | 
				
			||||||
 | 
							SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
 | 
				
			||||||
 | 
							LIBPATH="`pwd`:$$LIBPATH"; \
 | 
				
			||||||
 | 
							if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
 | 
				
			||||||
		export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
 | 
							export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
 | 
				
			||||||
		$(PERL) tools/c_rehash certs)
 | 
							$(PERL) tools/c_rehash certs)
 | 
				
			||||||
	touch rehash.time
 | 
						touch rehash.time
 | 
				
			||||||
@@ -370,11 +693,14 @@ test:   tests
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
tests: rehash
 | 
					tests: rehash
 | 
				
			||||||
	@(cd test && echo "testing..." && \
 | 
						@(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 );
 | 
						$(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}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_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`"; \
 | 
						@LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
 | 
				
			||||||
		if [ "$(PLATFORM)" != "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
 | 
						DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
 | 
				
			||||||
		export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
 | 
						SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
 | 
				
			||||||
		apps/openssl version -a
 | 
						LIBPATH="`pwd`:$$LIBPATH"; \
 | 
				
			||||||
 | 
						if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
 | 
				
			||||||
 | 
						export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
 | 
				
			||||||
 | 
						apps/openssl version -a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
report:
 | 
					report:
 | 
				
			||||||
	@$(PERL) util/selftest.pl
 | 
						@$(PERL) util/selftest.pl
 | 
				
			||||||
@@ -408,7 +734,7 @@ tags:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
errors:
 | 
					errors:
 | 
				
			||||||
	$(PERL) util/mkerr.pl -recurse -write
 | 
						$(PERL) util/mkerr.pl -recurse -write
 | 
				
			||||||
	(cd engines; $(MAKE) PERL=$(PERL) errors)
 | 
						(cd crypto/engine; $(MAKE) PERL=$(PERL) errors)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stacks:
 | 
					stacks:
 | 
				
			||||||
	$(PERL) util/mkstack.pl -write
 | 
						$(PERL) util/mkstack.pl -write
 | 
				
			||||||
@@ -468,13 +794,11 @@ dist_pem_h:
 | 
				
			|||||||
install: all install_docs
 | 
					install: all install_docs
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
 | 
						@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
 | 
							$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkginfo \
 | 
							$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
 | 
							$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/engines \
 | 
					 | 
				
			||||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
 | 
							$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
 | 
							$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/private \
 | 
							$(INSTALL_PREFIX)$(OPENSSLDIR)/private
 | 
				
			||||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/lib
 | 
					 | 
				
			||||||
	@for i in $(EXHEADER) ;\
 | 
						@for i in $(EXHEADER) ;\
 | 
				
			||||||
	do \
 | 
						do \
 | 
				
			||||||
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 | 
						(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 | 
				
			||||||
@@ -484,7 +808,7 @@ install: all install_docs
 | 
				
			|||||||
	do \
 | 
						do \
 | 
				
			||||||
	if [ -d "$$i" ]; then \
 | 
						if [ -d "$$i" ]; then \
 | 
				
			||||||
		(cd $$i; echo "installing $$i..."; \
 | 
							(cd $$i; echo "installing $$i..."; \
 | 
				
			||||||
		$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' install ); \
 | 
							$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
 | 
				
			||||||
	fi; \
 | 
						fi; \
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
	@for i in $(LIBS) ;\
 | 
						@for i in $(LIBS) ;\
 | 
				
			||||||
@@ -492,9 +816,11 @@ install: all install_docs
 | 
				
			|||||||
		if [ -f "$$i" ]; then \
 | 
							if [ -f "$$i" ]; then \
 | 
				
			||||||
		(       echo installing $$i; \
 | 
							(       echo installing $$i; \
 | 
				
			||||||
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
								cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
			$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
								if ! egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
 | 
				
			||||||
 | 
									$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
 | 
								fi; \
 | 
				
			||||||
			chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
								chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
			mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
								mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
				
			||||||
		fi; \
 | 
							fi; \
 | 
				
			||||||
	done;
 | 
						done;
 | 
				
			||||||
	@if [ -n "$(SHARED_LIBS)" ]; then \
 | 
						@if [ -n "$(SHARED_LIBS)" ]; then \
 | 
				
			||||||
@@ -506,23 +832,40 @@ install: all install_docs
 | 
				
			|||||||
				if [ "$(PLATFORM)" != "Cygwin" ]; then \
 | 
									if [ "$(PLATFORM)" != "Cygwin" ]; then \
 | 
				
			||||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
										cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
					chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
										chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
					mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
										mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
				
			||||||
				else \
 | 
									else \
 | 
				
			||||||
					c=`echo $$i | sed 's/^lib/cyg/'`; \
 | 
										c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
 | 
				
			||||||
					cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
										cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
				
			||||||
					chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
										chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
				
			||||||
					mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
										mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
				
			||||||
					cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
										cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
				
			||||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
										chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
				
			||||||
					mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
										mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
				
			||||||
				fi ); \
 | 
									fi ); \
 | 
				
			||||||
			fi; \
 | 
								fi; \
 | 
				
			||||||
		done; \
 | 
							done; \
 | 
				
			||||||
		(	here="`pwd`"; \
 | 
							(	here="`pwd`"; \
 | 
				
			||||||
			cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
								cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
				
			||||||
			$(NEWMAKE) -f $$here/Makefile link-shared ); \
 | 
								set $(MAKE); \
 | 
				
			||||||
 | 
								$$1 -f $$here/Makefile link-shared ); \
 | 
				
			||||||
 | 
							if [ "$(INSTALLTOP)" != "/usr" ]; then \
 | 
				
			||||||
 | 
								echo 'OpenSSL shared libraries have been installed in:'; \
 | 
				
			||||||
 | 
								echo '  $(INSTALLTOP)'; \
 | 
				
			||||||
 | 
								echo ''; \
 | 
				
			||||||
 | 
								sed -e '1,/^$$/d' doc/openssl-shared.txt; \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkginfo
 | 
						@for i in $(SIGS) ;\
 | 
				
			||||||
 | 
						do \
 | 
				
			||||||
 | 
							if [ -f "$$i" ]; then \
 | 
				
			||||||
 | 
							(       echo installing $$i; \
 | 
				
			||||||
 | 
								cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
 | 
								chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
				
			||||||
 | 
								mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
				
			||||||
 | 
							fi; \
 | 
				
			||||||
 | 
						done;
 | 
				
			||||||
 | 
						cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
 | 
				
			||||||
 | 
						chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
install_docs:
 | 
					install_docs:
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mkdir-p.pl \
 | 
						@$(PERL) $(TOP)/util/mkdir-p.pl \
 | 
				
			||||||
@@ -531,25 +874,44 @@ install_docs:
 | 
				
			|||||||
		$(INSTALL_PREFIX)$(MANDIR)/man5 \
 | 
							$(INSTALL_PREFIX)$(MANDIR)/man5 \
 | 
				
			||||||
		$(INSTALL_PREFIX)$(MANDIR)/man7
 | 
							$(INSTALL_PREFIX)$(MANDIR)/man7
 | 
				
			||||||
	@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
 | 
						@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 \
 | 
						for i in doc/apps/*.pod; do \
 | 
				
			||||||
		fn=`basename $$i .pod`; \
 | 
							fn=`basename $$i .pod`; \
 | 
				
			||||||
		if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
 | 
							if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
 | 
				
			||||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
							echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
 | 
				
			||||||
		(cd `$(PERL) util/dirname.pl $$i`; \
 | 
							(cd `$(PERL) util/dirname.pl $$i`; \
 | 
				
			||||||
		sh -c "$$pod2man \
 | 
							sh -c "$$pod2man \
 | 
				
			||||||
			--section=$$sec --center=OpenSSL \
 | 
								--section=$$sec --center=OpenSSL \
 | 
				
			||||||
			--release=$(VERSION) `basename $$i`") \
 | 
								--release=$(VERSION) `basename $$i`") \
 | 
				
			||||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
								>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
 | 
				
			||||||
 | 
							$(PERL) util/extract-names.pl < $$i | \
 | 
				
			||||||
 | 
								grep -v $$filecase "^$$fn\$$" | \
 | 
				
			||||||
 | 
								grep -v "[	]" | \
 | 
				
			||||||
 | 
								(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
 | 
				
			||||||
 | 
								 while read n; do \
 | 
				
			||||||
 | 
									$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
 | 
				
			||||||
 | 
								 done); \
 | 
				
			||||||
	done; \
 | 
						done; \
 | 
				
			||||||
	for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
						for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
				
			||||||
		fn=`basename $$i .pod`; \
 | 
							fn=`basename $$i .pod`; \
 | 
				
			||||||
		if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
 | 
							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}$(MANSUFFIX)"; \
 | 
				
			||||||
		(cd `$(PERL) util/dirname.pl $$i`; \
 | 
							(cd `$(PERL) util/dirname.pl $$i`; \
 | 
				
			||||||
		sh -c "$$pod2man \
 | 
							sh -c "$$pod2man \
 | 
				
			||||||
			--section=$$sec --center=OpenSSL \
 | 
								--section=$$sec --center=OpenSSL \
 | 
				
			||||||
			--release=$(VERSION) `basename $$i`") \
 | 
								--release=$(VERSION) `basename $$i`") \
 | 
				
			||||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
								>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
 | 
				
			||||||
 | 
							$(PERL) util/extract-names.pl < $$i | \
 | 
				
			||||||
 | 
								grep -v $$filecase "^$$fn\$$" | \
 | 
				
			||||||
 | 
								grep -v "[	]" | \
 | 
				
			||||||
 | 
								(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
 | 
				
			||||||
 | 
								 while read n; do \
 | 
				
			||||||
 | 
									$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
 | 
				
			||||||
 | 
								 done); \
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
 | 
					# DO NOT DELETE THIS LINE -- make depend depends on it.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										584
									
								
								Makefile.shared
									
									
									
									
									
								
							
							
						
						
									
										584
									
								
								Makefile.shared
									
									
									
									
									
								
							@@ -1,584 +0,0 @@
 | 
				
			|||||||
#
 | 
					 | 
				
			||||||
# Helper makefile to link shared libraries in a portable way.
 | 
					 | 
				
			||||||
# This is much simpler than libtool, and hopefully not too error-prone.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# The following variables need to be set on the command line to build
 | 
					 | 
				
			||||||
# properly
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# CC contains the current compiler.  This one MUST be defined
 | 
					 | 
				
			||||||
CC=cc
 | 
					 | 
				
			||||||
# LDFLAGS contains flags to be used when the temporary object file is
 | 
					 | 
				
			||||||
# created.  SHARED_LDFLAGS contains flags to be used when the shared
 | 
					 | 
				
			||||||
# library is created.
 | 
					 | 
				
			||||||
LDFLAGS=
 | 
					 | 
				
			||||||
SHARED_LDFLAGS=
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# LIBNAME contains just the name of thhe library, without prefix ("lib"
 | 
					 | 
				
			||||||
# on Unix, "cyg" for certain forms under Cygwin...) or suffix (.a, .so,
 | 
					 | 
				
			||||||
# .dll, ...).  This one MUST have a value when using this makefile.
 | 
					 | 
				
			||||||
# For example, to build libfoo.so, you need to do the following:
 | 
					 | 
				
			||||||
#LIBNAME=foo
 | 
					 | 
				
			||||||
LIBNAME=
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# LIBEXTRAS contains extra modules to link together with the library.
 | 
					 | 
				
			||||||
# For example, if a second library, say libbar.a needs to be linked into
 | 
					 | 
				
			||||||
# libfoo.so, you need to do the following:
 | 
					 | 
				
			||||||
#LIBEXTRAS=libbar.a
 | 
					 | 
				
			||||||
# Note that this MUST be used when using the link_o targets, to hold the
 | 
					 | 
				
			||||||
# names of all object files that go into the target library.
 | 
					 | 
				
			||||||
LIBEXTRAS=
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# LIBVERSION contains the current version of the library.
 | 
					 | 
				
			||||||
# For example, to build libfoo.so.1.2, you need to do the following:
 | 
					 | 
				
			||||||
#LIBVERSION=1.2
 | 
					 | 
				
			||||||
LIBVERSION=
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# LIBCOMPATVERSIONS contains the compatibility versions (a list) of
 | 
					 | 
				
			||||||
# the library.  They MUST be in decreasing order.
 | 
					 | 
				
			||||||
# For example, if libfoo.so.1.2.1 is backward compatible with libfoo.so.1.2
 | 
					 | 
				
			||||||
# and libfoo.so.1, you need to do the following:
 | 
					 | 
				
			||||||
#LIBCOMPATVERSIONS=1.2 1
 | 
					 | 
				
			||||||
# Note that on systems that use sonames, the last number will appear as
 | 
					 | 
				
			||||||
# part of it.
 | 
					 | 
				
			||||||
# It's also possible, for systems that support it (Tru64, for example),
 | 
					 | 
				
			||||||
# to add extra compatibility info with more precision, by adding a second
 | 
					 | 
				
			||||||
# list of versions, separated from the first with a semicolon, like this:
 | 
					 | 
				
			||||||
#LIBCOMPATVERSIONS=1.2 1;1.2.0 1.1.2 1.1.1 1.1.0 1.0.0
 | 
					 | 
				
			||||||
LIBCOMPATVERSIONS=
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# LIBDEPS contains all the flags necessary to cover all necessary
 | 
					 | 
				
			||||||
# dependencies to other libraries.
 | 
					 | 
				
			||||||
LIBDEPS=
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#------------------------------------------------------------------------------
 | 
					 | 
				
			||||||
# The rest is private to this makefile.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#DEBUG=:
 | 
					 | 
				
			||||||
DEBUG=set -x
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
top:
 | 
					 | 
				
			||||||
	echo "Trying to use this makefile interactively?  Don't."
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CALC_VERSIONS=	\
 | 
					 | 
				
			||||||
	SHLIB_COMPAT=; SHLIB_SOVER=; \
 | 
					 | 
				
			||||||
	if [ -n "$(LIBVERSION)$(LIBCOMPATVERSIONS)" ]; then \
 | 
					 | 
				
			||||||
		prev=""; \
 | 
					 | 
				
			||||||
		for v in `echo "$(LIBVERSION) $(LIBCOMPATVERSIONS)" | cut -d';' -f1`; do \
 | 
					 | 
				
			||||||
			SHLIB_SOVER_NODOT=$$v \
 | 
					 | 
				
			||||||
			SHLIB_SOVER=.$$v; \
 | 
					 | 
				
			||||||
			if [ -n "$$prev" ]; then \
 | 
					 | 
				
			||||||
				SHLIB_COMPAT="$$SHLIB_COMPAT .$$prev"; \
 | 
					 | 
				
			||||||
			fi; \
 | 
					 | 
				
			||||||
			prev=$$v; \
 | 
					 | 
				
			||||||
		done; \
 | 
					 | 
				
			||||||
	fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LINK_SO=	\
 | 
					 | 
				
			||||||
  ( $(DEBUG); \
 | 
					 | 
				
			||||||
    nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
 | 
					 | 
				
			||||||
    $$SHAREDCMD $(SHARED_LDFLAGS) $$SHAREDFLAGS -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
 | 
					 | 
				
			||||||
	$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS ) && \
 | 
					 | 
				
			||||||
  $(SYMLINK_SO); ( $(DEBUG); rm -f lib$(LIBNAME).exp )
 | 
					 | 
				
			||||||
SYMLINK_SO=	\
 | 
					 | 
				
			||||||
	if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
 | 
					 | 
				
			||||||
		prev=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_COMPAT" ]; then \
 | 
					 | 
				
			||||||
			for x in $$SHLIB_COMPAT; do \
 | 
					 | 
				
			||||||
				( $(DEBUG); rm -f $$SHLIB$$x$$SHLIB_SUFFIX; \
 | 
					 | 
				
			||||||
				  ln -s $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
 | 
					 | 
				
			||||||
				prev=$$SHLIB$$x$$SHLIB_SUFFIX; \
 | 
					 | 
				
			||||||
			done; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_SOVER" ]; then \
 | 
					 | 
				
			||||||
			( $(DEBUG); rm -f $$SHLIB$$SHLIB_SUFFIX; \
 | 
					 | 
				
			||||||
			  ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LINK_SO_A=	SHOBJECTS="lib$(LIBNAME).a $(LIBEXTRAS)"; $(LINK_SO)
 | 
					 | 
				
			||||||
LINK_SO_O=	SHOBJECTS="$(LIBEXTRAS)"; $(LINK_SO)
 | 
					 | 
				
			||||||
LINK_SO_A_VIA_O=	\
 | 
					 | 
				
			||||||
  SHOBJECTS=lib$(LIBNAME).o ALL=$$ALLSYMSFLAGS ALLSYMSFLAGS= NOALLSYMSFLAGS=; \
 | 
					 | 
				
			||||||
  ( $(DEBUG); \
 | 
					 | 
				
			||||||
    ld $(LDFLAGS) -r -o lib$(LIBNAME).o $$ALL lib$(LIBNAME).a $(LIBEXTRAS) ); \
 | 
					 | 
				
			||||||
  $(LINK_SO) && rm -f $(LIBNAME).o
 | 
					 | 
				
			||||||
LINK_SO_A_UNPACKED=	\
 | 
					 | 
				
			||||||
  UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
 | 
					 | 
				
			||||||
  (cd $$UNPACKDIR; ar x ../lib$(LIBNAME).a) && cp $(LIBEXTRAS) $$UNPACKDIR && \
 | 
					 | 
				
			||||||
  SHOBJECTS=$$UNPACKDIR/*.o; \
 | 
					 | 
				
			||||||
  $(LINK_SO) && rm -rf $$UNPACKDIR
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
 | 
					 | 
				
			||||||
	my_ld=`${CC} -print-prog-name=ld 2>&1` && \
 | 
					 | 
				
			||||||
	[ -n "$$my_ld" ] && \
 | 
					 | 
				
			||||||
	$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
 | 
					 | 
				
			||||||
DO_GNU=$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-Wl,--whole-archive' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='-Wl,--no-whole-archive' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.gnu:
 | 
					 | 
				
			||||||
	@ $(DO_GNU); $(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.gnu:
 | 
					 | 
				
			||||||
	@ $(DO_GNU); $(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# For Darwin AKA Mac OS/X (dyld)
 | 
					 | 
				
			||||||
link_o.darwin:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME) \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX=.dylib \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-all_load' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS="-dynamiclib" \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	if [ -n "$(LIBVERSION)" ]; then \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="$SHAREDFLAGS -current_version $(LIBVERSION)"; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.darwin:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME) \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX=.dylib \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-all_load' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS="-dynamiclib" \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	if [ -n "$(LIBVERSION)" ]; then \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="$SHAREDFLAGS -current_version $(LIBVERSION)"; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.cygwin:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	INHIBIT_SYMLINKS=yes; \
 | 
					 | 
				
			||||||
	SHLIB=cyg$(LIBNAME) \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX=.dll \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	SHLIB_SOVER=-$(LIBVERSION) \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-Wl,--whole-archive' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='-Wl,--no-whole-archive' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a" \
 | 
					 | 
				
			||||||
	SHAREDCMD='${CC}'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.cygwin:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	INHIBIT_SYMLINKS=yes; \
 | 
					 | 
				
			||||||
	SHLIB=cyg$(LIBNAME) \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX=.dll \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	SHLIB_SOVER= \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-Wl,--whole-archive' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='-Wl,--no-whole-archive' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a" \
 | 
					 | 
				
			||||||
	SHAREDCMD='${CC}'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.alpha-osf1:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		else \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		SHLIB_SOVER= \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='-none' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="-shared" \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.alpha-osf1:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		else \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		SHLIB_SOVER= \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='-none' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="-shared" \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
 | 
					 | 
				
			||||||
# option passed to the linker.
 | 
					 | 
				
			||||||
link_o.tru64:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		else \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		SHLIB_SOVER= \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='-none' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="-shared -msym" \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.tru64:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		else \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		SHLIB_SOVER= \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='-none' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="-shared -msym" \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# The difference between tru64-shared and tru64-shared-rpath is the
 | 
					 | 
				
			||||||
# -rpath ${LIBRPATH} passed to the linker.
 | 
					 | 
				
			||||||
link_o.tru64-rpath:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		else \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		SHLIB_SOVER= \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='-none' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)" \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.tru64-rpath:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		else \
 | 
					 | 
				
			||||||
			SHLIB_HIST="$(LIBVERSION)"; \
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		SHLIB_SOVER= \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='-none' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)" \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
		if [ -n "$$SHLIB_HIST" ]; then \
 | 
					 | 
				
			||||||
			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 | 
					 | 
				
			||||||
		fi; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.solaris:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-z allextract' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.solaris:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-z allextract' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OpenServer 5 native compilers used
 | 
					 | 
				
			||||||
# UnixWare 7 and OpenUNIX 8 native compilers used
 | 
					 | 
				
			||||||
link_o.svr3:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-z allextract' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.svr3:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-z allextract' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A_UNPACKED)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.irix:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.irix:
 | 
					 | 
				
			||||||
	@ if ${DETECT_GNU_LD}; then \
 | 
					 | 
				
			||||||
		$(DO_GNU); \
 | 
					 | 
				
			||||||
	else \
 | 
					 | 
				
			||||||
		$(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
		SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
		SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
		LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
		ALLSYMSFLAGS='-all' \
 | 
					 | 
				
			||||||
		NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
		SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
		SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	fi; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# HP-UX includes the full pathname of libs we depend on, so we would get
 | 
					 | 
				
			||||||
# ./libcrypto (with ./ as path information) compiled into libssl, hence
 | 
					 | 
				
			||||||
# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
 | 
					 | 
				
			||||||
# anyway.
 | 
					 | 
				
			||||||
# The object modules are loaded from lib$i.a using the undocumented -Fl
 | 
					 | 
				
			||||||
# option.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
 | 
					 | 
				
			||||||
#          by temporarily specifying "+s"!
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
link_o.hpux32:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).sl \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-Fl' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
	SHAREDCMD='/usr/ccs/bin/ld'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 | 
					 | 
				
			||||||
link_a.hpux32:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).sl \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-Fl' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
	SHAREDCMD='/usr/ccs/bin/ld'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# HP-UX includes the full pathname of libs we depend on, so we would get
 | 
					 | 
				
			||||||
# ./libcrypto (with ./ as path information) compiled into libssl, hence
 | 
					 | 
				
			||||||
# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
 | 
					 | 
				
			||||||
# anyway.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# HP-UX in 64bit mode has "+s" enabled by default; it will search for
 | 
					 | 
				
			||||||
# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
link_o.hpux64:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).sl \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='+forceload' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
	SHAREDCMD='/usr/ccs/bin/ld'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 | 
					 | 
				
			||||||
link_a.hpux64:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).sl \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='+forceload' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
 | 
					 | 
				
			||||||
	SHAREDCMD='/usr/ccs/bin/ld'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.aix:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-bnogc' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='-G -bE:lib$(LIBNAME).exp -bM:SRE' \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.aix:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS='-bnogc' \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='-G -bE:lib$(LIBNAME).exp -bM:SRE' \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A_VIA_O)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
link_o.reliantunix:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS= \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='-G' \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_O)
 | 
					 | 
				
			||||||
link_a.reliantunix:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).so \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX= \
 | 
					 | 
				
			||||||
	LIBDEPS="$(LIBDEPS) -lc" \
 | 
					 | 
				
			||||||
	ALLSYMSFLAGS= \
 | 
					 | 
				
			||||||
	NOALLSYMSFLAGS='' \
 | 
					 | 
				
			||||||
	SHAREDFLAGS='-G' \
 | 
					 | 
				
			||||||
	SHAREDCMD='$(CC)'; \
 | 
					 | 
				
			||||||
	$(LINK_SO_A_UNPACKED)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Targets to build symbolic links when needed
 | 
					 | 
				
			||||||
symlink.gnu symlink.solaris symlink.svr3 symlink.irix \
 | 
					 | 
				
			||||||
symlink.aix symlink.reliantunix:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).so; \
 | 
					 | 
				
			||||||
	$(SYMLINK_SO)
 | 
					 | 
				
			||||||
symlink.darwin:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME) \
 | 
					 | 
				
			||||||
	SHLIB_SUFFIX=.dylib; \
 | 
					 | 
				
			||||||
	$(SYMLINK_SO)
 | 
					 | 
				
			||||||
symlink.hpux32 symlink.hpux64:
 | 
					 | 
				
			||||||
	@ $(CALC_VERSIONS); \
 | 
					 | 
				
			||||||
	SHLIB=lib$(LIBNAME).sl; \
 | 
					 | 
				
			||||||
	$(SYMLINK_SO)
 | 
					 | 
				
			||||||
# The following lines means those specific architectures do no symlinks
 | 
					 | 
				
			||||||
symlink.cygwin symlib.alpha-osf1 symlink.tru64 symlink.tru64-rpath:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Compatibility targets
 | 
					 | 
				
			||||||
link_o.bsd-gcc-shared link_o.linux-shared link_o.gnu-shared: link_o.gnu
 | 
					 | 
				
			||||||
link_a.bsd-gcc-shared link_a.linux-shared link_a.gnu-shared: link_a.gnu
 | 
					 | 
				
			||||||
symlink.bsd-gcc-shared symlink.linux-shared symlink.gnu-shared: symlink.gnu
 | 
					 | 
				
			||||||
link_o.darwin-shared: link_o.darwin
 | 
					 | 
				
			||||||
link_a.darwin-shared: link_a.darwin
 | 
					 | 
				
			||||||
symlink.darwin-shared: symlink.darwin
 | 
					 | 
				
			||||||
link_o.cygwin-shared: link_o.cygwin
 | 
					 | 
				
			||||||
link_a.cygwin-shared: link_a.cygwin
 | 
					 | 
				
			||||||
symlink.cygwin-shared: symlink.cygwin
 | 
					 | 
				
			||||||
link_o.alpha-osf1-shared: link_o.alpha-osf1
 | 
					 | 
				
			||||||
link_a.alpha-osf1-shared: link_a.alpha-osf1
 | 
					 | 
				
			||||||
symlink.alpha-osf1-shared: symlink.alpha-osf1
 | 
					 | 
				
			||||||
link_o.tru64-shared: link_o.tru64
 | 
					 | 
				
			||||||
link_a.tru64-shared: link_a.tru64
 | 
					 | 
				
			||||||
symlink.tru64-shared: symlink.tru64
 | 
					 | 
				
			||||||
link_o.tru64-shared-rpath: link_o.tru64-rpath
 | 
					 | 
				
			||||||
link_a.tru64-shared-rpath: link_a.tru64-rpath
 | 
					 | 
				
			||||||
symlink.tru64-shared-rpath: symlink.tru64-rpath
 | 
					 | 
				
			||||||
link_o.solaris-shared: link_o.solaris
 | 
					 | 
				
			||||||
link_a.solaris-shared: link_a.solaris
 | 
					 | 
				
			||||||
symlink.solaris-shared: symlink.solaris
 | 
					 | 
				
			||||||
link_o.svr3-shared: link_o.svr3
 | 
					 | 
				
			||||||
link_a.svr3-shared: link_a.svr3
 | 
					 | 
				
			||||||
symlink.svr3-shared: symlink.svr3
 | 
					 | 
				
			||||||
link_o.svr5-shared: link_o.svr3
 | 
					 | 
				
			||||||
link_a.svr5-shared: link_a.svr3
 | 
					 | 
				
			||||||
symlink.svr5-shared: symlink.svr3
 | 
					 | 
				
			||||||
link_o.irix-shared: link_o.irix
 | 
					 | 
				
			||||||
link_a.irix-shared: link_a.irix
 | 
					 | 
				
			||||||
symlink.irix-shared: symlink.irix
 | 
					 | 
				
			||||||
link_o.hpux-shared: link_o.hpux32
 | 
					 | 
				
			||||||
link_a.hpux-shared: link_a.hpux32
 | 
					 | 
				
			||||||
symlink.hpux-shared: symlink.hpux32
 | 
					 | 
				
			||||||
link_o.hpux64-shared: link_o.hpux64
 | 
					 | 
				
			||||||
link_a.hpux64-shared: link_a.hpux64
 | 
					 | 
				
			||||||
symlink.hpux64-shared: symlink.hpux64
 | 
					 | 
				
			||||||
link_o.aix-shared: link_o.aix
 | 
					 | 
				
			||||||
link_a.aix-shared: link_a.aix
 | 
					 | 
				
			||||||
symlink.aix-shared: symlink.aix
 | 
					 | 
				
			||||||
link_o.reliantunix-shared: link_o.reliantunix
 | 
					 | 
				
			||||||
link_a.reliantunix-shared: link_a.reliantunix
 | 
					 | 
				
			||||||
symlink.reliantunix-shared: symlink.reliantunix
 | 
					 | 
				
			||||||
							
								
								
									
										60
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										60
									
								
								NEWS
									
									
									
									
									
								
							@@ -5,6 +5,43 @@
 | 
				
			|||||||
  This file gives a brief overview of the major changes between each OpenSSL
 | 
					  This file gives a brief overview of the major changes between each OpenSSL
 | 
				
			||||||
  release. For more details please read the CHANGES file.
 | 
					  release. For more details please read the CHANGES file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug
 | 
				
			||||||
 | 
					      o Security: Fix null-pointer assignment in do_change_cipher_spec()
 | 
				
			||||||
 | 
					      o Allow multiple active certificates with same subject in CA index
 | 
				
			||||||
 | 
					      o Multiple X590 verification fixes
 | 
				
			||||||
 | 
					      o Speed up HMAC and other operations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Security: fix various ASN1 parsing bugs.
 | 
				
			||||||
 | 
					      o New -ignore_err option to OCSP utility.
 | 
				
			||||||
 | 
					      o Various interop and bug fixes in S/MIME code.
 | 
				
			||||||
 | 
					      o SSL/TLS protocol fix for unrequested client certificates.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Security: counter the Klima-Pokorny-Rosa extension of
 | 
				
			||||||
 | 
					        Bleichbacher's attack 
 | 
				
			||||||
 | 
					      o Security: make RSA blinding default.
 | 
				
			||||||
 | 
					      o Configuration: Irix fixes, AIX fixes, better mingw support.
 | 
				
			||||||
 | 
					      o Support for new platforms: linux-ia64-ecc.
 | 
				
			||||||
 | 
					      o Build: shared library support fixes.
 | 
				
			||||||
 | 
					      o ASN.1: treat domainComponent correctly.
 | 
				
			||||||
 | 
					      o Documentation: fixes and additions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Security: Important security related bugfixes.
 | 
				
			||||||
 | 
					      o Enhanced compatibility with MIT Kerberos.
 | 
				
			||||||
 | 
					      o Can be built without the ENGINE framework.
 | 
				
			||||||
 | 
					      o IA32 assembler enhancements.
 | 
				
			||||||
 | 
					      o Support for new platforms: FreeBSD/IA64 and FreeBSD/Sparc64.
 | 
				
			||||||
 | 
					      o Configuration: the no-err option now works properly.
 | 
				
			||||||
 | 
					      o SSL/TLS: now handles manual certificate chain building.
 | 
				
			||||||
 | 
					      o SSL/TLS: certain session ID malfunctions corrected.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7:
 | 
					  Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      o New library section OCSP.
 | 
					      o New library section OCSP.
 | 
				
			||||||
@@ -17,11 +54,15 @@
 | 
				
			|||||||
        a separate distribution.
 | 
					        a separate distribution.
 | 
				
			||||||
      o New elliptic curve library section.
 | 
					      o New elliptic curve library section.
 | 
				
			||||||
      o New AES (Rijndael) library section.
 | 
					      o New AES (Rijndael) library section.
 | 
				
			||||||
      o Support for new platforms: Windows CE, Tandem OSS, A/UX, AIX 64-bit
 | 
					      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 Extended support for some platforms: VxWorks
 | 
				
			||||||
      o Enhanced support for shared libraries.
 | 
					      o Enhanced support for shared libraries.
 | 
				
			||||||
 | 
					      o Now only builds PIC code when shared library support is requested.
 | 
				
			||||||
      o Support for pkg-config.
 | 
					      o Support for pkg-config.
 | 
				
			||||||
      o Lots of new manuals.
 | 
					      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
 | 
					      o Change DES API to clean up the namespace (some applications link also
 | 
				
			||||||
        against libdes providing similar functions having the same name).
 | 
					        against libdes providing similar functions having the same name).
 | 
				
			||||||
        Provide macros for backward compatibility (will be removed in the
 | 
					        Provide macros for backward compatibility (will be removed in the
 | 
				
			||||||
@@ -42,10 +83,27 @@
 | 
				
			|||||||
      o SSL/TLS: allow optional cipher choice according to server's preference.
 | 
					      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: allow server to explicitly set new session ids.
 | 
				
			||||||
      o SSL/TLS: support Kerberos cipher suites (RFC2712).
 | 
					      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: allow more precise control of renegotiations and sessions.
 | 
				
			||||||
      o SSL/TLS: add callback to retrieve SSL/TLS messages.
 | 
					      o SSL/TLS: add callback to retrieve SSL/TLS messages.
 | 
				
			||||||
      o SSL/TLS: support AES cipher suites (RFC3268).
 | 
					      o SSL/TLS: support AES cipher suites (RFC3268).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Security: fix various ASN1 parsing bugs.
 | 
				
			||||||
 | 
					      o SSL/TLS protocol fix for unrequested client certificates.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Security: counter the Klima-Pokorny-Rosa extension of
 | 
				
			||||||
 | 
					        Bleichbacher's attack 
 | 
				
			||||||
 | 
					      o Security: make RSA blinding default.
 | 
				
			||||||
 | 
					      o Build: shared library support fixes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      o Important security related bugfixes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
 | 
					  Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      o New configuration targets for Tandem OSS and A/UX.
 | 
					      o New configuration targets for Tandem OSS and A/UX.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										87
									
								
								PROBLEMS
									
									
									
									
									
								
							
							
						
						
									
										87
									
								
								PROBLEMS
									
									
									
									
									
								
							@@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries.  This
 | 
				
			|||||||
means that -L switches won't matter unless OpenSSL is built with shared
 | 
					means that -L switches won't matter unless OpenSSL is built with shared
 | 
				
			||||||
library support.
 | 
					library support.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The workaround may be to change the following lines in apps/Makefile.ssl and
 | 
					The workaround may be to change the following lines in apps/Makefile and
 | 
				
			||||||
test/Makefile.ssl:
 | 
					test/Makefile:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  LIBCRYPTO=-L.. -lcrypto
 | 
					  LIBCRYPTO=-L.. -lcrypto
 | 
				
			||||||
  LIBSSL=-L.. -lssl
 | 
					  LIBSSL=-L.. -lssl
 | 
				
			||||||
@@ -46,3 +46,86 @@ scripts use the same name for output and input files, which means different
 | 
				
			|||||||
will interfere with each other and lead to test failure.
 | 
					will interfere with each other and lead to test failure.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The solution is simple for now: don't run parallell make when testing.
 | 
					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'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Problems with hp-parisc2-cc target when used with "no-asm" flag
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					When using the hp-parisc2-cc target, wrong bignum code is generated.
 | 
				
			||||||
 | 
					This is due to the SIXTY_FOUR_BIT build being compiled with the +O3
 | 
				
			||||||
 | 
					aggressive optimization.
 | 
				
			||||||
 | 
					The problem manifests itself by the BN_kronecker test hanging in an
 | 
				
			||||||
 | 
					endless loop. Reason: the BN_kronecker test calls BN_generate_prime()
 | 
				
			||||||
 | 
					which itself hangs. The reason could be tracked down to the bn_mul_comba8()
 | 
				
			||||||
 | 
					function in bn_asm.c. At some occasions the higher 32bit value of r[7]
 | 
				
			||||||
 | 
					is off by 1 (meaning: calculated=shouldbe+1). Further analysis failed,
 | 
				
			||||||
 | 
					as no debugger support possible at +O3 and additional fprintf()'s
 | 
				
			||||||
 | 
					introduced fixed the bug, therefore it is most likely a bug in the
 | 
				
			||||||
 | 
					optimizer.
 | 
				
			||||||
 | 
					The bug was found in the BN_kronecker test but may also lead to
 | 
				
			||||||
 | 
					failures in other parts of the code.
 | 
				
			||||||
 | 
					(See Ticket #426.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Workaround: modify the target to +O2 when building with no-asm.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Poor support for AIX shared builds.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					do_aix-shared rule is not flexible enough to parameterize through a
 | 
				
			||||||
 | 
					config-line. './Configure aix43-cc shared' is working, but not
 | 
				
			||||||
 | 
					'./Configure aix64-gcc shared'. In latter case make fails to create shared
 | 
				
			||||||
 | 
					libraries. It's possible to build 64-bit shared libraries by running
 | 
				
			||||||
 | 
					'env OBJECT_MODE=64 make', but we need more elegant solution. Preferably one
 | 
				
			||||||
 | 
					supporting even gcc shared builds. See RT#463 for background information.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Problems building shared libraries on SCO OpenServer Release 5.0.6
 | 
				
			||||||
 | 
					  with gcc 2.95.3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The symptoms appear when running the test suite, more specifically
 | 
				
			||||||
 | 
					test/ectest, with the following result:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					OSSL_LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH="$OSSL_LIBPATH:$LD_LIBRARY_PATH"; DYLD_LIBRARY_PATH="$OSSL_LIBPATH:$DYLD_LIBRARY_PATH"; SHLIB_PATH="$OSSL_LIBPATH:$SHLIB_PATH"; LIBPATH="$OSSL_LIBPATH:$LIBPATH"; if [ "debug-sco5-gcc" = "Cygwin" ]; then PATH="${LIBPATH}:$PATH"; fi; export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; ./ectest
 | 
				
			||||||
 | 
					ectest.c:186: ABORT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The cause of the problem seems to be that isxdigit(), called from
 | 
				
			||||||
 | 
					BN_hex2bn(), returns 0 on a perfectly legitimate hex digit.  Further
 | 
				
			||||||
 | 
					investigation shows that any of the isxxx() macros return 0 on any
 | 
				
			||||||
 | 
					input.  A direct look in the information array that the isxxx() use,
 | 
				
			||||||
 | 
					called __ctype, shows that it contains all zeroes...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Taking a look at the newly created libcrypto.so with nm, one can see
 | 
				
			||||||
 | 
					that the variable __ctype is defined in libcrypto's .bss (which
 | 
				
			||||||
 | 
					explains why it is filled with zeroes):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$ nm -Pg libcrypto.so | grep __ctype
 | 
				
			||||||
 | 
					__ctype B 0011659c
 | 
				
			||||||
 | 
					__ctype2 U         
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Curiously, __ctype2 is undefined, in spite of being declared in
 | 
				
			||||||
 | 
					/usr/include/ctype.h in exactly the same way as __ctype.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Any information helping to solve this issue would be deeply
 | 
				
			||||||
 | 
					appreciated.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NOTE: building non-shared doesn't come with this problem.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								README
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 OpenSSL 0.9.8-dev XX xxx XXXX
 | 
					 OpenSSL 0.9.7d 17 Mar 2004
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Copyright (c) 1998-2002 The OpenSSL Project
 | 
					 Copyright (c) 1998-2004 The OpenSSL Project
 | 
				
			||||||
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 | 
					 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 | 
				
			||||||
 All rights reserved.
 | 
					 All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -154,7 +154,7 @@
 | 
				
			|||||||
    - Stack Traceback (if the application dumps core)
 | 
					    - Stack Traceback (if the application dumps core)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 Report the bug to the OpenSSL project via the Request Tracker
 | 
					 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
 | 
					    openssl-bugs@openssl.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										39
									
								
								STATUS
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								STATUS
									
									
									
									
									
								
							@@ -1,15 +1,21 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  OpenSSL STATUS                           Last modified at
 | 
					  OpenSSL STATUS                           Last modified at
 | 
				
			||||||
  ______________                           $Date: 2002/11/21 22:39:08 $
 | 
					  ______________                           $Date: 2004/03/23 15:00:59 $
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  DEVELOPMENT STATE
 | 
					  DEVELOPMENT STATE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    o  OpenSSL 0.9.8:  Under development...
 | 
					    o  OpenSSL 0.9.8:  Under development...
 | 
				
			||||||
    o  OpenSSL 0.9.7-beta4: Released on November 19th, 2002
 | 
					    o  OpenSSL 0.9.7d: Released on March     17th, 2004
 | 
				
			||||||
       Debian GNU/Linux (kernel version 2.4.19, gcc 2.95.4)	- PASSED
 | 
					    o  OpenSSL 0.9.7c: Released on September 30th, 2003
 | 
				
			||||||
    o  OpenSSL 0.9.7-beta3: Released on July 30th, 2002
 | 
					    o  OpenSSL 0.9.7b: Released on April     10th, 2003
 | 
				
			||||||
    o  OpenSSL 0.9.7-beta2: Released on June 16th, 2002
 | 
					    o  OpenSSL 0.9.7a: Released on February  19th, 2003
 | 
				
			||||||
    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.6m: Released on March     17th, 2004
 | 
				
			||||||
 | 
					    o  OpenSSL 0.9.6l: Released on November   4th, 2003
 | 
				
			||||||
 | 
					    o  OpenSSL 0.9.6k: Released on September 30th, 2003
 | 
				
			||||||
 | 
					    o  OpenSSL 0.9.6j: Released on April     10th, 2003
 | 
				
			||||||
 | 
					    o  OpenSSL 0.9.6i: Released on February  19th, 2003
 | 
				
			||||||
 | 
					    o  OpenSSL 0.9.6h: Released on December   5th, 2002
 | 
				
			||||||
    o  OpenSSL 0.9.6g: Released on August     9th, 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.6f: Released on August     8th, 2002
 | 
				
			||||||
    o  OpenSSL 0.9.6e: Released on July      30th, 2002
 | 
					    o  OpenSSL 0.9.6e: Released on July      30th, 2002
 | 
				
			||||||
@@ -30,20 +36,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  RELEASE SHOWSTOPPERS
 | 
					  RELEASE SHOWSTOPPERS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    o BN_mod_mul verification fails for mips3-sgi-irix
 | 
					    o 
 | 
				
			||||||
      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
 | 
					  AVAILABLE PATCHES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -66,15 +59,11 @@
 | 
				
			|||||||
	UTIL (a new set of library functions to support some higher level
 | 
						UTIL (a new set of library functions to support some higher level
 | 
				
			||||||
	      functionality that is currently missing).
 | 
						      functionality that is currently missing).
 | 
				
			||||||
	Shared library support for VMS.
 | 
						Shared library support for VMS.
 | 
				
			||||||
	Kerberos 5 authentication
 | 
						Kerberos 5 authentication (Heimdal)
 | 
				
			||||||
	Constification
 | 
						Constification
 | 
				
			||||||
	OCSP
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  NEEDS PATCH
 | 
					  NEEDS PATCH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    o  0.9.8-dev: COMPLEMENTOFALL and COMPLEMENTOFDEFAULT do not
 | 
					 | 
				
			||||||
       handle ECCdraft cipher suites correctly.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    o  apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
 | 
					    o  apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    o  "OpenSSL STATUS" is never up-to-date.
 | 
					    o  "OpenSSL STATUS" is never up-to-date.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										661
									
								
								TABLE
									
									
									
									
									
								
							
							
						
						
									
										661
									
								
								TABLE
									
									
									
									
									
								
							@@ -32,7 +32,7 @@ $unistd       =
 | 
				
			|||||||
$thread_cflag = 
 | 
					$thread_cflag = 
 | 
				
			||||||
$sys_id       = WIN32
 | 
					$sys_id       = WIN32
 | 
				
			||||||
$lflags       = 
 | 
					$lflags       = 
 | 
				
			||||||
$bn_ops       = BN_LLONG DES_PTR RC4_INDEX
 | 
					$bn_ops       = BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = 
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = 
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = 
 | 
				
			||||||
@@ -225,6 +225,56 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** FreeBSD-ia64
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
 | 
					$sys_id       = 
 | 
				
			||||||
 | 
					$lflags       = 
 | 
				
			||||||
 | 
					$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
 | 
				
			||||||
 | 
					$bn_obj       = asm/ia64-cpp.o
 | 
				
			||||||
 | 
					$des_obj      = 
 | 
				
			||||||
 | 
					$bf_obj       = 
 | 
				
			||||||
 | 
					$md5_obj      = 
 | 
				
			||||||
 | 
					$sha1_obj     = 
 | 
				
			||||||
 | 
					$cast_obj     = 
 | 
				
			||||||
 | 
					$rc4_obj      = 
 | 
				
			||||||
 | 
					$rmd160_obj   = 
 | 
				
			||||||
 | 
					$rc5_obj      = 
 | 
				
			||||||
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
 | 
					$shared_target= bsd-gcc-shared
 | 
				
			||||||
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
 | 
					$shared_ldflag = 
 | 
				
			||||||
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** FreeBSD-sparc64
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE
 | 
				
			||||||
 | 
					$sys_id       = 
 | 
				
			||||||
 | 
					$lflags       = 
 | 
				
			||||||
 | 
					$bn_ops       = SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR
 | 
				
			||||||
 | 
					$bn_obj       = 
 | 
				
			||||||
 | 
					$des_obj      = 
 | 
				
			||||||
 | 
					$bf_obj       = 
 | 
				
			||||||
 | 
					$md5_obj      = 
 | 
				
			||||||
 | 
					$sha1_obj     = 
 | 
				
			||||||
 | 
					$cast_obj     = 
 | 
				
			||||||
 | 
					$rc4_obj      = 
 | 
				
			||||||
 | 
					$rmd160_obj   = 
 | 
				
			||||||
 | 
					$rc5_obj      = 
 | 
				
			||||||
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
 | 
					$shared_target= bsd-gcc-shared
 | 
				
			||||||
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
 | 
					$shared_ldflag = 
 | 
				
			||||||
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** MPE/iX-gcc
 | 
					*** MPE/iX-gcc
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB
 | 
					$cflags       = -D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB
 | 
				
			||||||
@@ -250,31 +300,6 @@ $shared_extension =
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** Mingw32
 | 
					 | 
				
			||||||
$cc           = gcc
 | 
					 | 
				
			||||||
$cflags       = -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = 
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = 
 | 
					 | 
				
			||||||
$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					 | 
				
			||||||
$bn_obj       = 
 | 
					 | 
				
			||||||
$des_obj      = 
 | 
					 | 
				
			||||||
$bf_obj       = 
 | 
					 | 
				
			||||||
$md5_obj      = 
 | 
					 | 
				
			||||||
$sha1_obj     = 
 | 
					 | 
				
			||||||
$cast_obj     = 
 | 
					 | 
				
			||||||
$rc4_obj      = 
 | 
					 | 
				
			||||||
$rmd160_obj   = 
 | 
					 | 
				
			||||||
$rc5_obj      = 
 | 
					 | 
				
			||||||
$dso_scheme   = win32
 | 
					 | 
				
			||||||
$shared_target= 
 | 
					 | 
				
			||||||
$shared_cflag = 
 | 
					 | 
				
			||||||
$shared_ldflag = 
 | 
					 | 
				
			||||||
$shared_extension = 
 | 
					 | 
				
			||||||
$ranlib       = 
 | 
					 | 
				
			||||||
$arflags      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** NetBSD-m68
 | 
					*** NetBSD-m68
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN
 | 
					$cflags       = -DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN
 | 
				
			||||||
@@ -683,15 +708,15 @@ $thread_cflag = -Kthread
 | 
				
			|||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					$lflags       = -lsocket -lnsl
 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = asm/bx86-elf.o
 | 
				
			||||||
$md5_obj      = 
 | 
					$md5_obj      = asm/mx86-elf.o
 | 
				
			||||||
$sha1_obj     = 
 | 
					$sha1_obj     = asm/sx86-elf.o
 | 
				
			||||||
$cast_obj     = 
 | 
					$cast_obj     = asm/cx86-elf.o
 | 
				
			||||||
$rc4_obj      = 
 | 
					$rc4_obj      = asm/rx86-elf.o
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = asm/rm86-elf.o
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = asm/r586-elf.o
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= svr5-shared
 | 
					$shared_target= svr5-shared
 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					$shared_cflag = -Kpic
 | 
				
			||||||
@@ -708,15 +733,15 @@ $thread_cflag = -pthread
 | 
				
			|||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					$lflags       = -lsocket -lnsl
 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = asm/bx86-elf.o
 | 
				
			||||||
$md5_obj      = 
 | 
					$md5_obj      = asm/mx86-elf.o
 | 
				
			||||||
$sha1_obj     = 
 | 
					$sha1_obj     = asm/sx86-elf.o
 | 
				
			||||||
$cast_obj     = 
 | 
					$cast_obj     = asm/cx86-elf.o
 | 
				
			||||||
$rc4_obj      = 
 | 
					$rc4_obj      = asm/rx86-elf.o
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = asm/rm86-elf.o
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = asm/r586-elf.o
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= svr5-shared
 | 
					$shared_target= svr5-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
@@ -725,56 +750,6 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** OpenUNIX-8-pentium
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kalloca -Kpentium
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					 | 
				
			||||||
$bn_obj       = 
 | 
					 | 
				
			||||||
$des_obj      = 
 | 
					 | 
				
			||||||
$bf_obj       = 
 | 
					 | 
				
			||||||
$md5_obj      = 
 | 
					 | 
				
			||||||
$sha1_obj     = 
 | 
					 | 
				
			||||||
$cast_obj     = 
 | 
					 | 
				
			||||||
$rc4_obj      = 
 | 
					 | 
				
			||||||
$rmd160_obj   = 
 | 
					 | 
				
			||||||
$rc5_obj      = 
 | 
					 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					 | 
				
			||||||
$shared_target= svr5-shared
 | 
					 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					 | 
				
			||||||
$shared_ldflag = 
 | 
					 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					 | 
				
			||||||
$ranlib       = 
 | 
					 | 
				
			||||||
$arflags      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** OpenUNIX-8-pentium_pro
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kalloca -Kpentium_pro
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					 | 
				
			||||||
$bn_obj       = 
 | 
					 | 
				
			||||||
$des_obj      = 
 | 
					 | 
				
			||||||
$bf_obj       = 
 | 
					 | 
				
			||||||
$md5_obj      = 
 | 
					 | 
				
			||||||
$sha1_obj     = 
 | 
					 | 
				
			||||||
$cast_obj     = 
 | 
					 | 
				
			||||||
$rc4_obj      = 
 | 
					 | 
				
			||||||
$rmd160_obj   = 
 | 
					 | 
				
			||||||
$rc5_obj      = 
 | 
					 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					 | 
				
			||||||
$shared_target= svr5-shared
 | 
					 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					 | 
				
			||||||
$shared_ldflag = 
 | 
					 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					 | 
				
			||||||
$ranlib       = 
 | 
					 | 
				
			||||||
$arflags      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** ReliantUNIX
 | 
					*** ReliantUNIX
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -KPIC -g -DTERMIOS -DB_ENDIAN
 | 
					$cflags       = -KPIC -g -DTERMIOS -DB_ENDIAN
 | 
				
			||||||
@@ -1118,10 +1093,10 @@ $rc4_obj      =
 | 
				
			|||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = 
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = 
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= 
 | 
					$shared_target= aix-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = 
 | 
				
			||||||
$shared_extension = 
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1168,10 +1143,10 @@ $rc4_obj      =
 | 
				
			|||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = 
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = 
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= 
 | 
					$shared_target= aix-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -q64
 | 
				
			||||||
$shared_extension = 
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = -X 64
 | 
					$arflags      = -X 64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1527,7 +1502,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** debug-ben
 | 
					*** debug-ben
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe
 | 
					$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -Wall -Wshadow -Werror -pipe
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -1552,7 +1527,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** debug-ben-debug
 | 
					*** debug-ben-debug
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe
 | 
					$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -Wall -Wshadow -Werror -pipe
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -1575,6 +1550,31 @@ $shared_extension =
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** debug-ben-fips-debug
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_FIPS -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
 | 
					$sys_id       = 
 | 
				
			||||||
 | 
					$lflags       = 
 | 
				
			||||||
 | 
					$bn_ops       = 
 | 
				
			||||||
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
 | 
					$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      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** debug-ben-openbsd
 | 
					*** debug-ben-openbsd
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe
 | 
					$cflags       = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe
 | 
				
			||||||
@@ -1677,7 +1677,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** debug-levitte-linux-elf
 | 
					*** debug-levitte-linux-elf
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -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
 | 
					$cflags       = -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 -Wmissing-prototypes -Wno-long-long -pipe
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -1702,7 +1702,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** debug-levitte-linux-elf-extreme
 | 
					*** debug-levitte-linux-elf-extreme
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -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
 | 
					$cflags       = -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 -Wmissing-prototypes -Wconversion -Wno-long-long -pipe
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -1727,7 +1727,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** debug-levitte-linux-noasm
 | 
					*** debug-levitte-linux-noasm
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -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
 | 
					$cflags       = -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 -Wmissing-prototypes -Wno-long-long -pipe
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -1752,7 +1752,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** debug-levitte-linux-noasm-extreme
 | 
					*** debug-levitte-linux-noasm-extreme
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -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
 | 
					$cflags       = -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 -Wmissing-prototypes -Wconversion -Wno-long-long -pipe
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -1945,7 +1945,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -1995,7 +1995,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -2302,7 +2302,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** hpux-ia64-cc
 | 
					*** hpux-ia64-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -Ae +DD32 +O3 +ESlit -z -DB_ENDIAN
 | 
					$cflags       = -Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2352,7 +2352,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** hpux-parisc-cc
 | 
					*** hpux-parisc-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
 | 
					$cflags       = +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2427,7 +2427,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** hpux-parisc1_1-cc
 | 
					*** hpux-parisc1_1-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
 | 
					$cflags       = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2452,7 +2452,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** hpux-parisc2-cc
 | 
					*** hpux-parisc2-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
 | 
					$cflags       = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2577,7 +2577,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** hpux64-ia64-cc
 | 
					*** hpux64-ia64-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN
 | 
					$cflags       = -Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2652,7 +2652,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** hpux64-parisc2-cc
 | 
					*** hpux64-parisc2-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
 | 
					$cflags       = +DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_REENTRANT
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2675,6 +2675,31 @@ $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** hpux64-parisc2-gcc
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -O3 -DB_ENDIAN -DMD32_XARRAY
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
 | 
					$sys_id       = 
 | 
				
			||||||
 | 
					$lflags       = -ldl
 | 
				
			||||||
 | 
					$bn_ops       = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
 | 
				
			||||||
 | 
					$bn_obj       = asm/pa-risc2W.o
 | 
				
			||||||
 | 
					$des_obj      = 
 | 
				
			||||||
 | 
					$bf_obj       = 
 | 
				
			||||||
 | 
					$md5_obj      = 
 | 
				
			||||||
 | 
					$sha1_obj     = 
 | 
				
			||||||
 | 
					$cast_obj     = 
 | 
				
			||||||
 | 
					$rc4_obj      = 
 | 
				
			||||||
 | 
					$rmd160_obj   = 
 | 
				
			||||||
 | 
					$rc5_obj      = 
 | 
				
			||||||
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
 | 
					$shared_target= hpux64-shared
 | 
				
			||||||
 | 
					$shared_cflag = -fpic
 | 
				
			||||||
 | 
					$shared_ldflag = 
 | 
				
			||||||
 | 
					$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** hurd-x86
 | 
					*** hurd-x86
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
 | 
					$cflags       = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
 | 
				
			||||||
@@ -2752,7 +2777,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** irix-mips3-cc
 | 
					*** irix-mips3-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
 | 
					$cflags       = -n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -D_SGI_MP_SOURCE
 | 
					$thread_cflag = -D_SGI_MP_SOURCE
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -2770,7 +2795,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= irix-shared
 | 
					$shared_target= irix-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -n32
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -2795,7 +2820,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= irix-shared
 | 
					$shared_target= irix-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -mabi=n32
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -2820,7 +2845,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= irix-shared
 | 
					$shared_target= irix-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -64
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -2845,7 +2870,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= irix-shared
 | 
					$shared_target= irix-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -mabi=64
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3050,6 +3075,31 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** linux-ia64-ecc
 | 
				
			||||||
 | 
					$cc           = ecc
 | 
				
			||||||
 | 
					$cflags       = -DL_ENDIAN -DTERMIO -O2 -Wall
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
 | 
					$sys_id       = 
 | 
				
			||||||
 | 
					$lflags       = -ldl
 | 
				
			||||||
 | 
					$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
 | 
				
			||||||
 | 
					$bn_obj       = asm/ia64.o
 | 
				
			||||||
 | 
					$des_obj      = 
 | 
				
			||||||
 | 
					$bf_obj       = 
 | 
				
			||||||
 | 
					$md5_obj      = 
 | 
				
			||||||
 | 
					$sha1_obj     = 
 | 
				
			||||||
 | 
					$cast_obj     = 
 | 
				
			||||||
 | 
					$rc4_obj      = 
 | 
				
			||||||
 | 
					$rmd160_obj   = 
 | 
				
			||||||
 | 
					$rc5_obj      = 
 | 
				
			||||||
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
 | 
					$shared_target= linux-shared
 | 
				
			||||||
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
 | 
					$shared_ldflag = 
 | 
				
			||||||
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** linux-k6
 | 
					*** linux-k6
 | 
				
			||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall
 | 
					$cflags       = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall
 | 
				
			||||||
@@ -3104,10 +3154,10 @@ $arflags      =
 | 
				
			|||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
 | 
					$cflags       = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = 
 | 
					$lflags       = -ldl
 | 
				
			||||||
$bn_ops       = BN_LLONG
 | 
					$bn_ops       = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = 
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = 
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = 
 | 
				
			||||||
@@ -3117,11 +3167,11 @@ $cast_obj     =
 | 
				
			|||||||
$rc4_obj      = 
 | 
					$rc4_obj      = 
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = 
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = 
 | 
				
			||||||
$dso_scheme   = 
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= 
 | 
					$shared_target= linux-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = 
 | 
				
			||||||
$shared_extension = 
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -3129,10 +3179,10 @@ $arflags      =
 | 
				
			|||||||
$cc           = gcc
 | 
					$cc           = gcc
 | 
				
			||||||
$cflags       = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
 | 
					$cflags       = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = 
 | 
					$lflags       = -ldl
 | 
				
			||||||
$bn_ops       = BN_LLONG
 | 
					$bn_ops       = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = 
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = 
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = 
 | 
				
			||||||
@@ -3142,11 +3192,11 @@ $cast_obj     =
 | 
				
			|||||||
$rc4_obj      = 
 | 
					$rc4_obj      = 
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = 
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = 
 | 
				
			||||||
$dso_scheme   = 
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= 
 | 
					$shared_target= linux-shared
 | 
				
			||||||
$shared_cflag = 
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = 
 | 
				
			||||||
$shared_extension = 
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -3375,13 +3425,88 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** linux-x86_64
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
 | 
					$sys_id       = 
 | 
				
			||||||
 | 
					$lflags       = -ldl
 | 
				
			||||||
 | 
					$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL
 | 
				
			||||||
 | 
					$bn_obj       = asm/x86_64-gcc.o
 | 
				
			||||||
 | 
					$des_obj      = 
 | 
				
			||||||
 | 
					$bf_obj       = 
 | 
				
			||||||
 | 
					$md5_obj      = 
 | 
				
			||||||
 | 
					$sha1_obj     = 
 | 
				
			||||||
 | 
					$cast_obj     = 
 | 
				
			||||||
 | 
					$rc4_obj      = 
 | 
				
			||||||
 | 
					$rmd160_obj   = 
 | 
				
			||||||
 | 
					$rc5_obj      = 
 | 
				
			||||||
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
 | 
					$shared_target= linux-shared
 | 
				
			||||||
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
 | 
					$shared_ldflag = -m64
 | 
				
			||||||
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** linux64-sparcv9
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = -D_REENTRANT
 | 
				
			||||||
 | 
					$sys_id       = ULTRASPARC
 | 
				
			||||||
 | 
					$lflags       = -ldl
 | 
				
			||||||
 | 
					$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
 | 
				
			||||||
 | 
					$bn_obj       = 
 | 
				
			||||||
 | 
					$des_obj      = 
 | 
				
			||||||
 | 
					$bf_obj       = 
 | 
				
			||||||
 | 
					$md5_obj      = asm/md5-sparcv9.o
 | 
				
			||||||
 | 
					$sha1_obj     = 
 | 
				
			||||||
 | 
					$cast_obj     = 
 | 
				
			||||||
 | 
					$rc4_obj      = 
 | 
				
			||||||
 | 
					$rmd160_obj   = 
 | 
				
			||||||
 | 
					$rc5_obj      = 
 | 
				
			||||||
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
 | 
					$shared_target= linux-shared
 | 
				
			||||||
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
 | 
					$shared_ldflag = -m64
 | 
				
			||||||
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** mingw
 | 
				
			||||||
 | 
					$cc           = gcc
 | 
				
			||||||
 | 
					$cflags       = -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = 
 | 
				
			||||||
 | 
					$sys_id       = MINGW32
 | 
				
			||||||
 | 
					$lflags       = -mno-cygwin -lwsock32 -lgdi32
 | 
				
			||||||
 | 
					$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
				
			||||||
 | 
					$bn_obj       = asm/bn86-out.o asm/co86-out.o
 | 
				
			||||||
 | 
					$des_obj      = asm/dx86-out.o asm/yx86-out.o
 | 
				
			||||||
 | 
					$bf_obj       = asm/bx86-out.o
 | 
				
			||||||
 | 
					$md5_obj      = asm/mx86-out.o
 | 
				
			||||||
 | 
					$sha1_obj     = asm/sx86-out.o
 | 
				
			||||||
 | 
					$cast_obj     = asm/cx86-out.o
 | 
				
			||||||
 | 
					$rc4_obj      = asm/rx86-out.o
 | 
				
			||||||
 | 
					$rmd160_obj   = asm/rm86-out.o
 | 
				
			||||||
 | 
					$rc5_obj      = asm/r586-out.o
 | 
				
			||||||
 | 
					$dso_scheme   = win32
 | 
				
			||||||
 | 
					$shared_target= 
 | 
				
			||||||
 | 
					$shared_cflag = 
 | 
				
			||||||
 | 
					$shared_ldflag = 
 | 
				
			||||||
 | 
					$shared_extension = .dll
 | 
				
			||||||
 | 
					$ranlib       = 
 | 
				
			||||||
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** ncr-scde
 | 
					*** ncr-scde
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw
 | 
					$cflags       = -O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					$lflags       = -lsocket -lnsl -lc89
 | 
				
			||||||
$bn_ops       = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					$bn_ops       = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = 
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = 
 | 
				
			||||||
@@ -3606,47 +3731,22 @@ $cflags       = -belf
 | 
				
			|||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lresolv -lnsl
 | 
					$lflags       = -lsocket -lnsl
 | 
				
			||||||
$bn_ops       = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					$bn_ops       = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = asm/bx86-elf.o
 | 
				
			||||||
$md5_obj      = 
 | 
					$md5_obj      = asm/mx86-elf.o
 | 
				
			||||||
$sha1_obj     = 
 | 
					$sha1_obj     = asm/sx86-elf.o
 | 
				
			||||||
$cast_obj     = 
 | 
					$cast_obj     = asm/cx86-elf.o
 | 
				
			||||||
$rc4_obj      = 
 | 
					$rc4_obj      = asm/rx86-elf.o
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = asm/rm86-elf.o
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = asm/r586-elf.o
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= svr3-shared
 | 
					$shared_target= svr3-shared
 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					$shared_cflag = -Kpic
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = 
 | 
				
			||||||
$shared_extension = 
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					 | 
				
			||||||
$arflags      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** sco5-cc-pentium
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -Kpentium
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket
 | 
					 | 
				
			||||||
$bn_ops       = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					 | 
				
			||||||
$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       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -3656,7 +3756,7 @@ $cflags       = -O3 -fomit-frame-pointer
 | 
				
			|||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lresolv -lnsl
 | 
					$lflags       = -lsocket -lnsl
 | 
				
			||||||
$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
				
			||||||
$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
@@ -3671,7 +3771,7 @@ $dso_scheme   = dlfcn
 | 
				
			|||||||
$shared_target= svr3-shared
 | 
					$shared_target= svr3-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = 
 | 
				
			||||||
$shared_extension = 
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -3745,7 +3845,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3795,7 +3895,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3845,7 +3945,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3870,7 +3970,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3908,19 +4008,19 @@ $thread_cflag = -D_REENTRANT
 | 
				
			|||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lnsl -ldl
 | 
					$lflags       = -lsocket -lnsl -ldl
 | 
				
			||||||
$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
				
			||||||
$bn_obj       = asm/bn86-sol.o asm/co86-sol.o
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = asm/dx86-sol.o asm/yx86-sol.o
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
$bf_obj       = asm/bx86-sol.o
 | 
					$bf_obj       = asm/bx86-elf.o
 | 
				
			||||||
$md5_obj      = asm/mx86-sol.o
 | 
					$md5_obj      = asm/mx86-elf.o
 | 
				
			||||||
$sha1_obj     = asm/sx86-sol.o
 | 
					$sha1_obj     = asm/sx86-elf.o
 | 
				
			||||||
$cast_obj     = asm/cx86-sol.o
 | 
					$cast_obj     = asm/cx86-elf.o
 | 
				
			||||||
$rc4_obj      = asm/rx86-sol.o
 | 
					$rc4_obj      = asm/rx86-elf.o
 | 
				
			||||||
$rmd160_obj   = asm/rm86-sol.o
 | 
					$rmd160_obj   = asm/rm86-elf.o
 | 
				
			||||||
$rc5_obj      = asm/r586-sol.o
 | 
					$rc5_obj      = asm/r586-elf.o
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3970,7 +4070,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = -m64
 | 
					$shared_ldflag = -m64 -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -3995,7 +4095,7 @@ $rc5_obj      =
 | 
				
			|||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= solaris-shared
 | 
					$shared_target= solaris-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
$shared_ldflag = -m64
 | 
					$shared_ldflag = -m64 -shared
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
@@ -4052,7 +4152,7 @@ $arflags      =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
*** ultrix-cc
 | 
					*** ultrix-cc
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -std1 -O -Olimit 1000 -DL_ENDIAN
 | 
					$cflags       = -std1 -O -Olimit 2500 -DL_ENDIAN
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = (unknown)
 | 
					$thread_cflag = (unknown)
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
@@ -4125,31 +4225,6 @@ $shared_extension =
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** unixware-2.0-pentium
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -DFILIO_H -DNO_STRINGS_H -Kpentium
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket -lnsl -lresolv -lx
 | 
					 | 
				
			||||||
$bn_ops       = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					 | 
				
			||||||
$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      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** unixware-2.1
 | 
					*** unixware-2.1
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -O -DFILIO_H
 | 
					$cflags       = -O -DFILIO_H
 | 
				
			||||||
@@ -4175,56 +4250,6 @@ $shared_extension =
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** unixware-2.1-p6
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kp6
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket -lnsl -lresolv -lx
 | 
					 | 
				
			||||||
$bn_ops       = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					 | 
				
			||||||
$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      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** unixware-2.1-pentium
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kpentium
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket -lnsl -lresolv -lx
 | 
					 | 
				
			||||||
$bn_ops       = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					 | 
				
			||||||
$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      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** unixware-7
 | 
					*** unixware-7
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = cc
 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kalloca
 | 
					$cflags       = -O -DFILIO_H -Kalloca
 | 
				
			||||||
@@ -4233,15 +4258,15 @@ $thread_cflag = -Kthread
 | 
				
			|||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					$lflags       = -lsocket -lnsl
 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = asm/bx86-elf.o
 | 
				
			||||||
$md5_obj      = 
 | 
					$md5_obj      = asm/mx86-elf.o
 | 
				
			||||||
$sha1_obj     = 
 | 
					$sha1_obj     = asm/sx86-elf.o
 | 
				
			||||||
$cast_obj     = 
 | 
					$cast_obj     = asm/cx86-elf.o
 | 
				
			||||||
$rc4_obj      = 
 | 
					$rc4_obj      = asm/rx86-elf.o
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = asm/rm86-elf.o
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = asm/r586-elf.o
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= svr5-shared
 | 
					$shared_target= svr5-shared
 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					$shared_cflag = -Kpic
 | 
				
			||||||
@@ -4258,15 +4283,15 @@ $thread_cflag = -D_REENTRANT
 | 
				
			|||||||
$sys_id       = 
 | 
					$sys_id       = 
 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					$lflags       = -lsocket -lnsl
 | 
				
			||||||
$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
					$bn_ops       = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = asm/bn86-elf.o asm/co86-elf.o
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = asm/dx86-elf.o asm/yx86-elf.o
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = asm/bx86-elf.o
 | 
				
			||||||
$md5_obj      = 
 | 
					$md5_obj      = asm/mx86-elf.o
 | 
				
			||||||
$sha1_obj     = 
 | 
					$sha1_obj     = asm/sx86-elf.o
 | 
				
			||||||
$cast_obj     = 
 | 
					$cast_obj     = asm/cx86-elf.o
 | 
				
			||||||
$rc4_obj      = 
 | 
					$rc4_obj      = asm/rx86-elf.o
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = asm/rm86-elf.o
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = asm/r586-elf.o
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = dlfcn
 | 
				
			||||||
$shared_target= gnu-shared
 | 
					$shared_target= gnu-shared
 | 
				
			||||||
$shared_cflag = -fPIC
 | 
					$shared_cflag = -fPIC
 | 
				
			||||||
@@ -4275,14 +4300,14 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
				
			|||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** unixware-7-pentium
 | 
					*** vxworks-mipsle
 | 
				
			||||||
$cc           = cc
 | 
					$cc           = ccmips
 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kalloca -Kpentium
 | 
					$cflags       = -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I$(WIND_BASE)/target/h
 | 
				
			||||||
$unistd       = 
 | 
					$unistd       = 
 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					$thread_cflag = 
 | 
				
			||||||
$sys_id       = 
 | 
					$sys_id       = VXWORKS
 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					$lflags       = -r
 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					$bn_ops       = 
 | 
				
			||||||
$bn_obj       = 
 | 
					$bn_obj       = 
 | 
				
			||||||
$des_obj      = 
 | 
					$des_obj      = 
 | 
				
			||||||
$bf_obj       = 
 | 
					$bf_obj       = 
 | 
				
			||||||
@@ -4292,37 +4317,12 @@ $cast_obj     =
 | 
				
			|||||||
$rc4_obj      = 
 | 
					$rc4_obj      = 
 | 
				
			||||||
$rmd160_obj   = 
 | 
					$rmd160_obj   = 
 | 
				
			||||||
$rc5_obj      = 
 | 
					$rc5_obj      = 
 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					$dso_scheme   = 
 | 
				
			||||||
$shared_target= svr5-shared
 | 
					$shared_target= 
 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					$shared_cflag = 
 | 
				
			||||||
$shared_ldflag = 
 | 
					$shared_ldflag = 
 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					$shared_extension = 
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = ranlibmips
 | 
				
			||||||
$arflags      = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*** unixware-7-pentium_pro
 | 
					 | 
				
			||||||
$cc           = cc
 | 
					 | 
				
			||||||
$cflags       = -O -DFILIO_H -Kalloca -Kpentium_pro
 | 
					 | 
				
			||||||
$unistd       = 
 | 
					 | 
				
			||||||
$thread_cflag = -Kthread
 | 
					 | 
				
			||||||
$sys_id       = 
 | 
					 | 
				
			||||||
$lflags       = -lsocket -lnsl
 | 
					 | 
				
			||||||
$bn_ops       = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
 | 
					 | 
				
			||||||
$bn_obj       = 
 | 
					 | 
				
			||||||
$des_obj      = 
 | 
					 | 
				
			||||||
$bf_obj       = 
 | 
					 | 
				
			||||||
$md5_obj      = 
 | 
					 | 
				
			||||||
$sha1_obj     = 
 | 
					 | 
				
			||||||
$cast_obj     = 
 | 
					 | 
				
			||||||
$rc4_obj      = 
 | 
					 | 
				
			||||||
$rmd160_obj   = 
 | 
					 | 
				
			||||||
$rc5_obj      = 
 | 
					 | 
				
			||||||
$dso_scheme   = dlfcn
 | 
					 | 
				
			||||||
$shared_target= svr5-shared
 | 
					 | 
				
			||||||
$shared_cflag = -Kpic
 | 
					 | 
				
			||||||
$shared_ldflag = 
 | 
					 | 
				
			||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
 | 
					 | 
				
			||||||
$ranlib       = 
 | 
					 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*** vxworks-ppc405
 | 
					*** vxworks-ppc405
 | 
				
			||||||
@@ -4399,3 +4399,28 @@ $shared_ldflag =
 | 
				
			|||||||
$shared_extension = 
 | 
					$shared_extension = 
 | 
				
			||||||
$ranlib       = 
 | 
					$ranlib       = 
 | 
				
			||||||
$arflags      = 
 | 
					$arflags      = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*** vxworks-ppc860
 | 
				
			||||||
 | 
					$cc           = ccppc
 | 
				
			||||||
 | 
					$cflags       = -nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I$(WIND_BASE)/target/h
 | 
				
			||||||
 | 
					$unistd       = 
 | 
				
			||||||
 | 
					$thread_cflag = 
 | 
				
			||||||
 | 
					$sys_id       = VXWORKS
 | 
				
			||||||
 | 
					$lflags       = -r
 | 
				
			||||||
 | 
					$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      = 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -285,7 +285,6 @@ $       if alg_entry .eqs. "" then goto loop2
 | 
				
			|||||||
$       if alg_entry .nes. ","
 | 
					$       if alg_entry .nes. ","
 | 
				
			||||||
$       then
 | 
					$       then
 | 
				
			||||||
$         if alg_entry .eqs. "KRB5" then goto loop ! Special for now
 | 
					$         if alg_entry .eqs. "KRB5" then goto loop ! Special for now
 | 
				
			||||||
$	  if alg_entry .eqs. "STATIC_ENGINE" then goto loop ! Special for now
 | 
					 | 
				
			||||||
$         if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop
 | 
					$         if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop
 | 
				
			||||||
$	  goto loop2
 | 
					$	  goto loop2
 | 
				
			||||||
$       endif
 | 
					$       endif
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										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
 | 
				
			||||||
@@ -82,9 +82,6 @@ foreach (@ARGV) {
 | 
				
			|||||||
		mkdir "${CATOP}/crl", $DIRMODE ;
 | 
							mkdir "${CATOP}/crl", $DIRMODE ;
 | 
				
			||||||
		mkdir "${CATOP}/newcerts", $DIRMODE;
 | 
							mkdir "${CATOP}/newcerts", $DIRMODE;
 | 
				
			||||||
		mkdir "${CATOP}/private", $DIRMODE;
 | 
							mkdir "${CATOP}/private", $DIRMODE;
 | 
				
			||||||
		open OUT, ">${CATOP}/serial";
 | 
					 | 
				
			||||||
		print OUT "01\n";
 | 
					 | 
				
			||||||
		close OUT;
 | 
					 | 
				
			||||||
		open OUT, ">${CATOP}/index.txt";
 | 
							open OUT, ">${CATOP}/index.txt";
 | 
				
			||||||
		close OUT;
 | 
							close OUT;
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
@@ -106,6 +103,10 @@ foreach (@ARGV) {
 | 
				
			|||||||
		    $RET=$?;
 | 
							    $RET=$?;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
 | 
						    if (! -f "${CATOP}/serial" ) {
 | 
				
			||||||
 | 
							system ("$X509 -in ${CATOP}/$CACERT -noout "
 | 
				
			||||||
 | 
								. "-next_serial -out ${CATOP}/serial");
 | 
				
			||||||
 | 
						    }
 | 
				
			||||||
	} elsif (/^-pkcs12$/) {
 | 
						} elsif (/^-pkcs12$/) {
 | 
				
			||||||
	    my $cname = $ARGV[1];
 | 
						    my $cname = $ARGV[1];
 | 
				
			||||||
	    $cname = "My Certificate" unless defined $cname;
 | 
						    $cname = "My Certificate" unless defined $cname;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1147
									
								
								apps/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1147
									
								
								apps/Makefile
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1255
									
								
								apps/Makefile.ssl
									
									
									
									
									
								
							
							
						
						
									
										1255
									
								
								apps/Makefile.ssl
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										693
									
								
								apps/apps.c
									
									
									
									
									
								
							
							
						
						
									
										693
									
								
								apps/apps.c
									
									
									
									
									
								
							@@ -122,26 +122,14 @@
 | 
				
			|||||||
#include <openssl/pkcs12.h>
 | 
					#include <openssl/pkcs12.h>
 | 
				
			||||||
#include <openssl/ui.h>
 | 
					#include <openssl/ui.h>
 | 
				
			||||||
#include <openssl/safestack.h>
 | 
					#include <openssl/safestack.h>
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
#include <openssl/engine.h>
 | 
					#include <openssl/engine.h>
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					 | 
				
			||||||
#define strcasecmp _stricmp
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#  ifdef NO_STRINGS_H
 | 
					 | 
				
			||||||
    int	strcasecmp();
 | 
					 | 
				
			||||||
#  else
 | 
					 | 
				
			||||||
#    include <strings.h>
 | 
					 | 
				
			||||||
#  endif /* NO_STRINGS_H */
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define NON_MAIN
 | 
					#define NON_MAIN
 | 
				
			||||||
#include "apps.h"
 | 
					#include "apps.h"
 | 
				
			||||||
#undef NON_MAIN
 | 
					#undef NON_MAIN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					 | 
				
			||||||
#  include "bss_file.c"
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
typedef struct {
 | 
					typedef struct {
 | 
				
			||||||
	char *name;
 | 
						char *name;
 | 
				
			||||||
	unsigned long flag;
 | 
						unsigned long flag;
 | 
				
			||||||
@@ -342,44 +330,6 @@ void program_name(char *in, char *out, int size)
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#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
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if((remove(to) != 0) && (errno != ENOENT))
 | 
					 | 
				
			||||||
		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
 | 
					#ifdef OPENSSL_SYS_VMS
 | 
				
			||||||
int VMS_strcasecmp(const char *str1, const char *str2)
 | 
					int VMS_strcasecmp(const char *str1, const char *str2)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -503,7 +453,7 @@ static int ui_read(UI *ui, UI_STRING *uis)
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
			const char *password =
 | 
								const char *password =
 | 
				
			||||||
				((PW_CB_DATA *)UI_get0_user_data(ui))->password;
 | 
									((PW_CB_DATA *)UI_get0_user_data(ui))->password;
 | 
				
			||||||
			if (password[0] != '\0')
 | 
								if (password && password[0] != '\0')
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				UI_set_result(ui, uis, password);
 | 
									UI_set_result(ui, uis, password);
 | 
				
			||||||
				return 1;
 | 
									return 1;
 | 
				
			||||||
@@ -527,7 +477,7 @@ static int ui_write(UI *ui, UI_STRING *uis)
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
			const char *password =
 | 
								const char *password =
 | 
				
			||||||
				((PW_CB_DATA *)UI_get0_user_data(ui))->password;
 | 
									((PW_CB_DATA *)UI_get0_user_data(ui))->password;
 | 
				
			||||||
			if (password[0] != '\0')
 | 
								if (password && password[0] != '\0')
 | 
				
			||||||
				return 1;
 | 
									return 1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
@@ -615,7 +565,7 @@ int password_callback(char *buf, int bufsiz, int verify,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (buff)
 | 
							if (buff)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			memset(buff,0,(unsigned int)bufsiz);
 | 
								OPENSSL_cleanse(buff,(unsigned int)bufsiz);
 | 
				
			||||||
			OPENSSL_free(buff);
 | 
								OPENSSL_free(buff);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -625,13 +575,13 @@ int password_callback(char *buf, int bufsiz, int verify,
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err, "User interface error\n");
 | 
								BIO_printf(bio_err, "User interface error\n");
 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
								ERR_print_errors(bio_err);
 | 
				
			||||||
			memset(buf,0,(unsigned int)bufsiz);
 | 
								OPENSSL_cleanse(buf,(unsigned int)bufsiz);
 | 
				
			||||||
			res = 0;
 | 
								res = 0;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		if (ok == -2)
 | 
							if (ok == -2)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err,"aborted!\n");
 | 
								BIO_printf(bio_err,"aborted!\n");
 | 
				
			||||||
			memset(buf,0,(unsigned int)bufsiz);
 | 
								OPENSSL_cleanse(buf,(unsigned int)bufsiz);
 | 
				
			||||||
			res = 0;
 | 
								res = 0;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		UI_free(ui);
 | 
							UI_free(ui);
 | 
				
			||||||
@@ -859,6 +809,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
 | 
				
			|||||||
		BIO_printf(err,"no keyfile specified\n");
 | 
							BIO_printf(err,"no keyfile specified\n");
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	if (format == FORMAT_ENGINE)
 | 
						if (format == FORMAT_ENGINE)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		if (!e)
 | 
							if (!e)
 | 
				
			||||||
@@ -868,6 +819,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
 | 
				
			|||||||
				ui_method, &cb_data);
 | 
									ui_method, &cb_data);
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	key=BIO_new(BIO_s_file());
 | 
						key=BIO_new(BIO_s_file());
 | 
				
			||||||
	if (key == NULL)
 | 
						if (key == NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -935,6 +887,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
				
			|||||||
		BIO_printf(err,"no keyfile specified\n");
 | 
							BIO_printf(err,"no keyfile specified\n");
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	if (format == FORMAT_ENGINE)
 | 
						if (format == FORMAT_ENGINE)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		if (!e)
 | 
							if (!e)
 | 
				
			||||||
@@ -944,6 +897,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
				
			|||||||
				ui_method, &cb_data);
 | 
									ui_method, &cb_data);
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	key=BIO_new(BIO_s_file());
 | 
						key=BIO_new(BIO_s_file());
 | 
				
			||||||
	if (key == NULL)
 | 
						if (key == NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -1329,6 +1283,7 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath)
 | 
				
			|||||||
	return NULL;
 | 
						return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
/* Try to load an engine in a shareable library */
 | 
					/* Try to load an engine in a shareable library */
 | 
				
			||||||
static ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
 | 
					static ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -1385,6 +1340,7 @@ ENGINE *setup_engine(BIO *err, const char *engine, int debug)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
        return e;
 | 
					        return e;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int load_config(BIO *err, CONF *cnf)
 | 
					int load_config(BIO *err, CONF *cnf)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -1407,14 +1363,631 @@ int load_config(BIO *err, CONF *cnf)
 | 
				
			|||||||
char *make_config_name()
 | 
					char *make_config_name()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	const char *t=X509_get_default_cert_area();
 | 
						const char *t=X509_get_default_cert_area();
 | 
				
			||||||
 | 
						size_t len;
 | 
				
			||||||
	char *p;
 | 
						char *p;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p=OPENSSL_malloc(strlen(t)+strlen(OPENSSL_CONF)+2);
 | 
						len=strlen(t)+strlen(OPENSSL_CONF)+2;
 | 
				
			||||||
	strcpy(p,t);
 | 
						p=OPENSSL_malloc(len);
 | 
				
			||||||
 | 
						BUF_strlcpy(p,t,len);
 | 
				
			||||||
#ifndef OPENSSL_SYS_VMS
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
	strcat(p,"/");
 | 
						BUF_strlcat(p,"/",len);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	strcat(p,OPENSSL_CONF);
 | 
						BUF_strlcat(p,OPENSSL_CONF,len);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return p;
 | 
						return p;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static unsigned long index_serial_hash(const char **a)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						const char *n;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						n=a[DB_serial];
 | 
				
			||||||
 | 
						while (*n == '0') n++;
 | 
				
			||||||
 | 
						return(lh_strhash(n));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int index_serial_cmp(const char **a, const char **b)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						const char *aa,*bb;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (aa=a[DB_serial]; *aa == '0'; aa++);
 | 
				
			||||||
 | 
						for (bb=b[DB_serial]; *bb == '0'; bb++);
 | 
				
			||||||
 | 
						return(strcmp(aa,bb));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int index_name_qual(char **a)
 | 
				
			||||||
 | 
						{ return(a[0][0] == 'V'); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static unsigned long index_name_hash(const char **a)
 | 
				
			||||||
 | 
						{ return(lh_strhash(a[DB_name])); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int index_name_cmp(const char **a, const char **b)
 | 
				
			||||||
 | 
						{ return(strcmp(a[DB_name],
 | 
				
			||||||
 | 
						     b[DB_name])); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static IMPLEMENT_LHASH_HASH_FN(index_serial_hash,const char **)
 | 
				
			||||||
 | 
					static IMPLEMENT_LHASH_COMP_FN(index_serial_cmp,const char **)
 | 
				
			||||||
 | 
					static IMPLEMENT_LHASH_HASH_FN(index_name_hash,const char **)
 | 
				
			||||||
 | 
					static IMPLEMENT_LHASH_COMP_FN(index_name_cmp,const char **)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#undef BSIZE
 | 
				
			||||||
 | 
					#define BSIZE 256
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						BIO *in=NULL;
 | 
				
			||||||
 | 
						BIGNUM *ret=NULL;
 | 
				
			||||||
 | 
						MS_STATIC char buf[1024];
 | 
				
			||||||
 | 
						ASN1_INTEGER *ai=NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ai=ASN1_INTEGER_new();
 | 
				
			||||||
 | 
						if (ai == NULL) goto err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if ((in=BIO_new(BIO_s_file())) == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (BIO_read_filename(in,serialfile) <= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (!create)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								perror(serialfile);
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								ret=BN_new();
 | 
				
			||||||
 | 
								if (ret == NULL || !rand_serial(ret, ai))
 | 
				
			||||||
 | 
									BIO_printf(bio_err, "Out of memory\n");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (!a2i_ASN1_INTEGER(in,ai,buf,1024))
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err,"unable to load number from %s\n",
 | 
				
			||||||
 | 
									serialfile);
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							ret=ASN1_INTEGER_to_BN(ai,NULL);
 | 
				
			||||||
 | 
							if (ret == NULL)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (ret && retai)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							*retai = ai;
 | 
				
			||||||
 | 
							ai = NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					 err:
 | 
				
			||||||
 | 
						if (in != NULL) BIO_free(in);
 | 
				
			||||||
 | 
						if (ai != NULL) ASN1_INTEGER_free(ai);
 | 
				
			||||||
 | 
						return(ret);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						char buf[1][BSIZE];
 | 
				
			||||||
 | 
						BIO *out = NULL;
 | 
				
			||||||
 | 
						int ret=0;
 | 
				
			||||||
 | 
						ASN1_INTEGER *ai=NULL;
 | 
				
			||||||
 | 
						int j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (suffix == NULL)
 | 
				
			||||||
 | 
							j = strlen(serialfile);
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							j = strlen(serialfile) + strlen(suffix) + 1;
 | 
				
			||||||
 | 
						if (j >= BSIZE)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"file name too long\n");
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (suffix == NULL)
 | 
				
			||||||
 | 
							BUF_strlcpy(buf[0], serialfile, BSIZE);
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
							j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
							j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", serialfile, suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						out=BIO_new(BIO_s_file());
 | 
				
			||||||
 | 
						if (out == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						if (BIO_write_filename(out,buf[0]) <= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							perror(serialfile);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if ((ai=BN_to_ASN1_INTEGER(serial,NULL)) == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"error converting serial to ASN.1 format\n");
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						i2a_ASN1_INTEGER(out,ai);
 | 
				
			||||||
 | 
						BIO_puts(out,"\n");
 | 
				
			||||||
 | 
						ret=1;
 | 
				
			||||||
 | 
						if (retai)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							*retai = ai;
 | 
				
			||||||
 | 
							ai = NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					err:
 | 
				
			||||||
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
 | 
						if (ai != NULL) ASN1_INTEGER_free(ai);
 | 
				
			||||||
 | 
						return(ret);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						char buf[5][BSIZE];
 | 
				
			||||||
 | 
						int i,j;
 | 
				
			||||||
 | 
						struct stat sb;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						i = strlen(serialfile) + strlen(old_suffix);
 | 
				
			||||||
 | 
						j = strlen(serialfile) + strlen(new_suffix);
 | 
				
			||||||
 | 
						if (i > j) j = i;
 | 
				
			||||||
 | 
						if (j + 1 >= BSIZE)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"file name too long\n");
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s",
 | 
				
			||||||
 | 
							serialfile, new_suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s",
 | 
				
			||||||
 | 
							serialfile, new_suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[1], sizeof buf[1], "%s.%s",
 | 
				
			||||||
 | 
							serialfile, old_suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[1], sizeof buf[1], "%s-%s",
 | 
				
			||||||
 | 
							serialfile, old_suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (stat(serialfile,&sb) < 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (errno != ENOENT 
 | 
				
			||||||
 | 
					#ifdef ENOTDIR
 | 
				
			||||||
 | 
								&& errno != ENOTDIR)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
							BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
 | 
				
			||||||
 | 
								serialfile, buf[1]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							if (rename(serialfile,buf[1]) < 0)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err,
 | 
				
			||||||
 | 
									"unable to rename %s to %s\n",
 | 
				
			||||||
 | 
									serialfile, buf[1]);
 | 
				
			||||||
 | 
								perror("reason");
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
 | 
				
			||||||
 | 
							buf[0],serialfile);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (rename(buf[0],serialfile) < 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,
 | 
				
			||||||
 | 
								"unable to rename %s to %s\n",
 | 
				
			||||||
 | 
								buf[0],serialfile);
 | 
				
			||||||
 | 
							perror("reason");
 | 
				
			||||||
 | 
							rename(buf[1],serialfile);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						return 1;
 | 
				
			||||||
 | 
					 err:
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int rand_serial(BIGNUM *b, ASN1_INTEGER *ai)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						BIGNUM *btmp;
 | 
				
			||||||
 | 
						int ret = 0;
 | 
				
			||||||
 | 
						if (b)
 | 
				
			||||||
 | 
							btmp = b;
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							btmp = BN_new();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!btmp)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!BN_pseudo_rand(btmp, SERIAL_RAND_BITS, 0, 0))
 | 
				
			||||||
 | 
							goto error;
 | 
				
			||||||
 | 
						if (ai && !BN_to_ASN1_INTEGER(btmp, ai))
 | 
				
			||||||
 | 
							goto error;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ret = 1;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						error:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!b)
 | 
				
			||||||
 | 
							BN_free(btmp);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						return ret;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CA_DB *load_index(char *dbfile, DB_ATTR *db_attr)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						CA_DB *retdb = NULL;
 | 
				
			||||||
 | 
						TXT_DB *tmpdb = NULL;
 | 
				
			||||||
 | 
						BIO *in = BIO_new(BIO_s_file());
 | 
				
			||||||
 | 
						CONF *dbattr_conf = NULL;
 | 
				
			||||||
 | 
						char buf[1][BSIZE];
 | 
				
			||||||
 | 
						long errorline= -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (in == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						if (BIO_read_filename(in,dbfile) <= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							perror(dbfile);
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						if ((tmpdb = TXT_DB_read(in,DB_NUMBER)) == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (tmpdb != NULL) TXT_DB_free(tmpdb);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						BIO_snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						BIO_snprintf(buf[0], sizeof buf[0], "%s-attr", dbfile);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						dbattr_conf = NCONF_new(NULL);
 | 
				
			||||||
 | 
						if (NCONF_load(dbattr_conf,buf[0],&errorline) <= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (errorline > 0)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err,
 | 
				
			||||||
 | 
									"error on line %ld of db attribute file '%s'\n"
 | 
				
			||||||
 | 
									,errorline,buf[0]);
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								NCONF_free(dbattr_conf);
 | 
				
			||||||
 | 
								dbattr_conf = NULL;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if ((retdb = OPENSSL_malloc(sizeof(CA_DB))) == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							fprintf(stderr, "Out of memory\n");
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						retdb->db = tmpdb;
 | 
				
			||||||
 | 
						tmpdb = NULL;
 | 
				
			||||||
 | 
						if (db_attr)
 | 
				
			||||||
 | 
							retdb->attributes = *db_attr;
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							retdb->attributes.unique_subject = 1;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (dbattr_conf)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							char *p = NCONF_get_string(dbattr_conf,NULL,"unique_subject");
 | 
				
			||||||
 | 
							if (p)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err, "DEBUG[load_index]: unique_subject = \"%s\"\n", p);
 | 
				
			||||||
 | 
								switch(*p)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
								case 'f': /* false */
 | 
				
			||||||
 | 
								case 'F': /* FALSE */
 | 
				
			||||||
 | 
								case 'n': /* no */
 | 
				
			||||||
 | 
								case 'N': /* NO */
 | 
				
			||||||
 | 
									retdb->attributes.unique_subject = 0;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case 't': /* true */
 | 
				
			||||||
 | 
								case 'T': /* TRUE */
 | 
				
			||||||
 | 
								case 'y': /* yes */
 | 
				
			||||||
 | 
								case 'Y': /* YES */
 | 
				
			||||||
 | 
								default:
 | 
				
			||||||
 | 
									retdb->attributes.unique_subject = 1;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 err:
 | 
				
			||||||
 | 
						if (dbattr_conf) NCONF_free(dbattr_conf);
 | 
				
			||||||
 | 
						if (tmpdb) TXT_DB_free(tmpdb);
 | 
				
			||||||
 | 
						if (in) BIO_free_all(in);
 | 
				
			||||||
 | 
						return retdb;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int index_index(CA_DB *db)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						if (!TXT_DB_create_index(db->db, DB_serial, NULL,
 | 
				
			||||||
 | 
									LHASH_HASH_FN(index_serial_hash),
 | 
				
			||||||
 | 
									LHASH_COMP_FN(index_serial_cmp)))
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,
 | 
				
			||||||
 | 
							  "error creating serial number index:(%ld,%ld,%ld)\n",
 | 
				
			||||||
 | 
							  			db->db->error,db->db->arg1,db->db->arg2);
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (db->attributes.unique_subject
 | 
				
			||||||
 | 
							&& !TXT_DB_create_index(db->db, DB_name, index_name_qual,
 | 
				
			||||||
 | 
								LHASH_HASH_FN(index_name_hash),
 | 
				
			||||||
 | 
								LHASH_COMP_FN(index_name_cmp)))
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"error creating name index:(%ld,%ld,%ld)\n",
 | 
				
			||||||
 | 
								db->db->error,db->db->arg1,db->db->arg2);
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						return 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int save_index(char *dbfile, char *suffix, CA_DB *db)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						char buf[3][BSIZE];
 | 
				
			||||||
 | 
						BIO *out = BIO_new(BIO_s_file());
 | 
				
			||||||
 | 
						int j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (out == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						j = strlen(dbfile) + strlen(suffix);
 | 
				
			||||||
 | 
						if (j + 6 >= BSIZE)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"file name too long\n");
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[2], sizeof buf[2], "%s-attr", dbfile);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[1], sizeof buf[1], "%s-attr-%s", dbfile, suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", dbfile, suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (BIO_write_filename(out,buf[0]) <= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							perror(dbfile);
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"unable to open '%s'\n", dbfile);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						j=TXT_DB_write(out,db->db);
 | 
				
			||||||
 | 
						if (j <= 0) goto err;
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
						BIO_free(out);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						out = BIO_new(BIO_s_file());
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[1]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (BIO_write_filename(out,buf[1]) <= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							perror(buf[2]);
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"unable to open '%s'\n", buf[2]);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						BIO_printf(out,"unique_subject = %s\n",
 | 
				
			||||||
 | 
							db->attributes.unique_subject ? "yes" : "no");
 | 
				
			||||||
 | 
						BIO_free(out);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 1;
 | 
				
			||||||
 | 
					 err:
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int rotate_index(char *dbfile, char *new_suffix, char *old_suffix)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						char buf[5][BSIZE];
 | 
				
			||||||
 | 
						int i,j;
 | 
				
			||||||
 | 
						struct stat sb;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						i = strlen(dbfile) + strlen(old_suffix);
 | 
				
			||||||
 | 
						j = strlen(dbfile) + strlen(new_suffix);
 | 
				
			||||||
 | 
						if (i > j) j = i;
 | 
				
			||||||
 | 
						if (j + 6 >= BSIZE)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,"file name too long\n");
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[4], sizeof buf[4], "%s-attr", dbfile);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[2], sizeof buf[2], "%s.attr.%s",
 | 
				
			||||||
 | 
							dbfile, new_suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[2], sizeof buf[2], "%s-attr-%s",
 | 
				
			||||||
 | 
							dbfile, new_suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s",
 | 
				
			||||||
 | 
							dbfile, new_suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s",
 | 
				
			||||||
 | 
							dbfile, new_suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[1], sizeof buf[1], "%s.%s",
 | 
				
			||||||
 | 
							dbfile, old_suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[1], sizeof buf[1], "%s-%s",
 | 
				
			||||||
 | 
							dbfile, old_suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_SYS_VMS
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[3], sizeof buf[3], "%s.attr.%s",
 | 
				
			||||||
 | 
							dbfile, old_suffix);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						j = BIO_snprintf(buf[3], sizeof buf[3], "%s-attr-%s",
 | 
				
			||||||
 | 
							dbfile, old_suffix);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (stat(dbfile,&sb) < 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (errno != ENOENT 
 | 
				
			||||||
 | 
					#ifdef ENOTDIR
 | 
				
			||||||
 | 
								&& errno != ENOTDIR)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
							BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
 | 
				
			||||||
 | 
								dbfile, buf[1]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							if (rename(dbfile,buf[1]) < 0)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err,
 | 
				
			||||||
 | 
									"unable to rename %s to %s\n",
 | 
				
			||||||
 | 
									dbfile, buf[1]);
 | 
				
			||||||
 | 
								perror("reason");
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
 | 
				
			||||||
 | 
							buf[0],dbfile);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (rename(buf[0],dbfile) < 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,
 | 
				
			||||||
 | 
								"unable to rename %s to %s\n",
 | 
				
			||||||
 | 
								buf[0],dbfile);
 | 
				
			||||||
 | 
							perror("reason");
 | 
				
			||||||
 | 
							rename(buf[1],dbfile);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						if (stat(buf[4],&sb) < 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (errno != ENOENT 
 | 
				
			||||||
 | 
					#ifdef ENOTDIR
 | 
				
			||||||
 | 
								&& errno != ENOTDIR)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
							BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
 | 
				
			||||||
 | 
								buf[4],buf[3]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							if (rename(buf[4],buf[3]) < 0)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								BIO_printf(bio_err,
 | 
				
			||||||
 | 
									"unable to rename %s to %s\n",
 | 
				
			||||||
 | 
									buf[4], buf[3]);
 | 
				
			||||||
 | 
								perror("reason");
 | 
				
			||||||
 | 
								rename(dbfile,buf[0]);
 | 
				
			||||||
 | 
								rename(buf[1],dbfile);
 | 
				
			||||||
 | 
								goto err;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#ifdef RL_DEBUG
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
 | 
				
			||||||
 | 
							buf[2],buf[4]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if (rename(buf[2],buf[4]) < 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err,
 | 
				
			||||||
 | 
								"unable to rename %s to %s\n",
 | 
				
			||||||
 | 
								buf[2],buf[4]);
 | 
				
			||||||
 | 
							perror("reason");
 | 
				
			||||||
 | 
							rename(buf[3],buf[4]);
 | 
				
			||||||
 | 
							rename(dbfile,buf[0]);
 | 
				
			||||||
 | 
							rename(buf[1],dbfile);
 | 
				
			||||||
 | 
							goto err;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						return 1;
 | 
				
			||||||
 | 
					 err:
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void free_index(CA_DB *db)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						if (db)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							if (db->db) TXT_DB_free(db->db);
 | 
				
			||||||
 | 
							OPENSSL_free(db);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* This code MUST COME AFTER anything that uses rename() */
 | 
				
			||||||
 | 
					#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
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						if((remove(to) != 0) && (errno != ENOENT))
 | 
				
			||||||
 | 
							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
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										111
									
								
								apps/apps.h
									
									
									
									
									
								
							
							
						
						
									
										111
									
								
								apps/apps.h
									
									
									
									
									
								
							@@ -121,7 +121,9 @@
 | 
				
			|||||||
#include <openssl/lhash.h>
 | 
					#include <openssl/lhash.h>
 | 
				
			||||||
#include <openssl/conf.h>
 | 
					#include <openssl/conf.h>
 | 
				
			||||||
#include <openssl/txt_db.h>
 | 
					#include <openssl/txt_db.h>
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
#include <openssl/engine.h>
 | 
					#include <openssl/engine.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#include <openssl/ossl_typ.h>
 | 
					#include <openssl/ossl_typ.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
 | 
					int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
 | 
				
			||||||
@@ -139,12 +141,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read,
 | 
				
			|||||||
int WIN32_rename(char *oldname,char *newname);
 | 
					int WIN32_rename(char *oldname,char *newname);
 | 
				
			||||||
#endif
 | 
					#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
 | 
					#ifndef MONOLITH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MAIN(a,v)	main(a,v)
 | 
					#define MAIN(a,v)	main(a,v)
 | 
				
			||||||
@@ -179,30 +175,57 @@ extern BIO *bio_err;
 | 
				
			|||||||
		do_pipe_sig()
 | 
							do_pipe_sig()
 | 
				
			||||||
#  define apps_shutdown()
 | 
					#  define apps_shutdown()
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#  if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
 | 
					#  ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
   defined(OPENSSL_SYS_WIN32)
 | 
					#    if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
 | 
				
			||||||
#    ifdef _O_BINARY
 | 
					     defined(OPENSSL_SYS_WIN32)
 | 
				
			||||||
#      define apps_startup() \
 | 
					#      ifdef _O_BINARY
 | 
				
			||||||
		do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
 | 
					#        define apps_startup() \
 | 
				
			||||||
		ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
 | 
								do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
 | 
				
			||||||
		ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 | 
								ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
 | 
				
			||||||
 | 
								ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 | 
				
			||||||
 | 
					#      else
 | 
				
			||||||
 | 
					#        define apps_startup() \
 | 
				
			||||||
 | 
								do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
 | 
				
			||||||
 | 
								ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
 | 
				
			||||||
 | 
								ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 | 
				
			||||||
 | 
					#      endif
 | 
				
			||||||
#    else
 | 
					#    else
 | 
				
			||||||
#      define apps_startup() \
 | 
					#      define apps_startup() \
 | 
				
			||||||
		do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
 | 
								do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
 | 
				
			||||||
		ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
 | 
								ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
 | 
				
			||||||
		ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 | 
								setup_ui_method(); } while(0)
 | 
				
			||||||
#    endif
 | 
					#    endif
 | 
				
			||||||
 | 
					#    define apps_shutdown() \
 | 
				
			||||||
 | 
								do { CONF_modules_unload(1); destroy_ui_method(); \
 | 
				
			||||||
 | 
								EVP_cleanup(); ENGINE_cleanup(); \
 | 
				
			||||||
 | 
								CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
 | 
				
			||||||
 | 
								ERR_free_strings(); } while(0)
 | 
				
			||||||
#  else
 | 
					#  else
 | 
				
			||||||
#    define apps_startup() \
 | 
					#    if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
 | 
				
			||||||
		do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
 | 
					     defined(OPENSSL_SYS_WIN32)
 | 
				
			||||||
		ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
 | 
					#      ifdef _O_BINARY
 | 
				
			||||||
		setup_ui_method(); } while(0)
 | 
					#        define apps_startup() \
 | 
				
			||||||
 | 
								do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
 | 
				
			||||||
 | 
								ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
 | 
				
			||||||
 | 
								setup_ui_method(); } while(0)
 | 
				
			||||||
 | 
					#      else
 | 
				
			||||||
 | 
					#        define apps_startup() \
 | 
				
			||||||
 | 
								do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
 | 
				
			||||||
 | 
								ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
 | 
				
			||||||
 | 
								setup_ui_method(); } while(0)
 | 
				
			||||||
 | 
					#      endif
 | 
				
			||||||
 | 
					#    else
 | 
				
			||||||
 | 
					#      define apps_startup() \
 | 
				
			||||||
 | 
								do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
 | 
				
			||||||
 | 
								ERR_load_crypto_strings(); \
 | 
				
			||||||
 | 
								setup_ui_method(); } while(0)
 | 
				
			||||||
 | 
					#    endif
 | 
				
			||||||
 | 
					#    define apps_shutdown() \
 | 
				
			||||||
 | 
								do { CONF_modules_unload(1); destroy_ui_method(); \
 | 
				
			||||||
 | 
								EVP_cleanup(); \
 | 
				
			||||||
 | 
								CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
 | 
				
			||||||
 | 
								ERR_free_strings(); } while(0)
 | 
				
			||||||
#  endif
 | 
					#  endif
 | 
				
			||||||
#  define apps_shutdown() \
 | 
					 | 
				
			||||||
		do { CONF_modules_unload(1); destroy_ui_method(); \
 | 
					 | 
				
			||||||
		EVP_cleanup(); ENGINE_cleanup(); \
 | 
					 | 
				
			||||||
		CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
 | 
					 | 
				
			||||||
		ERR_free_strings(); } while(0)
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct args_st
 | 
					typedef struct args_st
 | 
				
			||||||
@@ -248,7 +271,9 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
				
			|||||||
STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
 | 
					STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
 | 
				
			||||||
	const char *pass, ENGINE *e, const char *cert_descrip);
 | 
						const char *pass, ENGINE *e, const char *cert_descrip);
 | 
				
			||||||
X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
 | 
					X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
 | 
					ENGINE *setup_engine(BIO *err, const char *engine, int debug);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int load_config(BIO *err, CONF *cnf);
 | 
					int load_config(BIO *err, CONF *cnf);
 | 
				
			||||||
char *make_config_name(void);
 | 
					char *make_config_name(void);
 | 
				
			||||||
@@ -256,7 +281,39 @@ char *make_config_name(void);
 | 
				
			|||||||
/* Functions defined in ca.c and also used in ocsp.c */
 | 
					/* Functions defined in ca.c and also used in ocsp.c */
 | 
				
			||||||
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
 | 
					int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
 | 
				
			||||||
			ASN1_GENERALIZEDTIME **pinvtm, char *str);
 | 
								ASN1_GENERALIZEDTIME **pinvtm, char *str);
 | 
				
			||||||
int make_serial_index(TXT_DB *db);
 | 
					
 | 
				
			||||||
 | 
					#define DB_type         0
 | 
				
			||||||
 | 
					#define DB_exp_date     1
 | 
				
			||||||
 | 
					#define DB_rev_date     2
 | 
				
			||||||
 | 
					#define DB_serial       3       /* index - unique */
 | 
				
			||||||
 | 
					#define DB_file         4       
 | 
				
			||||||
 | 
					#define DB_name         5       /* index - unique when active and not disabled */
 | 
				
			||||||
 | 
					#define DB_NUMBER       6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define DB_TYPE_REV	'R'
 | 
				
			||||||
 | 
					#define DB_TYPE_EXP	'E'
 | 
				
			||||||
 | 
					#define DB_TYPE_VAL	'V'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct db_attr_st
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						int unique_subject;
 | 
				
			||||||
 | 
						} DB_ATTR;
 | 
				
			||||||
 | 
					typedef struct ca_db_st
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						DB_ATTR attributes;
 | 
				
			||||||
 | 
						TXT_DB *db;
 | 
				
			||||||
 | 
						} CA_DB;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai);
 | 
				
			||||||
 | 
					int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai);
 | 
				
			||||||
 | 
					int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix);
 | 
				
			||||||
 | 
					int rand_serial(BIGNUM *b, ASN1_INTEGER *ai);
 | 
				
			||||||
 | 
					CA_DB *load_index(char *dbfile, DB_ATTR *dbattr);
 | 
				
			||||||
 | 
					int index_index(CA_DB *db);
 | 
				
			||||||
 | 
					int save_index(char *dbfile, char *suffix, CA_DB *db);
 | 
				
			||||||
 | 
					int rotate_index(char *dbfile, char *new_suffix, char *old_suffix);
 | 
				
			||||||
 | 
					void free_index(CA_DB *db);
 | 
				
			||||||
 | 
					int index_name_cmp(const char **a, const char **b);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
X509_NAME *do_subject(char *str, long chtype);
 | 
					X509_NAME *do_subject(char *str, long chtype);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -279,4 +336,6 @@ X509_NAME *do_subject(char *str, long chtype);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define APP_PASS_LEN	1024
 | 
					#define APP_PASS_LEN	1024
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define SERIAL_RAND_BITS	64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										127
									
								
								apps/asn1pars.c
									
									
									
									
									
								
							
							
						
						
									
										127
									
								
								apps/asn1pars.c
									
									
									
									
									
								
							@@ -82,8 +82,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int, char **);
 | 
					int MAIN(int, char **);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	int i,badops=0,offset=0,ret=1,j;
 | 
						int i,badops=0,offset=0,ret=1,j;
 | 
				
			||||||
@@ -92,7 +90,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	BIO *in=NULL,*out=NULL,*b64=NULL, *derout = NULL;
 | 
						BIO *in=NULL,*out=NULL,*b64=NULL, *derout = NULL;
 | 
				
			||||||
	int informat,indent=0, noout = 0, dump = 0;
 | 
						int informat,indent=0, noout = 0, dump = 0;
 | 
				
			||||||
	char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL;
 | 
						char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL;
 | 
				
			||||||
	char *genstr=NULL, *genconf=NULL;
 | 
					 | 
				
			||||||
	unsigned char *tmpbuf;
 | 
						unsigned char *tmpbuf;
 | 
				
			||||||
	BUF_MEM *buf=NULL;
 | 
						BUF_MEM *buf=NULL;
 | 
				
			||||||
	STACK *osk=NULL;
 | 
						STACK *osk=NULL;
 | 
				
			||||||
@@ -170,16 +167,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			sk_push(osk,*(++argv));
 | 
								sk_push(osk,*(++argv));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		else if (strcmp(*argv,"-genstr") == 0)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
					 | 
				
			||||||
			genstr= *(++argv);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"-genconf") == 0)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
					 | 
				
			||||||
			genconf= *(++argv);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
								BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
				
			||||||
@@ -208,8 +195,6 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -strparse offset\n");
 | 
							BIO_printf(bio_err," -strparse offset\n");
 | 
				
			||||||
		BIO_printf(bio_err,"               a series of these can be used to 'dig' into multiple\n");
 | 
							BIO_printf(bio_err,"               a series of these can be used to 'dig' into multiple\n");
 | 
				
			||||||
		BIO_printf(bio_err,"               ASN1 blob wrappings\n");
 | 
							BIO_printf(bio_err,"               ASN1 blob wrappings\n");
 | 
				
			||||||
		BIO_printf(bio_err," -genstr str   string to generate ASN1 structure from\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err," -genconf file file to generate ASN1 structure from\n");
 | 
					 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -263,39 +248,25 @@ bad:
 | 
				
			|||||||
	if ((buf=BUF_MEM_new()) == NULL) goto end;
 | 
						if ((buf=BUF_MEM_new()) == NULL) goto end;
 | 
				
			||||||
	if (!BUF_MEM_grow(buf,BUFSIZ*8)) goto end; /* Pre-allocate :-) */
 | 
						if (!BUF_MEM_grow(buf,BUFSIZ*8)) goto end; /* Pre-allocate :-) */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (genstr || genconf)
 | 
						if (informat == FORMAT_PEM)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		num = do_generate(bio_err, genstr, genconf, buf);
 | 
							BIO *tmp;
 | 
				
			||||||
		if (num < 0)
 | 
					
 | 
				
			||||||
			{
 | 
							if ((b64=BIO_new(BIO_f_base64())) == NULL)
 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
			goto end;
 | 
								goto end;
 | 
				
			||||||
			}
 | 
							BIO_push(b64,in);
 | 
				
			||||||
 | 
							tmp=in;
 | 
				
			||||||
 | 
							in=b64;
 | 
				
			||||||
 | 
							b64=tmp;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	else
 | 
						num=0;
 | 
				
			||||||
 | 
						for (;;)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
							if (!BUF_MEM_grow(buf,(int)num+BUFSIZ)) goto end;
 | 
				
			||||||
		if (informat == FORMAT_PEM)
 | 
							i=BIO_read(in,&(buf->data[num]),BUFSIZ);
 | 
				
			||||||
			{
 | 
							if (i <= 0) break;
 | 
				
			||||||
			BIO *tmp;
 | 
							num+=i;
 | 
				
			||||||
 | 
					 | 
				
			||||||
			if ((b64=BIO_new(BIO_f_base64())) == NULL)
 | 
					 | 
				
			||||||
				goto end;
 | 
					 | 
				
			||||||
			BIO_push(b64,in);
 | 
					 | 
				
			||||||
			tmp=in;
 | 
					 | 
				
			||||||
			in=b64;
 | 
					 | 
				
			||||||
			b64=tmp;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		num=0;
 | 
					 | 
				
			||||||
		for (;;)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (!BUF_MEM_grow(buf,(int)num+BUFSIZ)) goto end;
 | 
					 | 
				
			||||||
			i=BIO_read(in,&(buf->data[num]),BUFSIZ);
 | 
					 | 
				
			||||||
			if (i <= 0) break;
 | 
					 | 
				
			||||||
			num+=i;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	str=buf->data;
 | 
						str=buf->data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -333,7 +304,15 @@ bad:
 | 
				
			|||||||
		num=tmplen;
 | 
							num=tmplen;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (length == 0) length=(unsigned int)num;
 | 
						if (offset >= num)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_err, "Error: offset too large\n");
 | 
				
			||||||
 | 
							goto end;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						num -= offset;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if ((length == 0) || ((long)length > num)) length=(unsigned int)num;
 | 
				
			||||||
	if(derout) {
 | 
						if(derout) {
 | 
				
			||||||
		if(BIO_write(derout, str + offset, length) != (int)length) {
 | 
							if(BIO_write(derout, str + offset, length) != (int)length) {
 | 
				
			||||||
			BIO_printf(bio_err, "Error writing output\n");
 | 
								BIO_printf(bio_err, "Error writing output\n");
 | 
				
			||||||
@@ -361,64 +340,6 @@ end:
 | 
				
			|||||||
	if (osk != NULL) sk_free(osk);
 | 
						if (osk != NULL) sk_free(osk);
 | 
				
			||||||
	OBJ_cleanup();
 | 
						OBJ_cleanup();
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	CONF *cnf = NULL;
 | 
					 | 
				
			||||||
	int len;
 | 
					 | 
				
			||||||
	long errline;
 | 
					 | 
				
			||||||
	unsigned char *p;
 | 
					 | 
				
			||||||
	ASN1_TYPE *atyp = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (genconf)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		cnf = NCONF_new(NULL);
 | 
					 | 
				
			||||||
		if (!NCONF_load(cnf, genconf, &errline))
 | 
					 | 
				
			||||||
			goto conferr;
 | 
					 | 
				
			||||||
		if (!genstr)
 | 
					 | 
				
			||||||
			genstr = NCONF_get_string(cnf, "default", "asn1");
 | 
					 | 
				
			||||||
		if (!genstr)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio, "Can't find 'asn1' in '%s'\n", genconf);
 | 
					 | 
				
			||||||
			goto err;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	atyp = ASN1_generate_nconf(genstr, cnf);
 | 
					 | 
				
			||||||
	NCONF_free(cnf);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!atyp)
 | 
					 | 
				
			||||||
		return -1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	len = i2d_ASN1_TYPE(atyp, NULL);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (len <= 0)
 | 
					 | 
				
			||||||
		goto err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!BUF_MEM_grow(buf,len))
 | 
					 | 
				
			||||||
		goto err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p=(unsigned char *)buf->data;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	i2d_ASN1_TYPE(atyp, &p);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ASN1_TYPE_free(atyp);
 | 
					 | 
				
			||||||
	return len;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	conferr:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (errline > 0)
 | 
					 | 
				
			||||||
		BIO_printf(bio, "Error on line %ld of config file '%s'\n",
 | 
					 | 
				
			||||||
							errline, genconf);
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		BIO_printf(bio, "Error loading config file '%s'\n", genconf);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err:
 | 
					 | 
				
			||||||
	NCONF_free(cnf);
 | 
					 | 
				
			||||||
	ASN1_TYPE_free(atyp);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return -1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -203,6 +203,6 @@ end:
 | 
				
			|||||||
	if (ssl != NULL) SSL_free(ssl);
 | 
						if (ssl != NULL) SSL_free(ssl);
 | 
				
			||||||
	if (STDout != NULL) BIO_free_all(STDout);
 | 
						if (STDout != NULL) BIO_free_all(STDout);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,6 +81,7 @@ static char *crl_usage[]={
 | 
				
			|||||||
" -in arg         - input file - default stdin\n",
 | 
					" -in arg         - input file - default stdin\n",
 | 
				
			||||||
" -out arg        - output file - default stdout\n",
 | 
					" -out arg        - output file - default stdout\n",
 | 
				
			||||||
" -hash           - print hash value\n",
 | 
					" -hash           - print hash value\n",
 | 
				
			||||||
 | 
					" -fingerprint    - print the crl fingerprint\n",
 | 
				
			||||||
" -issuer         - print issuer DN\n",
 | 
					" -issuer         - print issuer DN\n",
 | 
				
			||||||
" -lastupdate     - lastUpdate field\n",
 | 
					" -lastupdate     - lastUpdate field\n",
 | 
				
			||||||
" -nextupdate     - nextUpdate field\n",
 | 
					" -nextupdate     - nextUpdate field\n",
 | 
				
			||||||
@@ -377,7 +378,7 @@ end:
 | 
				
			|||||||
		X509_STORE_free(store);
 | 
							X509_STORE_free(store);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static X509_CRL *load_crl(char *infile, int format)
 | 
					static X509_CRL *load_crl(char *infile, int format)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -280,7 +280,7 @@ end:
 | 
				
			|||||||
	if (crl != NULL) X509_CRL_free(crl);
 | 
						if (crl != NULL) X509_CRL_free(crl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										63
									
								
								apps/dgst.c
									
									
									
									
									
								
							
							
						
						
									
										63
									
								
								apps/dgst.c
									
									
									
									
									
								
							@@ -66,6 +66,7 @@
 | 
				
			|||||||
#include <openssl/objects.h>
 | 
					#include <openssl/objects.h>
 | 
				
			||||||
#include <openssl/x509.h>
 | 
					#include <openssl/x509.h>
 | 
				
			||||||
#include <openssl/pem.h>
 | 
					#include <openssl/pem.h>
 | 
				
			||||||
 | 
					#include <openssl/hmac.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#undef BUFSIZE
 | 
					#undef BUFSIZE
 | 
				
			||||||
#define BUFSIZE	1024*8
 | 
					#define BUFSIZE	1024*8
 | 
				
			||||||
@@ -73,9 +74,11 @@
 | 
				
			|||||||
#undef PROG
 | 
					#undef PROG
 | 
				
			||||||
#define PROG	dgst_main
 | 
					#define PROG	dgst_main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static HMAC_CTX hmac_ctx;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
					int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
				
			||||||
	  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
						  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
				
			||||||
	  const char *file);
 | 
						  const char *file,BIO *bmd,const char *hmac_key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int MAIN(int, char **);
 | 
					int MAIN(int, char **);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -100,7 +103,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	EVP_PKEY *sigkey = NULL;
 | 
						EVP_PKEY *sigkey = NULL;
 | 
				
			||||||
	unsigned char *sigbuf = NULL;
 | 
						unsigned char *sigbuf = NULL;
 | 
				
			||||||
	int siglen = 0;
 | 
						int siglen = 0;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						char *hmac_key=NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -166,17 +172,25 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) break;
 | 
								if (--argc < 1) break;
 | 
				
			||||||
			keyform=str2fmt(*(++argv));
 | 
								keyform=str2fmt(*(++argv));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) break;
 | 
								if (--argc < 1) break;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-hex") == 0)
 | 
							else if (strcmp(*argv,"-hex") == 0)
 | 
				
			||||||
			out_bin = 0;
 | 
								out_bin = 0;
 | 
				
			||||||
		else if (strcmp(*argv,"-binary") == 0)
 | 
							else if (strcmp(*argv,"-binary") == 0)
 | 
				
			||||||
			out_bin = 1;
 | 
								out_bin = 1;
 | 
				
			||||||
		else if (strcmp(*argv,"-d") == 0)
 | 
							else if (strcmp(*argv,"-d") == 0)
 | 
				
			||||||
			debug=1;
 | 
								debug=1;
 | 
				
			||||||
 | 
							else if (!strcmp(*argv,"-hmac"))
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								if (--argc < 1)
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								hmac_key=*++argv;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
 | 
							else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
 | 
				
			||||||
			md=m;
 | 
								md=m;
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
@@ -208,7 +222,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf(bio_err,"-keyform arg    key file format (PEM or ENGINE)\n");
 | 
							BIO_printf(bio_err,"-keyform arg    key file format (PEM or ENGINE)\n");
 | 
				
			||||||
		BIO_printf(bio_err,"-signature file signature to verify\n");
 | 
							BIO_printf(bio_err,"-signature file signature to verify\n");
 | 
				
			||||||
		BIO_printf(bio_err,"-binary         output in binary form\n");
 | 
							BIO_printf(bio_err,"-binary         output in binary form\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
 | 
							BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
 | 
				
			||||||
			LN_md5,LN_md5);
 | 
								LN_md5,LN_md5);
 | 
				
			||||||
@@ -228,7 +244,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
 | 
						e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	in=BIO_new(BIO_s_file());
 | 
						in=BIO_new(BIO_s_file());
 | 
				
			||||||
	bmd=BIO_new(BIO_f_md());
 | 
						bmd=BIO_new(BIO_f_md());
 | 
				
			||||||
@@ -311,8 +329,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* we use md as a filter, reading from 'in' */
 | 
						/* we use md as a filter, reading from 'in' */
 | 
				
			||||||
	BIO_set_md(bmd,md);
 | 
						BIO_set_md(bmd,md);
 | 
				
			||||||
	inp=BIO_push(bmd,in);
 | 
						inp=BIO_push(bmd,in);
 | 
				
			||||||
@@ -321,7 +337,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
							BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
				
			||||||
		err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
 | 
							err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
 | 
				
			||||||
			  siglen,"","(stdin)");
 | 
								  siglen,"","(stdin)",bmd,hmac_key);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -339,13 +355,15 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			if(!out_bin)
 | 
								if(!out_bin)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				tmp=tofree=OPENSSL_malloc(strlen(name)+strlen(argv[i])+5);
 | 
									size_t len = strlen(name)+strlen(argv[i])+(hmac_key ? 5 : 0)+5;
 | 
				
			||||||
				sprintf(tmp,"%s(%s)= ",name,argv[i]);
 | 
									tmp=tofree=OPENSSL_malloc(len);
 | 
				
			||||||
 | 
									BIO_snprintf(tmp,len,"%s%s(%s)= ",
 | 
				
			||||||
 | 
												 hmac_key ? "HMAC-" : "",name,argv[i]);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				tmp="";
 | 
									tmp="";
 | 
				
			||||||
			r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
 | 
								r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
 | 
				
			||||||
				siglen,tmp,argv[i]);
 | 
									siglen,tmp,argv[i],bmd,hmac_key);
 | 
				
			||||||
			if(r)
 | 
								if(r)
 | 
				
			||||||
			    err=r;
 | 
								    err=r;
 | 
				
			||||||
			if(tofree)
 | 
								if(tofree)
 | 
				
			||||||
@@ -356,7 +374,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
end:
 | 
					end:
 | 
				
			||||||
	if (buf != NULL)
 | 
						if (buf != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		memset(buf,0,BUFSIZE);
 | 
							OPENSSL_cleanse(buf,BUFSIZE);
 | 
				
			||||||
		OPENSSL_free(buf);
 | 
							OPENSSL_free(buf);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if (in != NULL) BIO_free(in);
 | 
						if (in != NULL) BIO_free(in);
 | 
				
			||||||
@@ -365,16 +383,26 @@ end:
 | 
				
			|||||||
	if(sigbuf) OPENSSL_free(sigbuf);
 | 
						if(sigbuf) OPENSSL_free(sigbuf);
 | 
				
			||||||
	if (bmd != NULL) BIO_free(bmd);
 | 
						if (bmd != NULL) BIO_free(bmd);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(err);
 | 
						OPENSSL_EXIT(err);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
					int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
				
			||||||
	  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
						  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
				
			||||||
	  const char *file)
 | 
						  const char *file,BIO *bmd,const char *hmac_key)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	int len;
 | 
						unsigned int len;
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
 | 
						EVP_MD_CTX *md_ctx;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (hmac_key)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							EVP_MD *md;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							BIO_get_md(bmd,&md);
 | 
				
			||||||
 | 
							HMAC_Init(&hmac_ctx,hmac_key,strlen(hmac_key),md);
 | 
				
			||||||
 | 
							BIO_get_md_ctx(bmd,&md_ctx);
 | 
				
			||||||
 | 
							BIO_set_md_ctx(bmd,&hmac_ctx.md_ctx);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	for (;;)
 | 
						for (;;)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		i=BIO_read(bp,(char *)buf,BUFSIZE);
 | 
							i=BIO_read(bp,(char *)buf,BUFSIZE);
 | 
				
			||||||
@@ -417,6 +445,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
				
			|||||||
			return 1;
 | 
								return 1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						else if(hmac_key)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							HMAC_Final(&hmac_ctx,buf,&len);
 | 
				
			||||||
 | 
							HMAC_CTX_cleanup(&hmac_ctx);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		len=BIO_gets(bp,(char *)buf,BUFSIZE);
 | 
							len=BIO_gets(bp,(char *)buf,BUFSIZE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -424,7 +457,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
				
			|||||||
	else 
 | 
						else 
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		BIO_write(out,title,strlen(title));
 | 
							BIO_write(out,title,strlen(title));
 | 
				
			||||||
		for (i=0; i<len; i++)
 | 
							for (i=0; (unsigned int)i<len; i++)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (sep && (i != 0))
 | 
								if (sep && (i != 0))
 | 
				
			||||||
				BIO_printf(out, ":");
 | 
									BIO_printf(out, ":");
 | 
				
			||||||
@@ -432,6 +465,10 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		BIO_printf(out, "\n");
 | 
							BIO_printf(out, "\n");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						if (hmac_key)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_set_md_ctx(bmd,md_ctx);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										17
									
								
								apps/dh.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								apps/dh.c
									
									
									
									
									
								
							@@ -87,12 +87,17 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	DH *dh=NULL;
 | 
						DH *dh=NULL;
 | 
				
			||||||
	int i,badops=0,text=0;
 | 
						int i,badops=0,text=0;
 | 
				
			||||||
	BIO *in=NULL,*out=NULL;
 | 
						BIO *in=NULL,*out=NULL;
 | 
				
			||||||
	int informat,outformat,check=0,noout=0,C=0,ret=1;
 | 
						int informat,outformat,check=0,noout=0,C=0,ret=1;
 | 
				
			||||||
	char *infile,*outfile,*prog,*engine;
 | 
						char *infile,*outfile,*prog;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
 | 
						char *engine;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -103,7 +108,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	if (!load_config(bio_err, NULL))
 | 
						if (!load_config(bio_err, NULL))
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	engine=NULL;
 | 
						engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	infile=NULL;
 | 
						infile=NULL;
 | 
				
			||||||
	outfile=NULL;
 | 
						outfile=NULL;
 | 
				
			||||||
	informat=FORMAT_PEM;
 | 
						informat=FORMAT_PEM;
 | 
				
			||||||
@@ -134,11 +141,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			outfile= *(++argv);
 | 
								outfile= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-check") == 0)
 | 
							else if (strcmp(*argv,"-check") == 0)
 | 
				
			||||||
			check=1;
 | 
								check=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-text") == 0)
 | 
							else if (strcmp(*argv,"-text") == 0)
 | 
				
			||||||
@@ -170,13 +179,17 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -text         print a text form of the DH parameters\n");
 | 
							BIO_printf(bio_err," -text         print a text form of the DH parameters\n");
 | 
				
			||||||
		BIO_printf(bio_err," -C            Output C code\n");
 | 
							BIO_printf(bio_err," -C            Output C code\n");
 | 
				
			||||||
		BIO_printf(bio_err," -noout        no output\n");
 | 
							BIO_printf(bio_err," -noout        no output\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ERR_load_crypto_strings();
 | 
						ERR_load_crypto_strings();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	in=BIO_new(BIO_s_file());
 | 
						in=BIO_new(BIO_s_file());
 | 
				
			||||||
	out=BIO_new(BIO_s_file());
 | 
						out=BIO_new(BIO_s_file());
 | 
				
			||||||
@@ -333,6 +346,6 @@ end:
 | 
				
			|||||||
	if (out != NULL) BIO_free_all(out);
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
	if (dh != NULL) DH_free(dh);
 | 
						if (dh != NULL) DH_free(dh);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -148,7 +148,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	DH *dh=NULL;
 | 
						DH *dh=NULL;
 | 
				
			||||||
	int i,badops=0,text=0;
 | 
						int i,badops=0,text=0;
 | 
				
			||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
@@ -157,7 +159,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	BIO *in=NULL,*out=NULL;
 | 
						BIO *in=NULL,*out=NULL;
 | 
				
			||||||
	int informat,outformat,check=0,noout=0,C=0,ret=1;
 | 
						int informat,outformat,check=0,noout=0,C=0,ret=1;
 | 
				
			||||||
	char *infile,*outfile,*prog;
 | 
						char *infile,*outfile,*prog;
 | 
				
			||||||
	char *inrand=NULL,*engine=NULL;
 | 
						char *inrand=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	int num = 0, g = 0;
 | 
						int num = 0, g = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
@@ -199,11 +204,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			outfile= *(++argv);
 | 
								outfile= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-check") == 0)
 | 
							else if (strcmp(*argv,"-check") == 0)
 | 
				
			||||||
			check=1;
 | 
								check=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-text") == 0)
 | 
							else if (strcmp(*argv,"-text") == 0)
 | 
				
			||||||
@@ -249,7 +256,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -2            generate parameters using  2 as the generator value\n");
 | 
							BIO_printf(bio_err," -2            generate parameters using  2 as the generator value\n");
 | 
				
			||||||
		BIO_printf(bio_err," -5            generate parameters using  5 as the generator value\n");
 | 
							BIO_printf(bio_err," -5            generate parameters using  5 as the generator value\n");
 | 
				
			||||||
		BIO_printf(bio_err," numbits       number of bits in to generate (default 512)\n");
 | 
							BIO_printf(bio_err," numbits       number of bits in to generate (default 512)\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
							BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
		BIO_printf(bio_err,"               - load the file (or the files in the directory) into\n");
 | 
							BIO_printf(bio_err,"               - load the file (or the files in the directory) into\n");
 | 
				
			||||||
		BIO_printf(bio_err,"               the random number generator\n");
 | 
							BIO_printf(bio_err,"               the random number generator\n");
 | 
				
			||||||
@@ -259,7 +268,9 @@ bad:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	ERR_load_crypto_strings();
 | 
						ERR_load_crypto_strings();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (g && !num)
 | 
						if (g && !num)
 | 
				
			||||||
		num = DEFBITS;
 | 
							num = DEFBITS;
 | 
				
			||||||
@@ -519,7 +530,7 @@ end:
 | 
				
			|||||||
	if (out != NULL) BIO_free_all(out);
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
	if (dh != NULL) DH_free(dh);
 | 
						if (dh != NULL) DH_free(dh);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
 | 
					/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										17
									
								
								apps/dsa.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								apps/dsa.c
									
									
									
									
									
								
							@@ -90,7 +90,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	int ret=1;
 | 
						int ret=1;
 | 
				
			||||||
	DSA *dsa=NULL;
 | 
						DSA *dsa=NULL;
 | 
				
			||||||
	int i,badops=0;
 | 
						int i,badops=0;
 | 
				
			||||||
@@ -98,7 +100,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	BIO *in=NULL,*out=NULL;
 | 
						BIO *in=NULL,*out=NULL;
 | 
				
			||||||
	int informat,outformat,text=0,noout=0;
 | 
						int informat,outformat,text=0,noout=0;
 | 
				
			||||||
	int pubin = 0, pubout = 0;
 | 
						int pubin = 0, pubout = 0;
 | 
				
			||||||
	char *infile,*outfile,*prog,*engine;
 | 
						char *infile,*outfile,*prog;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
 | 
						char *engine;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	char *passargin = NULL, *passargout = NULL;
 | 
						char *passargin = NULL, *passargout = NULL;
 | 
				
			||||||
	char *passin = NULL, *passout = NULL;
 | 
						char *passin = NULL, *passout = NULL;
 | 
				
			||||||
	int modulus=0;
 | 
						int modulus=0;
 | 
				
			||||||
@@ -112,7 +117,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	if (!load_config(bio_err, NULL))
 | 
						if (!load_config(bio_err, NULL))
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	engine=NULL;
 | 
						engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	infile=NULL;
 | 
						infile=NULL;
 | 
				
			||||||
	outfile=NULL;
 | 
						outfile=NULL;
 | 
				
			||||||
	informat=FORMAT_PEM;
 | 
						informat=FORMAT_PEM;
 | 
				
			||||||
@@ -153,11 +160,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			passargout= *(++argv);
 | 
								passargout= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-noout") == 0)
 | 
							else if (strcmp(*argv,"-noout") == 0)
 | 
				
			||||||
			noout=1;
 | 
								noout=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-text") == 0)
 | 
							else if (strcmp(*argv,"-text") == 0)
 | 
				
			||||||
@@ -189,7 +198,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -passin arg     input file pass phrase source\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," -out arg        output file\n");
 | 
				
			||||||
		BIO_printf(bio_err," -passout arg    output file pass phrase source\n");
 | 
							BIO_printf(bio_err," -passout arg    output file pass phrase source\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," -des            encrypt PEM output with cbc des\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");
 | 
							BIO_printf(bio_err," -des3           encrypt PEM output with ede cbc des using 168 bit key\n");
 | 
				
			||||||
#ifndef OPENSSL_NO_IDEA
 | 
					#ifndef OPENSSL_NO_IDEA
 | 
				
			||||||
@@ -207,7 +218,9 @@ bad:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	ERR_load_crypto_strings();
 | 
						ERR_load_crypto_strings();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
						if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
							BIO_printf(bio_err, "Error getting passwords\n");
 | 
				
			||||||
@@ -314,6 +327,6 @@ end:
 | 
				
			|||||||
	if(passin) OPENSSL_free(passin);
 | 
						if(passin) OPENSSL_free(passin);
 | 
				
			||||||
	if(passout) OPENSSL_free(passout);
 | 
						if(passout) OPENSSL_free(passout);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -90,7 +90,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	DSA *dsa=NULL;
 | 
						DSA *dsa=NULL;
 | 
				
			||||||
	int i,badops=0,text=0;
 | 
						int i,badops=0,text=0;
 | 
				
			||||||
	BIO *in=NULL,*out=NULL;
 | 
						BIO *in=NULL,*out=NULL;
 | 
				
			||||||
@@ -98,7 +100,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	char *infile,*outfile,*prog,*inrand=NULL;
 | 
						char *infile,*outfile,*prog,*inrand=NULL;
 | 
				
			||||||
	int numbits= -1,num,genkey=0;
 | 
						int numbits= -1,num,genkey=0;
 | 
				
			||||||
	int need_rand=0;
 | 
						int need_rand=0;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -139,11 +143,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			outfile= *(++argv);
 | 
								outfile= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if(strcmp(*argv, "-engine") == 0)
 | 
							else if(strcmp(*argv, "-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine = *(++argv);
 | 
								engine = *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-text") == 0)
 | 
							else if (strcmp(*argv,"-text") == 0)
 | 
				
			||||||
			text=1;
 | 
								text=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-C") == 0)
 | 
							else if (strcmp(*argv,"-C") == 0)
 | 
				
			||||||
@@ -191,7 +197,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -noout        no output\n");
 | 
							BIO_printf(bio_err," -noout        no output\n");
 | 
				
			||||||
		BIO_printf(bio_err," -genkey       generate a DSA key\n");
 | 
							BIO_printf(bio_err," -genkey       generate a DSA key\n");
 | 
				
			||||||
		BIO_printf(bio_err," -rand         files to use for random number input\n");
 | 
							BIO_printf(bio_err," -rand         files to use for random number input\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," number        number of bits to use for generating private key\n");
 | 
							BIO_printf(bio_err," number        number of bits to use for generating private key\n");
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -235,7 +243,9 @@ bad:
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (need_rand)
 | 
						if (need_rand)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -372,7 +382,7 @@ end:
 | 
				
			|||||||
	if (out != NULL) BIO_free_all(out);
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
	if (dsa != NULL) DSA_free(dsa);
 | 
						if (dsa != NULL) DSA_free(dsa);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
 | 
					static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										395
									
								
								apps/ec.c
									
									
									
									
									
								
							
							
						
						
									
										395
									
								
								apps/ec.c
									
									
									
									
									
								
							@@ -1,395 +0,0 @@
 | 
				
			|||||||
/* apps/ec.c */
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Written by Nils Larsch for the OpenSSL project.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
/* ====================================================================
 | 
					 | 
				
			||||||
 * 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_EC
 | 
					 | 
				
			||||||
#include <stdio.h>
 | 
					 | 
				
			||||||
#include <stdlib.h>
 | 
					 | 
				
			||||||
#include <string.h>
 | 
					 | 
				
			||||||
#include "apps.h"
 | 
					 | 
				
			||||||
#include <openssl/bio.h>
 | 
					 | 
				
			||||||
#include <openssl/err.h>
 | 
					 | 
				
			||||||
#include <openssl/evp.h>
 | 
					 | 
				
			||||||
#include <openssl/pem.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#undef PROG
 | 
					 | 
				
			||||||
#define PROG	ec_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
 | 
					 | 
				
			||||||
 * -text          - print a text version
 | 
					 | 
				
			||||||
 * -param_out     - print the elliptic curve parameters
 | 
					 | 
				
			||||||
 * -conv_form arg - specifies the point encoding form
 | 
					 | 
				
			||||||
 * -param_enc arg - specifies the parameter encoding
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int MAIN(int, char **);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	ENGINE 	*e = NULL;
 | 
					 | 
				
			||||||
	int 	ret = 1;
 | 
					 | 
				
			||||||
	EC_KEY 	*eckey = 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, param_out = 0;
 | 
					 | 
				
			||||||
	char 	*infile, *outfile, *prog, *engine;
 | 
					 | 
				
			||||||
	char 	*passargin = NULL, *passargout = NULL;
 | 
					 | 
				
			||||||
	char 	*passin = NULL, *passout = 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;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	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, "-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, "-param_out") == 0)
 | 
					 | 
				
			||||||
			param_out = 1;
 | 
					 | 
				
			||||||
		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, "
 | 
					 | 
				
			||||||
				"instead of 'des' every other \n"
 | 
					 | 
				
			||||||
				"                 cipher "
 | 
					 | 
				
			||||||
				"supported by OpenSSL can be used\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, " -text           print the key\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, " -noout          don't print key out\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, " -param_out      print the elliptic "
 | 
					 | 
				
			||||||
				"curve parameters\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");
 | 
					 | 
				
			||||||
		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 EC key\n");
 | 
					 | 
				
			||||||
	if (informat == FORMAT_ASN1) 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (pubin) 
 | 
					 | 
				
			||||||
			eckey = d2i_EC_PUBKEY_bio(in, NULL);
 | 
					 | 
				
			||||||
		else 
 | 
					 | 
				
			||||||
			eckey = d2i_ECPrivateKey_bio(in, NULL);
 | 
					 | 
				
			||||||
		} 
 | 
					 | 
				
			||||||
	else if (informat == FORMAT_PEM) 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (pubin) 
 | 
					 | 
				
			||||||
			eckey = PEM_read_bio_EC_PUBKEY(in, NULL, NULL, 
 | 
					 | 
				
			||||||
				NULL);
 | 
					 | 
				
			||||||
		else 
 | 
					 | 
				
			||||||
			eckey = PEM_read_bio_ECPrivateKey(in, NULL, NULL,
 | 
					 | 
				
			||||||
				passin);
 | 
					 | 
				
			||||||
		} 
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, "bad input format specified for key\n");
 | 
					 | 
				
			||||||
		goto end;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	if (eckey == 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 (new_form)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		EC_GROUP_set_point_conversion_form(eckey->group, form);
 | 
					 | 
				
			||||||
		eckey->conv_form = form;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (new_asn1_flag)
 | 
					 | 
				
			||||||
		EC_GROUP_set_asn1_flag(eckey->group, asn1_flag);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (text) 
 | 
					 | 
				
			||||||
		if (!EC_KEY_print(out, eckey, 0))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			perror(outfile);
 | 
					 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (noout) 
 | 
					 | 
				
			||||||
		goto end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	BIO_printf(bio_err, "writing EC key\n");
 | 
					 | 
				
			||||||
	if (outformat == FORMAT_ASN1) 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (param_out)
 | 
					 | 
				
			||||||
			i = i2d_ECPKParameters_bio(out, eckey->group);
 | 
					 | 
				
			||||||
		else if (pubin || pubout) 
 | 
					 | 
				
			||||||
			i = i2d_EC_PUBKEY_bio(out, eckey);
 | 
					 | 
				
			||||||
		else 
 | 
					 | 
				
			||||||
			i = i2d_ECPrivateKey_bio(out, eckey);
 | 
					 | 
				
			||||||
		} 
 | 
					 | 
				
			||||||
	else if (outformat == FORMAT_PEM) 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (param_out)
 | 
					 | 
				
			||||||
			i = PEM_write_bio_ECPKParameters(out, eckey->group);
 | 
					 | 
				
			||||||
		else if (pubin || pubout)
 | 
					 | 
				
			||||||
			i = PEM_write_bio_EC_PUBKEY(out, eckey);
 | 
					 | 
				
			||||||
		else 
 | 
					 | 
				
			||||||
			i = PEM_write_bio_ECPrivateKey(out, eckey, 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 (eckey)
 | 
					 | 
				
			||||||
		EC_KEY_free(eckey);
 | 
					 | 
				
			||||||
	if (passin)
 | 
					 | 
				
			||||||
		OPENSSL_free(passin);
 | 
					 | 
				
			||||||
	if (passout)
 | 
					 | 
				
			||||||
		OPENSSL_free(passout);
 | 
					 | 
				
			||||||
	apps_shutdown();
 | 
					 | 
				
			||||||
	EXIT(ret);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
							
								
								
									
										709
									
								
								apps/ecparam.c
									
									
									
									
									
								
							
							
						
						
									
										709
									
								
								apps/ecparam.c
									
									
									
									
									
								
							@@ -1,709 +0,0 @@
 | 
				
			|||||||
/* apps/ecparam.c */
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Written by Nils Larsch for the OpenSSL project.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
/* ====================================================================
 | 
					 | 
				
			||||||
 * 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 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Portions of the attached software ("Contribution") are developed by 
 | 
					 | 
				
			||||||
 * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The Contribution is licensed pursuant to the OpenSSL open source
 | 
					 | 
				
			||||||
 * license provided above.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The elliptic curve binary polynomial software is originally written by 
 | 
					 | 
				
			||||||
 * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_EC
 | 
					 | 
				
			||||||
#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/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           - do not print the ec parameter
 | 
					 | 
				
			||||||
 * -text            - print the ec parameters in text form
 | 
					 | 
				
			||||||
 * -check           - validate the ec parameters
 | 
					 | 
				
			||||||
 * -C               - print a 'C' function creating the parameters
 | 
					 | 
				
			||||||
 * -name arg        - use the ec parameters with 'short name' name
 | 
					 | 
				
			||||||
 * -list_curves     - prints a list of all currently available curve 'short names'
 | 
					 | 
				
			||||||
 * -conv_form arg   - specifies the point conversion form 
 | 
					 | 
				
			||||||
 *                  - possible values: compressed
 | 
					 | 
				
			||||||
 *                                     uncompressed (default)
 | 
					 | 
				
			||||||
 *                                     hybrid
 | 
					 | 
				
			||||||
 * -param_enc arg   - specifies the way the ec parameters are encoded
 | 
					 | 
				
			||||||
 *                    in the asn1 der encoding
 | 
					 | 
				
			||||||
 *                    possible values: named_curve (default)
 | 
					 | 
				
			||||||
 *                                     explicit
 | 
					 | 
				
			||||||
 * -no_seed         - if 'explicit' parameters are choosen do not use the seed
 | 
					 | 
				
			||||||
 * -genkey          - generate ec key
 | 
					 | 
				
			||||||
 * -rand file       - files to use for random number input
 | 
					 | 
				
			||||||
 * -engine e        - use engine e, possibly a hardware device
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
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 '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, "                   possible values:"
 | 
					 | 
				
			||||||
				" named_curve (default)\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, "                                   "
 | 
					 | 
				
			||||||
				" explicit\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, " -no_seed          if 'explicit'"
 | 
					 | 
				
			||||||
				" parameters are choosen do not"
 | 
					 | 
				
			||||||
				" use the seed\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, " -genkey           generate ec"
 | 
					 | 
				
			||||||
				" 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, "
 | 
					 | 
				
			||||||
				"possibly 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)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		EC_builtin_curve *curves = NULL;
 | 
					 | 
				
			||||||
		size_t crv_len = 0;
 | 
					 | 
				
			||||||
		size_t n = 0;
 | 
					 | 
				
			||||||
		size_t len;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		crv_len = EC_get_builtin_curves(NULL, 0);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		curves = OPENSSL_malloc(sizeof(EC_builtin_curve) * crv_len);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (curves == NULL)
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (!EC_get_builtin_curves(curves, crv_len))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			OPENSSL_free(curves);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		for (n = 0; n < crv_len; n++)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			const char *comment;
 | 
					 | 
				
			||||||
			const char *sname;
 | 
					 | 
				
			||||||
			comment = curves[n].comment;
 | 
					 | 
				
			||||||
			sname   = OBJ_nid2sn(curves[n].nid);
 | 
					 | 
				
			||||||
			if (comment == NULL)
 | 
					 | 
				
			||||||
				comment = "CURVE DESCRIPTION NOT AVAILABLE";
 | 
					 | 
				
			||||||
			if (sname == NULL)
 | 
					 | 
				
			||||||
				sname = "";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			len = BIO_printf(out, "  %-10s: ", sname);
 | 
					 | 
				
			||||||
			if (len + strlen(comment) > 80)
 | 
					 | 
				
			||||||
				BIO_printf(out, "\n%80s\n", comment);
 | 
					 | 
				
			||||||
			else
 | 
					 | 
				
			||||||
				BIO_printf(out, "%s\n", comment);
 | 
					 | 
				
			||||||
			} 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		OPENSSL_free(curves);
 | 
					 | 
				
			||||||
		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)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		EC_KEY *eckey = EC_KEY_new();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (eckey == NULL)
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		assert(need_rand);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		eckey->group = group;
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		if (!EC_KEY_generate_key(eckey))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			eckey->group = NULL;
 | 
					 | 
				
			||||||
			EC_KEY_free(eckey);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (outformat == FORMAT_ASN1)
 | 
					 | 
				
			||||||
			i = i2d_ECPrivateKey_bio(out, eckey);
 | 
					 | 
				
			||||||
		else if (outformat == FORMAT_PEM)
 | 
					 | 
				
			||||||
			i = PEM_write_bio_ECPrivateKey(out, eckey, NULL,
 | 
					 | 
				
			||||||
				NULL, 0, NULL, NULL);
 | 
					 | 
				
			||||||
		else	
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_err, "bad output format specified "
 | 
					 | 
				
			||||||
				"for outfile\n");
 | 
					 | 
				
			||||||
			eckey->group = NULL;
 | 
					 | 
				
			||||||
			EC_KEY_free(eckey);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		eckey->group = NULL;
 | 
					 | 
				
			||||||
		EC_KEY_free(eckey);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	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
									
									
									
									
									
								
							@@ -100,7 +100,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	static const char magic[]="Salted__";
 | 
						static const char magic[]="Salted__";
 | 
				
			||||||
	char mbuf[sizeof magic-1];
 | 
						char mbuf[sizeof magic-1];
 | 
				
			||||||
	char *strbuf=NULL;
 | 
						char *strbuf=NULL;
 | 
				
			||||||
@@ -119,7 +121,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
 | 
						BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
 | 
				
			||||||
#define PROG_NAME_SIZE  39
 | 
					#define PROG_NAME_SIZE  39
 | 
				
			||||||
	char pname[PROG_NAME_SIZE+1];
 | 
						char pname[PROG_NAME_SIZE+1];
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine = NULL;
 | 
						char *engine = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -163,11 +167,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			passarg= *(++argv);
 | 
								passarg= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if	(strcmp(*argv,"-d") == 0)
 | 
							else if	(strcmp(*argv,"-d") == 0)
 | 
				
			||||||
			enc=0;
 | 
								enc=0;
 | 
				
			||||||
		else if	(strcmp(*argv,"-p") == 0)
 | 
							else if	(strcmp(*argv,"-p") == 0)
 | 
				
			||||||
@@ -270,7 +276,9 @@ bad:
 | 
				
			|||||||
			BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
 | 
								BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
 | 
				
			||||||
			BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
 | 
								BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
 | 
				
			||||||
			BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
 | 
								BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
			BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
 | 
								BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			BIO_printf(bio_err,"Cipher Types\n");
 | 
								BIO_printf(bio_err,"Cipher Types\n");
 | 
				
			||||||
			OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
 | 
								OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
 | 
				
			||||||
@@ -284,7 +292,9 @@ bad:
 | 
				
			|||||||
		argv++;
 | 
							argv++;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (bufsize != NULL)
 | 
						if (bufsize != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -363,9 +373,9 @@ bad:
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
			char buf[200];
 | 
								char buf[200];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			sprintf(buf,"enter %s %s password:",
 | 
								BIO_snprintf(buf,sizeof buf,"enter %s %s password:",
 | 
				
			||||||
				OBJ_nid2ln(EVP_CIPHER_nid(cipher)),
 | 
									     OBJ_nid2ln(EVP_CIPHER_nid(cipher)),
 | 
				
			||||||
				(enc)?"encryption":"decryption");
 | 
									     (enc)?"encryption":"decryption");
 | 
				
			||||||
			strbuf[0]='\0';
 | 
								strbuf[0]='\0';
 | 
				
			||||||
			i=EVP_read_pw_string((char *)strbuf,SIZE,buf,enc);
 | 
								i=EVP_read_pw_string((char *)strbuf,SIZE,buf,enc);
 | 
				
			||||||
			if (i == 0)
 | 
								if (i == 0)
 | 
				
			||||||
@@ -481,9 +491,9 @@ bad:
 | 
				
			|||||||
			 * bug picked up by
 | 
								 * bug picked up by
 | 
				
			||||||
			 * Larry J. Hughes Jr. <hughes@indiana.edu> */
 | 
								 * Larry J. Hughes Jr. <hughes@indiana.edu> */
 | 
				
			||||||
			if (str == strbuf)
 | 
								if (str == strbuf)
 | 
				
			||||||
				memset(str,0,SIZE);
 | 
									OPENSSL_cleanse(str,SIZE);
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				memset(str,0,strlen(str));
 | 
									OPENSSL_cleanse(str,strlen(str));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
 | 
							if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -586,7 +596,7 @@ end:
 | 
				
			|||||||
	if (b64 != NULL) BIO_free(b64);
 | 
						if (b64 != NULL) BIO_free(b64);
 | 
				
			||||||
	if(pass) OPENSSL_free(pass);
 | 
						if(pass) OPENSSL_free(pass);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int set_hex(char *in, unsigned char *out, int size)
 | 
					int set_hex(char *in, unsigned char *out, int size)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,6 +56,8 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
@@ -120,8 +122,8 @@ static int append_buf(char **buf, const char *s, int *size, int step)
 | 
				
			|||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (**buf != '\0')
 | 
						if (**buf != '\0')
 | 
				
			||||||
		strcat(*buf, ", ");
 | 
							BUF_strlcat(*buf, ", ", *size);
 | 
				
			||||||
	strcat(*buf, s);
 | 
						BUF_strlcat(*buf, s, *size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 1;
 | 
						return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -516,5 +518,12 @@ end:
 | 
				
			|||||||
	sk_pop_free(post_cmds, identity);
 | 
						sk_pop_free(post_cmds, identity);
 | 
				
			||||||
	if (bio_out != NULL) BIO_free_all(bio_out);
 | 
						if (bio_out != NULL) BIO_free_all(bio_out);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# if PEDANTIC
 | 
				
			||||||
 | 
					static void *dummy=&dummy;
 | 
				
			||||||
 | 
					# endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -122,5 +122,5 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								apps/gendh.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/gendh.c
									
									
									
									
									
								
							@@ -81,13 +81,17 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	DH *dh=NULL;
 | 
						DH *dh=NULL;
 | 
				
			||||||
	int ret=1,num=DEFBITS;
 | 
						int ret=1,num=DEFBITS;
 | 
				
			||||||
	int g=2;
 | 
						int g=2;
 | 
				
			||||||
	char *outfile=NULL;
 | 
						char *outfile=NULL;
 | 
				
			||||||
	char *inrand=NULL;
 | 
						char *inrand=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	BIO *out=NULL;
 | 
						BIO *out=NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
@@ -115,11 +119,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			g=3; */
 | 
								g=3; */
 | 
				
			||||||
		else if (strcmp(*argv,"-5") == 0)
 | 
							else if (strcmp(*argv,"-5") == 0)
 | 
				
			||||||
			g=5;
 | 
								g=5;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
							else if (strcmp(*argv,"-rand") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -138,14 +144,18 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -2        - use 2 as the generator value\n");
 | 
							BIO_printf(bio_err," -2        - use 2 as the generator value\n");
 | 
				
			||||||
	/*	BIO_printf(bio_err," -3        - use 3 as the generator value\n"); */
 | 
						/*	BIO_printf(bio_err," -3        - use 3 as the generator value\n"); */
 | 
				
			||||||
		BIO_printf(bio_err," -5        - use 5 as the generator value\n");
 | 
							BIO_printf(bio_err," -5        - use 5 as the generator value\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
							BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
		BIO_printf(bio_err,"           - load the file (or the files in the directory) into\n");
 | 
							BIO_printf(bio_err,"           - load the file (or the files in the directory) into\n");
 | 
				
			||||||
		BIO_printf(bio_err,"             the random number generator\n");
 | 
							BIO_printf(bio_err,"             the random number generator\n");
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	out=BIO_new(BIO_s_file());
 | 
						out=BIO_new(BIO_s_file());
 | 
				
			||||||
	if (out == NULL)
 | 
						if (out == NULL)
 | 
				
			||||||
@@ -198,7 +208,7 @@ end:
 | 
				
			|||||||
	if (out != NULL) BIO_free_all(out);
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
	if (dh != NULL) DH_free(dh);
 | 
						if (dh != NULL) DH_free(dh);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
 | 
					static void MS_CALLBACK dh_cb(int p, int n, void *arg)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,7 +77,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	DSA *dsa=NULL;
 | 
						DSA *dsa=NULL;
 | 
				
			||||||
	int ret=1;
 | 
						int ret=1;
 | 
				
			||||||
	char *outfile=NULL;
 | 
						char *outfile=NULL;
 | 
				
			||||||
@@ -85,7 +87,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	char *passargout = NULL, *passout = NULL;
 | 
						char *passargout = NULL, *passout = NULL;
 | 
				
			||||||
	BIO *out=NULL,*in=NULL;
 | 
						BIO *out=NULL,*in=NULL;
 | 
				
			||||||
	const EVP_CIPHER *enc=NULL;
 | 
						const EVP_CIPHER *enc=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -111,11 +115,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			passargout= *(++argv);
 | 
								passargout= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
							else if (strcmp(*argv,"-rand") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -167,7 +173,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
							BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
				
			||||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
							BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
							BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
		BIO_printf(bio_err,"           - load the file (or the files in the directory) into\n");
 | 
							BIO_printf(bio_err,"           - load the file (or the files in the directory) into\n");
 | 
				
			||||||
		BIO_printf(bio_err,"             the random number generator\n");
 | 
							BIO_printf(bio_err,"             the random number generator\n");
 | 
				
			||||||
@@ -176,7 +184,9 @@ bad:
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
 | 
						if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error getting password\n");
 | 
							BIO_printf(bio_err, "Error getting password\n");
 | 
				
			||||||
@@ -246,6 +256,6 @@ end:
 | 
				
			|||||||
	if (dsa != NULL) DSA_free(dsa);
 | 
						if (dsa != NULL) DSA_free(dsa);
 | 
				
			||||||
	if(passout) OPENSSL_free(passout);
 | 
						if(passout) OPENSSL_free(passout);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,7 +81,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	int ret=1;
 | 
						int ret=1;
 | 
				
			||||||
	RSA *rsa=NULL;
 | 
						RSA *rsa=NULL;
 | 
				
			||||||
	int i,num=DEFBITS;
 | 
						int i,num=DEFBITS;
 | 
				
			||||||
@@ -90,7 +92,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	unsigned long f4=RSA_F4;
 | 
						unsigned long f4=RSA_F4;
 | 
				
			||||||
	char *outfile=NULL;
 | 
						char *outfile=NULL;
 | 
				
			||||||
	char *passargout = NULL, *passout = NULL;
 | 
						char *passargout = NULL, *passout = NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	char *inrand=NULL;
 | 
						char *inrand=NULL;
 | 
				
			||||||
	BIO *out=NULL;
 | 
						BIO *out=NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -122,11 +126,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			f4=3;
 | 
								f4=3;
 | 
				
			||||||
		else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
 | 
							else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
 | 
				
			||||||
			f4=RSA_F4;
 | 
								f4=RSA_F4;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
							else if (strcmp(*argv,"-rand") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -177,7 +183,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -passout arg    output file pass phrase source\n");
 | 
							BIO_printf(bio_err," -passout arg    output file pass phrase source\n");
 | 
				
			||||||
		BIO_printf(bio_err," -f4             use F4 (0x10001) for the E value\n");
 | 
							BIO_printf(bio_err," -f4             use F4 (0x10001) for the E value\n");
 | 
				
			||||||
		BIO_printf(bio_err," -3              use 3 for the E value\n");
 | 
							BIO_printf(bio_err," -3              use 3 for the E value\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
							BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
		BIO_printf(bio_err,"                 load the file (or the files in the directory) into\n");
 | 
							BIO_printf(bio_err,"                 load the file (or the files in the directory) into\n");
 | 
				
			||||||
		BIO_printf(bio_err,"                 the random number generator\n");
 | 
							BIO_printf(bio_err,"                 the random number generator\n");
 | 
				
			||||||
@@ -191,7 +199,9 @@ bad:
 | 
				
			|||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (outfile == NULL)
 | 
						if (outfile == NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -258,7 +268,7 @@ err:
 | 
				
			|||||||
	if (ret != 0)
 | 
						if (ret != 0)
 | 
				
			||||||
		ERR_print_errors(bio_err);
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
 | 
					static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -139,13 +139,13 @@ $! Define The Application Files.
 | 
				
			|||||||
$!
 | 
					$!
 | 
				
			||||||
$ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
 | 
					$ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
 | 
				
			||||||
	      "CA;PKCS7;CRL2P7;CRL;"+-
 | 
						      "CA;PKCS7;CRL2P7;CRL;"+-
 | 
				
			||||||
	      "RSA;RSAUTL;DSA;DSAPARAM;EC;ECPARAM;"+-
 | 
						      "RSA;RSAUTL;DSA;DSAPARAM;"+-
 | 
				
			||||||
	      "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+-
 | 
						      "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+-
 | 
				
			||||||
	      "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+-
 | 
						      "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+-
 | 
				
			||||||
	      "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP"
 | 
						      "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP"
 | 
				
			||||||
$ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,-
 | 
					$ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,-
 | 
				
			||||||
	       CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,-
 | 
						       CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,-
 | 
				
			||||||
	       RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,EC.OBJ,ECPARAM.OBJ,-
 | 
						       RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,-
 | 
				
			||||||
	       X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,-
 | 
						       X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,-
 | 
				
			||||||
	       S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,-
 | 
						       S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,-
 | 
				
			||||||
	       CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ
 | 
						       CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ
 | 
				
			||||||
@@ -166,7 +166,7 @@ $!     TCPIP_PROGRAMS = ",S_SERVER,S_CLIENT,SESS_ID,CIPHERS,S_TIME,"
 | 
				
			|||||||
$!
 | 
					$!
 | 
				
			||||||
$! Setup exceptional compilations
 | 
					$! Setup exceptional compilations
 | 
				
			||||||
$!
 | 
					$!
 | 
				
			||||||
$ COMPILEWITH_CC2 = ",S_SOCKET,S_SERVER,S_CLIENT,"
 | 
					$ COMPILEWITH_CC2 = ",S_SERVER,S_CLIENT,"
 | 
				
			||||||
$!
 | 
					$!
 | 
				
			||||||
$ PHASE := LIB
 | 
					$ PHASE := LIB
 | 
				
			||||||
$!
 | 
					$!
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf (bio_err, "-in file  input file\n");
 | 
							BIO_printf (bio_err, "-in file  input file\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-out file output file\n");
 | 
							BIO_printf (bio_err, "-out file output file\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-toseq    output NS Sequence file\n");
 | 
							BIO_printf (bio_err, "-toseq    output NS Sequence file\n");
 | 
				
			||||||
		EXIT(1);
 | 
							OPENSSL_EXIT(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (infile) {
 | 
						if (infile) {
 | 
				
			||||||
@@ -162,6 +162,6 @@ end:
 | 
				
			|||||||
	BIO_free_all(out);
 | 
						BIO_free_all(out);
 | 
				
			||||||
	NETSCAPE_CERT_SEQUENCE_free(seq);
 | 
						NETSCAPE_CERT_SEQUENCE_free(seq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										79
									
								
								apps/ocsp.c
									
									
									
									
									
								
							
							
						
						
									
										79
									
								
								apps/ocsp.c
									
									
									
									
									
								
							@@ -55,6 +55,7 @@
 | 
				
			|||||||
 * Hudson (tjh@cryptsoft.com).
 | 
					 * Hudson (tjh@cryptsoft.com).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_OCSP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
@@ -67,19 +68,6 @@
 | 
				
			|||||||
/* Maximum leeway in validity period: default 5 minutes */
 | 
					/* Maximum leeway in validity period: default 5 minutes */
 | 
				
			||||||
#define MAX_VALIDITY_PERIOD	(5 * 60)
 | 
					#define MAX_VALIDITY_PERIOD	(5 * 60)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* CA index.txt definitions */
 | 
					 | 
				
			||||||
#define DB_type         0
 | 
					 | 
				
			||||||
#define DB_exp_date     1
 | 
					 | 
				
			||||||
#define DB_rev_date     2
 | 
					 | 
				
			||||||
#define DB_serial       3       /* index - unique */
 | 
					 | 
				
			||||||
#define DB_file         4       
 | 
					 | 
				
			||||||
#define DB_name         5       /* index - unique for active */
 | 
					 | 
				
			||||||
#define DB_NUMBER       6
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define DB_TYPE_REV	'R'
 | 
					 | 
				
			||||||
#define DB_TYPE_EXP	'E'
 | 
					 | 
				
			||||||
#define DB_TYPE_VAL	'V'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
 | 
					static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
 | 
				
			||||||
				STACK_OF(OCSP_CERTID) *ids);
 | 
									STACK_OF(OCSP_CERTID) *ids);
 | 
				
			||||||
static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, X509 *issuer,
 | 
					static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, X509 *issuer,
 | 
				
			||||||
@@ -88,12 +76,12 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
 | 
				
			|||||||
				STACK *names, STACK_OF(OCSP_CERTID) *ids,
 | 
									STACK *names, STACK_OF(OCSP_CERTID) *ids,
 | 
				
			||||||
				long nsec, long maxage);
 | 
									long nsec, long maxage);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, TXT_DB *db,
 | 
					static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, CA_DB *db,
 | 
				
			||||||
			X509 *ca, X509 *rcert, EVP_PKEY *rkey,
 | 
								X509 *ca, X509 *rcert, EVP_PKEY *rkey,
 | 
				
			||||||
			STACK_OF(X509) *rother, unsigned long flags,
 | 
								STACK_OF(X509) *rother, unsigned long flags,
 | 
				
			||||||
			int nmin, int ndays);
 | 
								int nmin, int ndays);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static char **lookup_serial(TXT_DB *db, ASN1_INTEGER *ser);
 | 
					static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser);
 | 
				
			||||||
static BIO *init_responder(char *port);
 | 
					static BIO *init_responder(char *port);
 | 
				
			||||||
static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port);
 | 
					static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port);
 | 
				
			||||||
static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp);
 | 
					static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp);
 | 
				
			||||||
@@ -135,13 +123,14 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	int accept_count = -1;
 | 
						int accept_count = -1;
 | 
				
			||||||
	int badarg = 0;
 | 
						int badarg = 0;
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
 | 
						int ignore_err = 0;
 | 
				
			||||||
	STACK *reqnames = NULL;
 | 
						STACK *reqnames = NULL;
 | 
				
			||||||
	STACK_OF(OCSP_CERTID) *ids = NULL;
 | 
						STACK_OF(OCSP_CERTID) *ids = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	X509 *rca_cert = NULL;
 | 
						X509 *rca_cert = NULL;
 | 
				
			||||||
	char *ridx_filename = NULL;
 | 
						char *ridx_filename = NULL;
 | 
				
			||||||
	char *rca_filename = NULL;
 | 
						char *rca_filename = NULL;
 | 
				
			||||||
	TXT_DB *rdb = NULL;
 | 
						CA_DB *rdb = NULL;
 | 
				
			||||||
	int nmin = 0, ndays = -1;
 | 
						int nmin = 0, ndays = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (bio_err == NULL) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
 | 
						if (bio_err == NULL) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
 | 
				
			||||||
@@ -194,6 +183,8 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			else badarg = 1;
 | 
								else badarg = 1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							else if (!strcmp(*args, "-ignore_err"))
 | 
				
			||||||
 | 
								ignore_err = 1;
 | 
				
			||||||
		else if (!strcmp(*args, "-noverify"))
 | 
							else if (!strcmp(*args, "-noverify"))
 | 
				
			||||||
			noverify = 1;
 | 
								noverify = 1;
 | 
				
			||||||
		else if (!strcmp(*args, "-nonce"))
 | 
							else if (!strcmp(*args, "-nonce"))
 | 
				
			||||||
@@ -523,7 +514,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf (bio_err, "-serial n          serial number to check\n");
 | 
							BIO_printf (bio_err, "-serial n          serial number to check\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-signer file       certificate to sign OCSP request with\n");
 | 
							BIO_printf (bio_err, "-signer file       certificate to sign OCSP request with\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-signkey file      private key to sign OCSP request with\n");
 | 
							BIO_printf (bio_err, "-signkey file      private key to sign OCSP request with\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-sign_certs file   additional certificates to include in signed request\n");
 | 
							BIO_printf (bio_err, "-sign_other file   additional certificates to include in signed request\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-no_certs          don't include any certificates in signed request\n");
 | 
							BIO_printf (bio_err, "-no_certs          don't include any certificates in signed request\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-req_text          print text form of request\n");
 | 
							BIO_printf (bio_err, "-req_text          print text form of request\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-resp_text         print text form of response\n");
 | 
							BIO_printf (bio_err, "-resp_text         print text form of response\n");
 | 
				
			||||||
@@ -543,10 +534,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n");
 | 
							BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-status_age n      maximum status age in seconds\n");
 | 
							BIO_printf (bio_err, "-status_age n      maximum status age in seconds\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-noverify          don't verify response at all\n");
 | 
							BIO_printf (bio_err, "-noverify          don't verify response at all\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-verify_certs file additional certificates to search for signer\n");
 | 
							BIO_printf (bio_err, "-verify_other file additional certificates to search for signer\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-trust_other       don't verify additional certificates\n");
 | 
							BIO_printf (bio_err, "-trust_other       don't verify additional certificates\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-no_intern         don't search certificates contained in response for signer\n");
 | 
							BIO_printf (bio_err, "-no_intern         don't search certificates contained in response for signer\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-no_sig_verify     don't check signature on response\n");
 | 
							BIO_printf (bio_err, "-no_signature_verify don't check signature on response\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-no_cert_verify    don't check signing certificate\n");
 | 
							BIO_printf (bio_err, "-no_cert_verify    don't check signing certificate\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-no_chain          don't chain verify response\n");
 | 
							BIO_printf (bio_err, "-no_chain          don't chain verify response\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-no_cert_checks    don't do additional checks on signing certificate\n");
 | 
							BIO_printf (bio_err, "-no_cert_checks    don't do additional checks on signing certificate\n");
 | 
				
			||||||
@@ -696,22 +687,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (ridx_filename && !rdb)
 | 
						if (ridx_filename && !rdb)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		BIO *db_bio = NULL;
 | 
							rdb = load_index(ridx_filename, NULL);
 | 
				
			||||||
		db_bio = BIO_new_file(ridx_filename, "r");
 | 
							if (!rdb) goto end;
 | 
				
			||||||
		if (!db_bio)
 | 
							if (!index_index(rdb)) goto end;
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_err, "Error opening index file %s\n", ridx_filename);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		rdb = TXT_DB_read(db_bio, DB_NUMBER);
 | 
					 | 
				
			||||||
		BIO_free(db_bio);
 | 
					 | 
				
			||||||
		if (!rdb)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_err, "Error reading index file %s\n", ridx_filename);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (!make_serial_index(rdb))
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (rdb)
 | 
						if (rdb)
 | 
				
			||||||
@@ -722,7 +700,12 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	else if (host)
 | 
						else if (host)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_SOCK
 | 
				
			||||||
		cbio = BIO_new_connect(host);
 | 
							cbio = BIO_new_connect(host);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
							BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n");
 | 
				
			||||||
 | 
							goto end;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		if (!cbio)
 | 
							if (!cbio)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err, "Error creating connect BIO\n");
 | 
								BIO_printf(bio_err, "Error creating connect BIO\n");
 | 
				
			||||||
@@ -732,7 +715,16 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		if (use_ssl == 1)
 | 
							if (use_ssl == 1)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO *sbio;
 | 
								BIO *sbio;
 | 
				
			||||||
 | 
					#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
				
			||||||
			ctx = SSL_CTX_new(SSLv23_client_method());
 | 
								ctx = SSL_CTX_new(SSLv23_client_method());
 | 
				
			||||||
 | 
					#elif !defined(OPENSSL_NO_SSL3)
 | 
				
			||||||
 | 
								ctx = SSL_CTX_new(SSLv3_client_method());
 | 
				
			||||||
 | 
					#elif !defined(OPENSSL_NO_SSL2)
 | 
				
			||||||
 | 
								ctx = SSL_CTX_new(SSLv2_client_method());
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
								BIO_printf(bio_err, "SSL is disabled\n");
 | 
				
			||||||
 | 
								goto end;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
			SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
 | 
								SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
 | 
				
			||||||
			sbio = BIO_new_ssl(ctx, 1);
 | 
								sbio = BIO_new_ssl(ctx, 1);
 | 
				
			||||||
			cbio = BIO_push(sbio, cbio);
 | 
								cbio = BIO_push(sbio, cbio);
 | 
				
			||||||
@@ -794,6 +786,8 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
		BIO_printf(out, "Responder Error: %s (%ld)\n",
 | 
							BIO_printf(out, "Responder Error: %s (%ld)\n",
 | 
				
			||||||
				OCSP_response_status_str(i), i);
 | 
									OCSP_response_status_str(i), i);
 | 
				
			||||||
 | 
							if (ignore_err)
 | 
				
			||||||
 | 
								goto redo_accept;
 | 
				
			||||||
		ret = 0;
 | 
							ret = 0;
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -879,7 +873,7 @@ end:
 | 
				
			|||||||
	X509_free(cert);
 | 
						X509_free(cert);
 | 
				
			||||||
	X509_free(rsigner);
 | 
						X509_free(rsigner);
 | 
				
			||||||
	X509_free(rca_cert);
 | 
						X509_free(rca_cert);
 | 
				
			||||||
	TXT_DB_free(rdb);
 | 
						free_index(rdb);
 | 
				
			||||||
	BIO_free_all(cbio);
 | 
						BIO_free_all(cbio);
 | 
				
			||||||
	BIO_free_all(acbio);
 | 
						BIO_free_all(acbio);
 | 
				
			||||||
	BIO_free(out);
 | 
						BIO_free(out);
 | 
				
			||||||
@@ -899,7 +893,7 @@ end:
 | 
				
			|||||||
		SSL_CTX_free(ctx);
 | 
							SSL_CTX_free(ctx);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
 | 
					static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
 | 
				
			||||||
@@ -1021,7 +1015,7 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, TXT_DB *db,
 | 
					static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, CA_DB *db,
 | 
				
			||||||
			X509 *ca, X509 *rcert, EVP_PKEY *rkey,
 | 
								X509 *ca, X509 *rcert, EVP_PKEY *rkey,
 | 
				
			||||||
			STACK_OF(X509) *rother, unsigned long flags,
 | 
								STACK_OF(X509) *rother, unsigned long flags,
 | 
				
			||||||
			int nmin, int ndays)
 | 
								int nmin, int ndays)
 | 
				
			||||||
@@ -1113,7 +1107,7 @@ static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, TXT_DB *d
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static char **lookup_serial(TXT_DB *db, ASN1_INTEGER *ser)
 | 
					static char **lookup_serial(CA_DB *db, ASN1_INTEGER *ser)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
	BIGNUM *bn = NULL;
 | 
						BIGNUM *bn = NULL;
 | 
				
			||||||
@@ -1126,7 +1120,7 @@ static char **lookup_serial(TXT_DB *db, ASN1_INTEGER *ser)
 | 
				
			|||||||
		itmp = BN_bn2hex(bn);
 | 
							itmp = BN_bn2hex(bn);
 | 
				
			||||||
	row[DB_serial] = itmp;
 | 
						row[DB_serial] = itmp;
 | 
				
			||||||
	BN_free(bn);
 | 
						BN_free(bn);
 | 
				
			||||||
	rrow=TXT_DB_get_by_index(db,DB_serial,row);
 | 
						rrow=TXT_DB_get_by_index(db->db,DB_serial,row);
 | 
				
			||||||
	OPENSSL_free(itmp);
 | 
						OPENSSL_free(itmp);
 | 
				
			||||||
	return rrow;
 | 
						return rrow;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -1139,7 +1133,11 @@ static BIO *init_responder(char *port)
 | 
				
			|||||||
	bufbio = BIO_new(BIO_f_buffer());
 | 
						bufbio = BIO_new(BIO_f_buffer());
 | 
				
			||||||
	if (!bufbio) 
 | 
						if (!bufbio) 
 | 
				
			||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_SOCK
 | 
				
			||||||
	acbio = BIO_new_accept(port);
 | 
						acbio = BIO_new_accept(port);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						BIO_printf(bio_err, "Error setting up accept BIO - sockets not supported.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	if (!acbio)
 | 
						if (!acbio)
 | 
				
			||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
	BIO_set_accept_bios(acbio, bufbio);
 | 
						BIO_set_accept_bios(acbio, bufbio);
 | 
				
			||||||
@@ -1226,3 +1224,4 @@ static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp)
 | 
				
			|||||||
	return 1;
 | 
						return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -122,11 +122,14 @@
 | 
				
			|||||||
#include <openssl/x509.h>
 | 
					#include <openssl/x509.h>
 | 
				
			||||||
#include <openssl/pem.h>
 | 
					#include <openssl/pem.h>
 | 
				
			||||||
#include <openssl/ssl.h>
 | 
					#include <openssl/ssl.h>
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
#include <openssl/engine.h>
 | 
					#include <openssl/engine.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
 | 
					#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
 | 
				
			||||||
#include "progs.h"
 | 
					#include "progs.h"
 | 
				
			||||||
#include "s_apps.h"
 | 
					#include "s_apps.h"
 | 
				
			||||||
#include <openssl/err.h>
 | 
					#include <openssl/err.h>
 | 
				
			||||||
 | 
					#include <openssl/fips.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
 | 
					/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
 | 
				
			||||||
 * base prototypes (we cast each variable inside the function to the required
 | 
					 * base prototypes (we cast each variable inside the function to the required
 | 
				
			||||||
@@ -161,7 +164,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
 | 
				
			|||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (type < 0 || type > CRYPTO_NUM_LOCKS)
 | 
						if (type < 0 || type >= CRYPTO_NUM_LOCKS)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		errstr = "type out of bounds";
 | 
							errstr = "type out of bounds";
 | 
				
			||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
@@ -229,6 +232,24 @@ int main(int Argc, char *Argv[])
 | 
				
			|||||||
	arg.data=NULL;
 | 
						arg.data=NULL;
 | 
				
			||||||
	arg.count=0;
 | 
						arg.count=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef OPENSSL_FIPS
 | 
				
			||||||
 | 
						if(getenv("OPENSSL_FIPS")) {
 | 
				
			||||||
 | 
					#if defined(_WIN32)
 | 
				
			||||||
 | 
							char filename[MAX_PATH] = "";
 | 
				
			||||||
 | 
							GetModuleFileName( NULL, filename, MAX_PATH) ;
 | 
				
			||||||
 | 
							p = filename;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
							p = Argv[0];
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							if (!FIPS_mode_set(1,p)) {
 | 
				
			||||||
 | 
							ERR_load_crypto_strings();
 | 
				
			||||||
 | 
							ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
 | 
				
			||||||
 | 
							exit(1);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							if (getenv("OPENSSL_FIPS_MD5"))
 | 
				
			||||||
 | 
								FIPS_allow_md5(1);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	if (bio_err == NULL)
 | 
						if (bio_err == NULL)
 | 
				
			||||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
							if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
				
			||||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
								BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
				
			||||||
@@ -358,7 +379,7 @@ end:
 | 
				
			|||||||
		BIO_free(bio_err);
 | 
							BIO_free(bio_err);
 | 
				
			||||||
		bio_err=NULL;
 | 
							bio_err=NULL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define LIST_STANDARD_COMMANDS "list-standard-commands"
 | 
					#define LIST_STANDARD_COMMANDS "list-standard-commands"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,10 +38,14 @@ dir		= ./demoCA		# Where everything is kept
 | 
				
			|||||||
certs		= $dir/certs		# Where the issued certs are kept
 | 
					certs		= $dir/certs		# Where the issued certs are kept
 | 
				
			||||||
crl_dir		= $dir/crl		# Where the issued crl are kept
 | 
					crl_dir		= $dir/crl		# Where the issued crl are kept
 | 
				
			||||||
database	= $dir/index.txt	# database index file.
 | 
					database	= $dir/index.txt	# database index file.
 | 
				
			||||||
 | 
					#unique_subject	= no			# Set to 'no' to allow creation of
 | 
				
			||||||
 | 
										# several ctificates with same subject.
 | 
				
			||||||
new_certs_dir	= $dir/newcerts		# default place for new certs.
 | 
					new_certs_dir	= $dir/newcerts		# default place for new certs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
certificate	= $dir/cacert.pem 	# The CA certificate
 | 
					certificate	= $dir/cacert.pem 	# The CA certificate
 | 
				
			||||||
serial		= $dir/serial 		# The current serial number
 | 
					serial		= $dir/serial 		# The current serial number
 | 
				
			||||||
 | 
					#crlnumber	= $dir/crlnumber	# the current crl number
 | 
				
			||||||
 | 
										# must be commented out to leave a V1 CRL
 | 
				
			||||||
crl		= $dir/crl.pem 		# The current CRL
 | 
					crl		= $dir/crl.pem 		# The current CRL
 | 
				
			||||||
private_key	= $dir/private/cakey.pem# The private key
 | 
					private_key	= $dir/private/cakey.pem# The private key
 | 
				
			||||||
RANDFILE	= $dir/private/.rand	# private random number file
 | 
					RANDFILE	= $dir/private/.rand	# private random number file
 | 
				
			||||||
@@ -58,6 +62,7 @@ cert_opt 	= ca_default		# Certificate field options
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
 | 
					# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
 | 
				
			||||||
# so this is commented out by default to leave a V1 CRL.
 | 
					# so this is commented out by default to leave a V1 CRL.
 | 
				
			||||||
 | 
					# crlnumber must also be commented out to leave a V1 CRL.
 | 
				
			||||||
# crl_extensions	= crl_ext
 | 
					# crl_extensions	= crl_ext
 | 
				
			||||||
 | 
					
 | 
				
			||||||
default_days	= 365			# how long to certify for
 | 
					default_days	= 365			# how long to certify for
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -292,7 +292,7 @@ err:
 | 
				
			|||||||
	if (out)
 | 
						if (out)
 | 
				
			||||||
		BIO_free_all(out);
 | 
							BIO_free_all(out);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -505,6 +505,6 @@ err:
 | 
				
			|||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	fputs("Program not available.\n", stderr)
 | 
						fputs("Program not available.\n", stderr)
 | 
				
			||||||
	EXIT(1);
 | 
						OPENSSL_EXIT(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										253
									
								
								apps/pkcs12.c
									
									
									
									
									
								
							
							
						
						
									
										253
									
								
								apps/pkcs12.c
									
									
									
									
									
								
							@@ -2,10 +2,10 @@
 | 
				
			|||||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
 | 
					#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
 | 
					/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
 | 
				
			||||||
 * project.
 | 
					 * project 1999.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
/* ====================================================================
 | 
					/* ====================================================================
 | 
				
			||||||
 * 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
 | 
					 * Redistribution and use in source and binary forms, with or without
 | 
				
			||||||
 * modification, are permitted provided that the following conditions
 | 
					 * modification, are permitted provided that the following conditions
 | 
				
			||||||
@@ -120,7 +120,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
    char *passin = NULL, *passout = NULL;
 | 
					    char *passin = NULL, *passout = NULL;
 | 
				
			||||||
    char *inrand = NULL;
 | 
					    char *inrand = NULL;
 | 
				
			||||||
    char *CApath = NULL, *CAfile = NULL;
 | 
					    char *CApath = NULL, *CAfile = NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
    char *engine=NULL;
 | 
					    char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    apps_startup();
 | 
					    apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -164,14 +166,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
					 maciter = PKCS12_DEFAULT_ITER;
 | 
										 maciter = PKCS12_DEFAULT_ITER;
 | 
				
			||||||
		else if (!strcmp (*args, "-nomaciter"))
 | 
							else if (!strcmp (*args, "-nomaciter"))
 | 
				
			||||||
					 maciter = 1;
 | 
										 maciter = 1;
 | 
				
			||||||
		else if (!strcmp (*args, "-nomac"))
 | 
					 | 
				
			||||||
					 maciter = -1;
 | 
					 | 
				
			||||||
		else if (!strcmp (*args, "-nodes")) enc=NULL;
 | 
							else if (!strcmp (*args, "-nodes")) enc=NULL;
 | 
				
			||||||
		else if (!strcmp (*args, "-certpbe")) {
 | 
							else if (!strcmp (*args, "-certpbe")) {
 | 
				
			||||||
			if (args[1]) {
 | 
								if (args[1]) {
 | 
				
			||||||
				args++;
 | 
									args++;
 | 
				
			||||||
				if (!strcmp(*args, "NONE"))
 | 
					 | 
				
			||||||
					cert_pbe = -1;
 | 
					 | 
				
			||||||
				cert_pbe=OBJ_txt2nid(*args);
 | 
									cert_pbe=OBJ_txt2nid(*args);
 | 
				
			||||||
				if(cert_pbe == NID_undef) {
 | 
									if(cert_pbe == NID_undef) {
 | 
				
			||||||
					BIO_printf(bio_err,
 | 
										BIO_printf(bio_err,
 | 
				
			||||||
@@ -182,10 +180,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		} else if (!strcmp (*args, "-keypbe")) {
 | 
							} else if (!strcmp (*args, "-keypbe")) {
 | 
				
			||||||
			if (args[1]) {
 | 
								if (args[1]) {
 | 
				
			||||||
				args++;
 | 
									args++;
 | 
				
			||||||
				if (!strcmp(*args, "NONE"))
 | 
									key_pbe=OBJ_txt2nid(*args);
 | 
				
			||||||
					key_pbe = -1;
 | 
					 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					key_pbe=OBJ_txt2nid(*args);
 | 
					 | 
				
			||||||
				if(key_pbe == NID_undef) {
 | 
									if(key_pbe == NID_undef) {
 | 
				
			||||||
					BIO_printf(bio_err,
 | 
										BIO_printf(bio_err,
 | 
				
			||||||
						 "Unknown PBE algorithm %s\n", *args);
 | 
											 "Unknown PBE algorithm %s\n", *args);
 | 
				
			||||||
@@ -259,11 +254,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			args++;	
 | 
								args++;	
 | 
				
			||||||
			CAfile = *args;
 | 
								CAfile = *args;
 | 
				
			||||||
		    } else badarg = 1;
 | 
							    } else badarg = 1;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		} else if (!strcmp(*args,"-engine")) {
 | 
							} else if (!strcmp(*args,"-engine")) {
 | 
				
			||||||
		    if (args[1]) {
 | 
							    if (args[1]) {
 | 
				
			||||||
			args++;	
 | 
								args++;	
 | 
				
			||||||
			engine = *args;
 | 
								engine = *args;
 | 
				
			||||||
		    } else badarg = 1;
 | 
							    } else badarg = 1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		} else badarg = 1;
 | 
							} else badarg = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	} else badarg = 1;
 | 
						} else badarg = 1;
 | 
				
			||||||
@@ -311,14 +308,18 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	BIO_printf (bio_err, "-password p   set import/export password source\n");
 | 
						BIO_printf (bio_err, "-password p   set import/export password source\n");
 | 
				
			||||||
	BIO_printf (bio_err, "-passin p     input file pass phrase source\n");
 | 
						BIO_printf (bio_err, "-passin p     input file pass phrase source\n");
 | 
				
			||||||
	BIO_printf (bio_err, "-passout p    output file pass phrase source\n");
 | 
						BIO_printf (bio_err, "-passout p    output file pass phrase source\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	BIO_printf (bio_err, "-engine e     use engine e, possibly a hardware device.\n");
 | 
						BIO_printf (bio_err, "-engine e     use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	BIO_printf(bio_err,  "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
						BIO_printf(bio_err,  "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
	BIO_printf(bio_err,  "              load the file (or the files in the directory) into\n");
 | 
						BIO_printf(bio_err,  "              load the file (or the files in the directory) into\n");
 | 
				
			||||||
	BIO_printf(bio_err,  "              the random number generator\n");
 | 
						BIO_printf(bio_err,  "              the random number generator\n");
 | 
				
			||||||
    	goto end;
 | 
					    	goto end;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
    e = setup_engine(bio_err, engine, 0);
 | 
					    e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(passarg) {
 | 
					    if(passarg) {
 | 
				
			||||||
	if(export_cert) passargout = passarg;
 | 
						if(export_cert) passargout = passarg;
 | 
				
			||||||
@@ -364,6 +365,24 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	    goto end;
 | 
						    goto end;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
					   if (certfile) {
 | 
				
			||||||
 | 
					    	if(!(certsin = BIO_new_file(certfile, "r"))) {
 | 
				
			||||||
 | 
						    BIO_printf(bio_err, "Can't open certificate file %s\n", certfile);
 | 
				
			||||||
 | 
						    perror (certfile);
 | 
				
			||||||
 | 
						    goto end;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (keyname) {
 | 
				
			||||||
 | 
					    	if(!(inkey = BIO_new_file(keyname, "r"))) {
 | 
				
			||||||
 | 
						    BIO_printf(bio_err, "Can't key certificate file %s\n", keyname);
 | 
				
			||||||
 | 
						    perror (keyname);
 | 
				
			||||||
 | 
						    goto end;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
    CRYPTO_pop_info();
 | 
					    CRYPTO_pop_info();
 | 
				
			||||||
    CRYPTO_push_info("write files");
 | 
					    CRYPTO_push_info("write files");
 | 
				
			||||||
@@ -400,31 +419,27 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (export_cert) {
 | 
					    if (export_cert) {
 | 
				
			||||||
	EVP_PKEY *key = NULL;
 | 
						EVP_PKEY *key = NULL;
 | 
				
			||||||
	X509 *ucert = NULL, *x = NULL;
 | 
						STACK_OF(PKCS12_SAFEBAG) *bags = NULL;
 | 
				
			||||||
 | 
						STACK_OF(PKCS7) *safes = NULL;
 | 
				
			||||||
 | 
						PKCS12_SAFEBAG *bag = NULL;
 | 
				
			||||||
 | 
						PKCS8_PRIV_KEY_INFO *p8 = NULL;
 | 
				
			||||||
 | 
						PKCS7 *authsafe = NULL;
 | 
				
			||||||
 | 
						X509 *ucert = NULL;
 | 
				
			||||||
	STACK_OF(X509) *certs=NULL;
 | 
						STACK_OF(X509) *certs=NULL;
 | 
				
			||||||
	unsigned char *catmp = NULL;
 | 
						char *catmp = NULL;
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
 | 
						unsigned char keyid[EVP_MAX_MD_SIZE];
 | 
				
			||||||
	if ((options & (NOCERTS|NOKEYS)) == (NOCERTS|NOKEYS))
 | 
						unsigned int keyidlen = 0;
 | 
				
			||||||
		{	
 | 
					 | 
				
			||||||
		BIO_printf(bio_err, "Nothing to do!\n");
 | 
					 | 
				
			||||||
		goto export_end;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (options & NOCERTS)
 | 
					 | 
				
			||||||
		chain = 0;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_push_info("process -export_cert");
 | 
						CRYPTO_push_info("process -export_cert");
 | 
				
			||||||
	CRYPTO_push_info("reading private key");
 | 
						CRYPTO_push_info("reading private key");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	if (!(options & NOKEYS))
 | 
						key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1,
 | 
				
			||||||
		{
 | 
							passin, e, "private key");
 | 
				
			||||||
		key = load_key(bio_err, keyname ? keyname : infile,
 | 
						if (!key) {
 | 
				
			||||||
				FORMAT_PEM, 1, passin, e, "private key");
 | 
							goto export_end;
 | 
				
			||||||
		if (!key)
 | 
						}
 | 
				
			||||||
			goto export_end;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
@@ -432,62 +447,50 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Load in all certs in input file */
 | 
						/* Load in all certs in input file */
 | 
				
			||||||
	if(!(options & NOCERTS))
 | 
						if(!(certs = load_certs(bio_err, infile, FORMAT_PEM, NULL, e,
 | 
				
			||||||
		{
 | 
							"certificates"))) {
 | 
				
			||||||
		certs = load_certs(bio_err, infile, FORMAT_PEM, NULL, e,
 | 
							goto export_end;
 | 
				
			||||||
							"certificates");
 | 
						}
 | 
				
			||||||
		if (!certs)
 | 
					 | 
				
			||||||
			goto export_end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (key)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			/* Look for matching private key */
 | 
					 | 
				
			||||||
			for(i = 0; i < sk_X509_num(certs); i++)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				x = sk_X509_value(certs, i);
 | 
					 | 
				
			||||||
				if(X509_check_private_key(x, key))
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					ucert = x;
 | 
					 | 
				
			||||||
					/* Zero keyid and alias */
 | 
					 | 
				
			||||||
					X509_keyid_set1(ucert, NULL, 0);
 | 
					 | 
				
			||||||
					X509_alias_set1(ucert, NULL, 0);
 | 
					 | 
				
			||||||
					/* Remove from list */
 | 
					 | 
				
			||||||
					sk_X509_delete(certs, i);
 | 
					 | 
				
			||||||
					break;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			if (!ucert)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err, "No certificate matches private key\n");
 | 
					 | 
				
			||||||
				goto export_end;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	CRYPTO_push_info("reading certs from input 2");
 | 
						CRYPTO_push_info("reading certs from input 2");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Add any more certificates asked for */
 | 
						for(i = 0; i < sk_X509_num(certs); i++) {
 | 
				
			||||||
	if(certfile)
 | 
							ucert = sk_X509_value(certs, i);
 | 
				
			||||||
		{
 | 
							if(X509_check_private_key(ucert, key)) {
 | 
				
			||||||
		STACK_OF(X509) *morecerts=NULL;
 | 
								X509_digest(ucert, EVP_sha1(), keyid, &keyidlen);
 | 
				
			||||||
		if(!(morecerts = load_certs(bio_err, certfile, FORMAT_PEM,
 | 
								break;
 | 
				
			||||||
					    NULL, e,
 | 
							}
 | 
				
			||||||
					    "certificates from certfile")))
 | 
						}
 | 
				
			||||||
			goto export_end;
 | 
						if(!keyidlen) {
 | 
				
			||||||
		while(sk_X509_num(morecerts) > 0)
 | 
							ucert = NULL;
 | 
				
			||||||
			sk_X509_push(certs, sk_X509_shift(morecerts));
 | 
							BIO_printf(bio_err, "No certificate matches private key\n");
 | 
				
			||||||
		sk_X509_free(morecerts);
 | 
							goto export_end;
 | 
				
			||||||
 		}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	CRYPTO_push_info("reading certs from certfile");
 | 
						CRYPTO_push_info("reading certs from certfile");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						bags = sk_PKCS12_SAFEBAG_new_null ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Add any more certificates asked for */
 | 
				
			||||||
 | 
						if (certfile) {
 | 
				
			||||||
 | 
							STACK_OF(X509) *morecerts=NULL;
 | 
				
			||||||
 | 
							if(!(morecerts = load_certs(bio_err, certfile, FORMAT_PEM,
 | 
				
			||||||
 | 
										    NULL, e,
 | 
				
			||||||
 | 
										    "certificates from certfile"))) {
 | 
				
			||||||
 | 
								goto export_end;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							while(sk_X509_num(morecerts) > 0) {
 | 
				
			||||||
 | 
								sk_X509_push(certs, sk_X509_shift(morecerts));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							sk_X509_free(morecerts);
 | 
				
			||||||
 | 
					 	}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	CRYPTO_push_info("building chain");
 | 
						CRYPTO_push_info("building chain");
 | 
				
			||||||
@@ -523,51 +526,100 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		}			
 | 
							}			
 | 
				
			||||||
    	}
 | 
					    	}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Add any CA names */
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	for (i = 0; i < sk_num(canames); i++)
 | 
						CRYPTO_push_info("building bags");
 | 
				
			||||||
		{
 | 
					#endif
 | 
				
			||||||
		catmp = (unsigned char *)sk_value(canames, i);
 | 
					 | 
				
			||||||
		X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* We now have loads of certificates: include them all */
 | 
				
			||||||
 | 
						for(i = 0; i < sk_X509_num(certs); i++) {
 | 
				
			||||||
 | 
							X509 *cert = NULL;
 | 
				
			||||||
 | 
							cert = sk_X509_value(certs, i);
 | 
				
			||||||
 | 
							bag = PKCS12_x5092certbag(cert);
 | 
				
			||||||
 | 
							/* If it matches private key set id */
 | 
				
			||||||
 | 
							if(cert == ucert) {
 | 
				
			||||||
 | 
								if(name) PKCS12_add_friendlyname(bag, name, -1);
 | 
				
			||||||
 | 
								PKCS12_add_localkeyid(bag, keyid, keyidlen);
 | 
				
			||||||
 | 
							} else if((catmp = sk_shift(canames))) 
 | 
				
			||||||
 | 
									PKCS12_add_friendlyname(bag, catmp, -1);
 | 
				
			||||||
 | 
							sk_PKCS12_SAFEBAG_push(bags, bag);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						sk_X509_pop_free(certs, X509_free);
 | 
				
			||||||
 | 
						certs = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	CRYPTO_push_info("reading password");
 | 
						CRYPTO_push_info("encrypting bags");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!noprompt &&
 | 
						if(!noprompt &&
 | 
				
			||||||
		EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1))
 | 
							EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) {
 | 
				
			||||||
		{
 | 
						    BIO_printf (bio_err, "Can't read Password\n");
 | 
				
			||||||
	    	BIO_printf (bio_err, "Can't read Password\n");
 | 
						    goto export_end;
 | 
				
			||||||
	    	goto export_end;
 | 
					        }
 | 
				
			||||||
        	}
 | 
						if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass);
 | 
				
			||||||
	if (!twopass) strcpy(macpass, pass);
 | 
						/* Turn certbags into encrypted authsafe */
 | 
				
			||||||
 | 
						authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0,
 | 
				
			||||||
 | 
													 iter, bags);
 | 
				
			||||||
 | 
						sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
 | 
				
			||||||
 | 
						bags = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!authsafe) {
 | 
				
			||||||
 | 
							ERR_print_errors (bio_err);
 | 
				
			||||||
 | 
							goto export_end;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						safes = sk_PKCS7_new_null ();
 | 
				
			||||||
 | 
						sk_PKCS7_push (safes, authsafe);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	CRYPTO_push_info("creating PKCS#12 structure");
 | 
						CRYPTO_push_info("building shrouded key bag");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p12 = PKCS12_create(pass, name, key, ucert, certs,
 | 
						/* Make a shrouded key bag */
 | 
				
			||||||
				key_pbe, cert_pbe, iter, -1, keytype);
 | 
						p8 = EVP_PKEY2PKCS8 (key);
 | 
				
			||||||
 | 
						if(keytype) PKCS8_add_keyusage(p8, keytype);
 | 
				
			||||||
 | 
						bag = PKCS12_MAKE_SHKEYBAG(key_pbe, cpass, -1, NULL, 0, iter, p8);
 | 
				
			||||||
 | 
						PKCS8_PRIV_KEY_INFO_free(p8);
 | 
				
			||||||
 | 
						p8 = NULL;
 | 
				
			||||||
 | 
					        if (name) PKCS12_add_friendlyname (bag, name, -1);
 | 
				
			||||||
 | 
						if(csp_name) PKCS12_add_CSPName_asc(bag, csp_name, -1);
 | 
				
			||||||
 | 
						PKCS12_add_localkeyid (bag, keyid, keyidlen);
 | 
				
			||||||
 | 
						bags = sk_PKCS12_SAFEBAG_new_null();
 | 
				
			||||||
 | 
						sk_PKCS12_SAFEBAG_push (bags, bag);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!p12)
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
		{
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	    	ERR_print_errors (bio_err);
 | 
						CRYPTO_push_info("encrypting shrouded key bag");
 | 
				
			||||||
		goto export_end;
 | 
					#endif
 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (maciter != -1)
 | 
						/* Turn it into unencrypted safe bag */
 | 
				
			||||||
		PKCS12_set_mac(p12, mpass, -1, NULL, 0, maciter, NULL);
 | 
						authsafe = PKCS12_pack_p7data (bags);
 | 
				
			||||||
 | 
						sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
 | 
				
			||||||
 | 
						bags = NULL;
 | 
				
			||||||
 | 
						sk_PKCS7_push (safes, authsafe);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
 | 
						CRYPTO_push_info("building pkcs12");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						p12 = PKCS12_init(NID_pkcs7_data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						PKCS12_pack_authsafes(p12, safes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sk_PKCS7_pop_free(safes, PKCS7_free);
 | 
				
			||||||
 | 
						safes = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						PKCS12_set_mac (p12, mpass, -1, NULL, 0, maciter, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
	CRYPTO_push_info("writing pkcs12");
 | 
						CRYPTO_push_info("writing pkcs12");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	i2d_PKCS12_bio(out, p12);
 | 
						i2d_PKCS12_bio (out, p12);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = 0;
 | 
						ret = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -580,7 +632,8 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (key) EVP_PKEY_free(key);
 | 
						if (key) EVP_PKEY_free(key);
 | 
				
			||||||
	if (certs) sk_X509_pop_free(certs, X509_free);
 | 
						if (certs) sk_X509_pop_free(certs, X509_free);
 | 
				
			||||||
	if (ucert) X509_free(ucert);
 | 
						if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
 | 
				
			||||||
 | 
						if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CRYPTO_MDEBUG
 | 
					#ifdef CRYPTO_MDEBUG
 | 
				
			||||||
	CRYPTO_pop_info();
 | 
						CRYPTO_pop_info();
 | 
				
			||||||
@@ -605,7 +658,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
    CRYPTO_pop_info();
 | 
					    CRYPTO_pop_info();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!twopass) strcpy(macpass, pass);
 | 
					    if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1);
 | 
					    if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1);
 | 
				
			||||||
    if(macver) {
 | 
					    if(macver) {
 | 
				
			||||||
@@ -651,7 +704,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
    if(passin) OPENSSL_free(passin);
 | 
					    if(passin) OPENSSL_free(passin);
 | 
				
			||||||
    if(passout) OPENSSL_free(passout);
 | 
					    if(passout) OPENSSL_free(passout);
 | 
				
			||||||
    apps_shutdown();
 | 
					    apps_shutdown();
 | 
				
			||||||
    EXIT(ret);
 | 
					    OPENSSL_EXIT(ret);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
 | 
					int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								apps/pkcs7.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								apps/pkcs7.c
									
									
									
									
									
								
							@@ -82,7 +82,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	PKCS7 *p7=NULL;
 | 
						PKCS7 *p7=NULL;
 | 
				
			||||||
	int i,badops=0;
 | 
						int i,badops=0;
 | 
				
			||||||
	BIO *in=NULL,*out=NULL;
 | 
						BIO *in=NULL,*out=NULL;
 | 
				
			||||||
@@ -90,7 +92,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	char *infile,*outfile,*prog;
 | 
						char *infile,*outfile,*prog;
 | 
				
			||||||
	int print_certs=0,text=0,noout=0;
 | 
						int print_certs=0,text=0,noout=0;
 | 
				
			||||||
	int ret=1;
 | 
						int ret=1;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -98,6 +102,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
							if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
				
			||||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
								BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!load_config(bio_err, NULL))
 | 
				
			||||||
 | 
							goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	infile=NULL;
 | 
						infile=NULL;
 | 
				
			||||||
	outfile=NULL;
 | 
						outfile=NULL;
 | 
				
			||||||
	informat=FORMAT_PEM;
 | 
						informat=FORMAT_PEM;
 | 
				
			||||||
@@ -134,11 +141,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			text=1;
 | 
								text=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-print_certs") == 0)
 | 
							else if (strcmp(*argv,"-print_certs") == 0)
 | 
				
			||||||
			print_certs=1;
 | 
								print_certs=1;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
								BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
				
			||||||
@@ -161,14 +170,18 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -print_certs  print any certs or crl in the input\n");
 | 
							BIO_printf(bio_err," -print_certs  print any certs or crl in the input\n");
 | 
				
			||||||
		BIO_printf(bio_err," -text         print full details of certificates\n");
 | 
							BIO_printf(bio_err," -text         print full details of certificates\n");
 | 
				
			||||||
		BIO_printf(bio_err," -noout        don't output encoded data\n");
 | 
							BIO_printf(bio_err," -noout        don't output encoded data\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		ret = 1;
 | 
							ret = 1;
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ERR_load_crypto_strings();
 | 
						ERR_load_crypto_strings();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	in=BIO_new(BIO_s_file());
 | 
						in=BIO_new(BIO_s_file());
 | 
				
			||||||
	out=BIO_new(BIO_s_file());
 | 
						out=BIO_new(BIO_s_file());
 | 
				
			||||||
@@ -301,5 +314,5 @@ end:
 | 
				
			|||||||
	if (in != NULL) BIO_free(in);
 | 
						if (in != NULL) BIO_free(in);
 | 
				
			||||||
	if (out != NULL) BIO_free_all(out);
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										19
									
								
								apps/pkcs8.c
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								apps/pkcs8.c
									
									
									
									
									
								
							@@ -85,7 +85,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	EVP_PKEY *pkey=NULL;
 | 
						EVP_PKEY *pkey=NULL;
 | 
				
			||||||
	char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
 | 
						char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
 | 
				
			||||||
	int badarg = 0;
 | 
						int badarg = 0;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
 | 
						if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -145,11 +147,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (!args[1]) goto bad;
 | 
								if (!args[1]) goto bad;
 | 
				
			||||||
			passargout= *(++args);
 | 
								passargout= *(++args);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*args,"-engine") == 0)
 | 
							else if (strcmp(*args,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (!args[1]) goto bad;
 | 
								if (!args[1]) goto bad;
 | 
				
			||||||
			engine= *(++args);
 | 
								engine= *(++args);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (!strcmp (*args, "-in")) {
 | 
							else if (!strcmp (*args, "-in")) {
 | 
				
			||||||
			if (args[1]) {
 | 
								if (args[1]) {
 | 
				
			||||||
				args++;
 | 
									args++;
 | 
				
			||||||
@@ -182,11 +186,15 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf(bio_err, "-nocrypt        use or expect unencrypted private key\n");
 | 
							BIO_printf(bio_err, "-nocrypt        use or expect unencrypted private key\n");
 | 
				
			||||||
		BIO_printf(bio_err, "-v2 alg         use PKCS#5 v2.0 and cipher \"alg\"\n");
 | 
							BIO_printf(bio_err, "-v2 alg         use PKCS#5 v2.0 and cipher \"alg\"\n");
 | 
				
			||||||
		BIO_printf(bio_err, "-v1 obj         use PKCS#5 v1.5 and cipher \"alg\"\n");
 | 
							BIO_printf(bio_err, "-v1 obj         use PKCS#5 v1.5 and cipher \"alg\"\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		return (1);
 | 
							return (1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
						if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
							BIO_printf(bio_err, "Error getting passwords\n");
 | 
				
			||||||
@@ -227,7 +235,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			return (1);
 | 
								return (1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
 | 
							if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
 | 
				
			||||||
			BIO_printf(bio_err, "Error converting key\n", outfile);
 | 
								BIO_printf(bio_err, "Error converting key\n");
 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
								ERR_print_errors(bio_err);
 | 
				
			||||||
			return (1);
 | 
								return (1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -251,8 +259,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
 | 
								if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
 | 
				
			||||||
					p8pass, strlen(p8pass),
 | 
										p8pass, strlen(p8pass),
 | 
				
			||||||
					NULL, 0, iter, p8inf))) {
 | 
										NULL, 0, iter, p8inf))) {
 | 
				
			||||||
				BIO_printf(bio_err, "Error encrypting key\n",
 | 
									BIO_printf(bio_err, "Error encrypting key\n");
 | 
				
			||||||
								 outfile);
 | 
					 | 
				
			||||||
				ERR_print_errors(bio_err);
 | 
									ERR_print_errors(bio_err);
 | 
				
			||||||
				return (1);
 | 
									return (1);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@@ -295,7 +302,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!p8) {
 | 
							if (!p8) {
 | 
				
			||||||
			BIO_printf (bio_err, "Error reading key\n", outfile);
 | 
								BIO_printf (bio_err, "Error reading key\n");
 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
								ERR_print_errors(bio_err);
 | 
				
			||||||
			return (1);
 | 
								return (1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -309,13 +316,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!p8inf) {
 | 
						if (!p8inf) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error decrypting key\n", outfile);
 | 
							BIO_printf(bio_err, "Error decrypting key\n");
 | 
				
			||||||
		ERR_print_errors(bio_err);
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
		return (1);
 | 
							return (1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
 | 
						if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error converting key\n", outfile);
 | 
							BIO_printf(bio_err, "Error converting key\n");
 | 
				
			||||||
		ERR_print_errors(bio_err);
 | 
							ERR_print_errors(bio_err);
 | 
				
			||||||
		return (1);
 | 
							return (1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								apps/progs.h
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								apps/progs.h
									
									
									
									
									
								
							@@ -17,8 +17,6 @@ extern int rsa_main(int argc,char *argv[]);
 | 
				
			|||||||
extern int rsautl_main(int argc,char *argv[]);
 | 
					extern int rsautl_main(int argc,char *argv[]);
 | 
				
			||||||
extern int dsa_main(int argc,char *argv[]);
 | 
					extern int dsa_main(int argc,char *argv[]);
 | 
				
			||||||
extern int dsaparam_main(int argc,char *argv[]);
 | 
					extern int dsaparam_main(int argc,char *argv[]);
 | 
				
			||||||
extern int ec_main(int argc,char *argv[]);
 | 
					 | 
				
			||||||
extern int ecparam_main(int argc,char *argv[]);
 | 
					 | 
				
			||||||
extern int x509_main(int argc,char *argv[]);
 | 
					extern int x509_main(int argc,char *argv[]);
 | 
				
			||||||
extern int genrsa_main(int argc,char *argv[]);
 | 
					extern int genrsa_main(int argc,char *argv[]);
 | 
				
			||||||
extern int gendsa_main(int argc,char *argv[]);
 | 
					extern int gendsa_main(int argc,char *argv[]);
 | 
				
			||||||
@@ -37,7 +35,9 @@ extern int pkcs8_main(int argc,char *argv[]);
 | 
				
			|||||||
extern int spkac_main(int argc,char *argv[]);
 | 
					extern int spkac_main(int argc,char *argv[]);
 | 
				
			||||||
extern int smime_main(int argc,char *argv[]);
 | 
					extern int smime_main(int argc,char *argv[]);
 | 
				
			||||||
extern int rand_main(int argc,char *argv[]);
 | 
					extern int rand_main(int argc,char *argv[]);
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
extern int engine_main(int argc,char *argv[]);
 | 
					extern int engine_main(int argc,char *argv[]);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
extern int ocsp_main(int argc,char *argv[]);
 | 
					extern int ocsp_main(int argc,char *argv[]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define FUNC_TYPE_GENERAL	1
 | 
					#define FUNC_TYPE_GENERAL	1
 | 
				
			||||||
@@ -80,12 +80,6 @@ FUNCTION functions[] = {
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
 | 
						{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_EC
 | 
					 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"ec",ec_main},
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_EC
 | 
					 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"ecparam",ecparam_main},
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"x509",x509_main},
 | 
						{FUNC_TYPE_GENERAL,"x509",x509_main},
 | 
				
			||||||
#ifndef OPENSSL_NO_RSA
 | 
					#ifndef OPENSSL_NO_RSA
 | 
				
			||||||
@@ -100,7 +94,9 @@ FUNCTION functions[] = {
 | 
				
			|||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
					#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"s_client",s_client_main},
 | 
						{FUNC_TYPE_GENERAL,"s_client",s_client_main},
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_SPEED
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"speed",speed_main},
 | 
						{FUNC_TYPE_GENERAL,"speed",speed_main},
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
					#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"s_time",s_time_main},
 | 
						{FUNC_TYPE_GENERAL,"s_time",s_time_main},
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -119,7 +115,9 @@ FUNCTION functions[] = {
 | 
				
			|||||||
	{FUNC_TYPE_GENERAL,"spkac",spkac_main},
 | 
						{FUNC_TYPE_GENERAL,"spkac",spkac_main},
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"smime",smime_main},
 | 
						{FUNC_TYPE_GENERAL,"smime",smime_main},
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"rand",rand_main},
 | 
						{FUNC_TYPE_GENERAL,"rand",rand_main},
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"engine",engine_main},
 | 
						{FUNC_TYPE_GENERAL,"engine",engine_main},
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	{FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
 | 
						{FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
 | 
				
			||||||
#ifndef OPENSSL_NO_MD2
 | 
					#ifndef OPENSSL_NO_MD2
 | 
				
			||||||
	{FUNC_TYPE_MD,"md2",dgst_main},
 | 
						{FUNC_TYPE_MD,"md2",dgst_main},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,8 +33,6 @@ foreach (@ARGV)
 | 
				
			|||||||
		{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n";  }
 | 
							{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n";  }
 | 
				
			||||||
	elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
 | 
						elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
 | 
				
			||||||
		{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
 | 
							{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
 | 
				
			||||||
	elsif ( ($_ =~ /^ec$/) || ($_ =~ /^ecparam$/))
 | 
					 | 
				
			||||||
		{ print "#ifndef OPENSSL_NO_EC\n${str}#endif\n";}
 | 
					 | 
				
			||||||
	elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
 | 
						elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
 | 
				
			||||||
		{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
 | 
							{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
 | 
				
			||||||
	elsif ( ($_ =~ /^pkcs12$/))
 | 
						elsif ( ($_ =~ /^pkcs12$/))
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								apps/rand.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/rand.c
									
									
									
									
									
								
							@@ -76,7 +76,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	int i, r, ret = 1;
 | 
						int i, r, ret = 1;
 | 
				
			||||||
	int badopt;
 | 
						int badopt;
 | 
				
			||||||
	char *outfile = NULL;
 | 
						char *outfile = NULL;
 | 
				
			||||||
@@ -84,7 +86,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	int base64 = 0;
 | 
						int base64 = 0;
 | 
				
			||||||
	BIO *out = NULL;
 | 
						BIO *out = NULL;
 | 
				
			||||||
	int num = -1;
 | 
						int num = -1;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -106,6 +110,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			else
 | 
								else
 | 
				
			||||||
				badopt = 1;
 | 
									badopt = 1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(argv[i], "-engine") == 0)
 | 
							else if (strcmp(argv[i], "-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if ((argv[i+1] != NULL) && (engine == NULL))
 | 
								if ((argv[i+1] != NULL) && (engine == NULL))
 | 
				
			||||||
@@ -113,6 +118,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			else
 | 
								else
 | 
				
			||||||
				badopt = 1;
 | 
									badopt = 1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(argv[i], "-rand") == 0)
 | 
							else if (strcmp(argv[i], "-rand") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if ((argv[i+1] != NULL) && (inrand == NULL))
 | 
								if ((argv[i+1] != NULL) && (inrand == NULL))
 | 
				
			||||||
@@ -150,13 +156,17 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf(bio_err, "Usage: rand [options] num\n");
 | 
							BIO_printf(bio_err, "Usage: rand [options] num\n");
 | 
				
			||||||
		BIO_printf(bio_err, "where options are\n");
 | 
							BIO_printf(bio_err, "where options are\n");
 | 
				
			||||||
		BIO_printf(bio_err, "-out file             - write to file\n");
 | 
							BIO_printf(bio_err, "-out file             - write to file\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err, "-engine e             - use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err, "-engine e             - use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
							BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
		BIO_printf(bio_err, "-base64               - encode output\n");
 | 
							BIO_printf(bio_err, "-base64               - encode output\n");
 | 
				
			||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	app_RAND_load_file(NULL, bio_err, (inrand != NULL));
 | 
						app_RAND_load_file(NULL, bio_err, (inrand != NULL));
 | 
				
			||||||
	if (inrand != NULL)
 | 
						if (inrand != NULL)
 | 
				
			||||||
@@ -213,5 +223,5 @@ err:
 | 
				
			|||||||
	if (out)
 | 
						if (out)
 | 
				
			||||||
		BIO_free_all(out);
 | 
							BIO_free_all(out);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										148
									
								
								apps/req.c
									
									
									
									
									
								
							
							
						
						
									
										148
									
								
								apps/req.c
									
									
									
									
									
								
							@@ -135,7 +135,6 @@ static int req_check_len(int len,int n_min,int n_max);
 | 
				
			|||||||
static int check_end(char *str, char *end);
 | 
					static int check_end(char *str, char *end);
 | 
				
			||||||
#ifndef MONOLITH
 | 
					#ifndef MONOLITH
 | 
				
			||||||
static char *default_config_file=NULL;
 | 
					static char *default_config_file=NULL;
 | 
				
			||||||
static CONF *config=NULL;
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
static CONF *req_conf=NULL;
 | 
					static CONF *req_conf=NULL;
 | 
				
			||||||
static int batch=0;
 | 
					static int batch=0;
 | 
				
			||||||
@@ -143,7 +142,6 @@ static int batch=0;
 | 
				
			|||||||
#define TYPE_RSA	1
 | 
					#define TYPE_RSA	1
 | 
				
			||||||
#define TYPE_DSA	2
 | 
					#define TYPE_DSA	2
 | 
				
			||||||
#define TYPE_DH		3
 | 
					#define TYPE_DH		3
 | 
				
			||||||
#define TYPE_EC		4
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
int MAIN(int, char **);
 | 
					int MAIN(int, char **);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -152,9 +150,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
	DSA *dsa_params=NULL;
 | 
						DSA *dsa_params=NULL;
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	EC_KEY *ec_params = NULL;
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	unsigned long nmflag = 0, reqflag = 0;
 | 
						unsigned long nmflag = 0, reqflag = 0;
 | 
				
			||||||
	int ex=1,x509=0,days=30;
 | 
						int ex=1,x509=0,days=30;
 | 
				
			||||||
@@ -167,7 +162,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
 | 
						int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
 | 
				
			||||||
	int nodes=0,kludge=0,newhdr=0,subject=0,pubkey=0;
 | 
						int nodes=0,kludge=0,newhdr=0,subject=0,pubkey=0;
 | 
				
			||||||
	char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
 | 
						char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	char *extensions = NULL;
 | 
						char *extensions = NULL;
 | 
				
			||||||
	char *req_exts = NULL;
 | 
						char *req_exts = NULL;
 | 
				
			||||||
	const EVP_CIPHER *cipher=NULL;
 | 
						const EVP_CIPHER *cipher=NULL;
 | 
				
			||||||
@@ -215,11 +212,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			outformat=str2fmt(*(++argv));
 | 
								outformat=str2fmt(*(++argv));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-key") == 0)
 | 
							else if (strcmp(*argv,"-key") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -323,56 +322,8 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				BIO_free(in);
 | 
									BIO_free(in);
 | 
				
			||||||
				in=NULL;
 | 
					 | 
				
			||||||
				newkey=BN_num_bits(dsa_params->p);
 | 
									newkey=BN_num_bits(dsa_params->p);
 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			else 
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
				if (strncmp("ec:",p,3) == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				X509 *xtmp=NULL;
 | 
					 | 
				
			||||||
				EVP_PKEY *dtmp;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				pkey_type=TYPE_EC;
 | 
					 | 
				
			||||||
				p+=3;
 | 
					 | 
				
			||||||
				if ((in=BIO_new_file(p,"r")) == NULL)
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					perror(p);
 | 
					 | 
				
			||||||
					goto end;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				if ((ec_params = EC_KEY_new()) == NULL)
 | 
					 | 
				
			||||||
					goto end;
 | 
					 | 
				
			||||||
				if ((ec_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL)
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					if (ec_params)
 | 
					 | 
				
			||||||
						EC_KEY_free(ec_params);
 | 
					 | 
				
			||||||
					ERR_clear_error();
 | 
					 | 
				
			||||||
					(void)BIO_reset(in);
 | 
					 | 
				
			||||||
					if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
 | 
					 | 
				
			||||||
						{	
 | 
					 | 
				
			||||||
						BIO_printf(bio_err,"unable to load EC parameters from file\n");
 | 
					 | 
				
			||||||
						goto end;
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
					if ((dtmp=X509_get_pubkey(xtmp))==NULL)
 | 
					 | 
				
			||||||
						goto end;
 | 
					 | 
				
			||||||
					if (dtmp->type == EVP_PKEY_EC)
 | 
					 | 
				
			||||||
						ec_params = ECParameters_dup(dtmp->pkey.eckey);
 | 
					 | 
				
			||||||
					EVP_PKEY_free(dtmp);
 | 
					 | 
				
			||||||
					X509_free(xtmp);
 | 
					 | 
				
			||||||
					if (ec_params == NULL)
 | 
					 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
						BIO_printf(bio_err,"Certificate does not contain EC parameters\n");
 | 
					 | 
				
			||||||
						goto end;
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				BIO_free(in);
 | 
					 | 
				
			||||||
				in=NULL;
 | 
									in=NULL;
 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				newkey = EC_GROUP_get_degree(ec_params->group);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			else 
 | 
								else 
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -384,9 +335,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
				{
 | 
									pkey_type=TYPE_RSA;
 | 
				
			||||||
				goto bad;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
			newreq=1;
 | 
								newreq=1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@@ -483,7 +432,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -verify        verify signature on REQ\n");
 | 
							BIO_printf(bio_err," -verify        verify signature on REQ\n");
 | 
				
			||||||
		BIO_printf(bio_err," -modulus       RSA modulus\n");
 | 
							BIO_printf(bio_err," -modulus       RSA modulus\n");
 | 
				
			||||||
		BIO_printf(bio_err," -nodes         don't encrypt the output key\n");
 | 
							BIO_printf(bio_err," -nodes         don't encrypt the output key\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e      use engine e, possibly a hardware device\n");
 | 
							BIO_printf(bio_err," -engine e      use engine e, possibly a hardware device\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf(bio_err," -subject       output the request's subject\n");
 | 
							BIO_printf(bio_err," -subject       output the request's subject\n");
 | 
				
			||||||
		BIO_printf(bio_err," -passin        private key password source\n");
 | 
							BIO_printf(bio_err," -passin        private key password source\n");
 | 
				
			||||||
		BIO_printf(bio_err," -key file      use the private key contained in file\n");
 | 
							BIO_printf(bio_err," -key file      use the private key contained in file\n");
 | 
				
			||||||
@@ -494,9 +445,6 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err,"                the random number generator\n");
 | 
							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 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 dsa:file generate a new DSA key, parameters taken from CA in 'file'\n");
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
		BIO_printf(bio_err," -newkey ec:file generate a new EC key, parameters taken from CA in 'file'\n");
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
		BIO_printf(bio_err," -[digest]      Digest to sign with (md5, sha1, md2, mdc2, md4)\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," -config file   request template file.\n");
 | 
				
			||||||
		BIO_printf(bio_err," -subj arg      set or modify request subject\n");
 | 
							BIO_printf(bio_err," -subj arg      set or modify request subject\n");
 | 
				
			||||||
@@ -511,7 +459,7 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n");
 | 
							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," -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," -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");
 | 
							BIO_printf(bio_err," -reqopt arg    - various request text options\n\n");
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -675,7 +623,9 @@ bad:
 | 
				
			|||||||
	if ((in == NULL) || (out == NULL))
 | 
						if ((in == NULL) || (out == NULL))
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (keyfile != NULL)
 | 
						if (keyfile != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -687,8 +637,7 @@ bad:
 | 
				
			|||||||
			   message */
 | 
								   message */
 | 
				
			||||||
			goto end;
 | 
								goto end;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || 
 | 
							if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA)
 | 
				
			||||||
			EVP_PKEY_type(pkey->type) == EVP_PKEY_EC)
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
 | 
								char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
 | 
				
			||||||
			if (randfile == NULL)
 | 
								if (randfile == NULL)
 | 
				
			||||||
@@ -712,15 +661,14 @@ bad:
 | 
				
			|||||||
				newkey=DEFAULT_KEY_LENGTH;
 | 
									newkey=DEFAULT_KEY_LENGTH;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (newkey < MIN_KEY_LENGTH && (pkey_type == TYPE_RSA || pkey_type == TYPE_DSA))
 | 
							if (newkey < MIN_KEY_LENGTH)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err,"private key length is too short,\n");
 | 
								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);
 | 
								BIO_printf(bio_err,"it needs to be at least %d bits, not %d\n",MIN_KEY_LENGTH,newkey);
 | 
				
			||||||
			goto end;
 | 
								goto end;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		BIO_printf(bio_err,"Generating a %d bit %s private key\n",
 | 
							BIO_printf(bio_err,"Generating a %d bit %s private key\n",
 | 
				
			||||||
			newkey,(pkey_type == TYPE_RSA)?"RSA":
 | 
								newkey,(pkey_type == TYPE_RSA)?"RSA":"DSA");
 | 
				
			||||||
			(pkey_type == TYPE_DSA)?"DSA":"EC");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((pkey=EVP_PKEY_new()) == NULL) goto end;
 | 
							if ((pkey=EVP_PKEY_new()) == NULL) goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -742,15 +690,6 @@ bad:
 | 
				
			|||||||
			dsa_params=NULL;
 | 
								dsa_params=NULL;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
			if (pkey_type == TYPE_EC)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (!EC_KEY_generate_key(ec_params)) goto end;
 | 
					 | 
				
			||||||
			if (!EVP_PKEY_assign_EC_KEY(pkey, ec_params)) 
 | 
					 | 
				
			||||||
				goto end;
 | 
					 | 
				
			||||||
			ec_params = NULL;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		app_RAND_write_file(randfile, bio_err);
 | 
							app_RAND_write_file(randfile, bio_err);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -856,10 +795,6 @@ loop:
 | 
				
			|||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
		if (pkey->type == EVP_PKEY_DSA)
 | 
							if (pkey->type == EVP_PKEY_DSA)
 | 
				
			||||||
			digest=EVP_dss1();
 | 
								digest=EVP_dss1();
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
		if (pkey->type == EVP_PKEY_EC)
 | 
					 | 
				
			||||||
			digest=EVP_ecdsa();
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		if (req == NULL)
 | 
							if (req == NULL)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -889,14 +824,16 @@ loop:
 | 
				
			|||||||
			if ((x509ss=X509_new()) == NULL) goto end;
 | 
								if ((x509ss=X509_new()) == NULL) goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/* Set version to V3 */
 | 
								/* Set version to V3 */
 | 
				
			||||||
			if(!X509_set_version(x509ss, 2)) goto end;
 | 
								if(extensions && !X509_set_version(x509ss, 2)) goto end;
 | 
				
			||||||
			if (serial)
 | 
								if (serial)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				if (!X509_set_serialNumber(x509ss, serial)) goto end;
 | 
									if (!X509_set_serialNumber(x509ss, serial)) goto end;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				if (!ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L)) goto end;
 | 
									if (!rand_serial(NULL,
 | 
				
			||||||
 | 
										X509_get_serialNumber(x509ss)))
 | 
				
			||||||
 | 
											goto end;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
 | 
								if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
 | 
				
			||||||
@@ -1145,12 +1082,9 @@ end:
 | 
				
			|||||||
	OBJ_cleanup();
 | 
						OBJ_cleanup();
 | 
				
			||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
	if (dsa_params != NULL) DSA_free(dsa_params);
 | 
						if (dsa_params != NULL) DSA_free(dsa_params);
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	if (ec_params != NULL) EC_KEY_free(ec_params);
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ex);
 | 
						OPENSSL_EXIT(ex);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
 | 
					static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
 | 
				
			||||||
@@ -1291,33 +1225,39 @@ start:		for (;;)
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			/* If OBJ not recognised ignore it */
 | 
								/* If OBJ not recognised ignore it */
 | 
				
			||||||
			if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
 | 
								if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
 | 
				
			||||||
 | 
								if (BIO_snprintf(buf,sizeof buf,"%s_default",v->name)
 | 
				
			||||||
			if(strlen(v->name) > sizeof buf-9)
 | 
									>= sizeof buf)
 | 
				
			||||||
			   {
 | 
								   {
 | 
				
			||||||
			   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
								   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
				
			||||||
			   return 0;
 | 
								   return 0;
 | 
				
			||||||
			   }
 | 
								   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			sprintf(buf,"%s_default",v->name);
 | 
					 | 
				
			||||||
			if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
								if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				ERR_clear_error();
 | 
									ERR_clear_error();
 | 
				
			||||||
				def="";
 | 
									def="";
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			sprintf(buf,"%s_value",v->name);
 | 
									
 | 
				
			||||||
 | 
								BIO_snprintf(buf,sizeof buf,"%s_value",v->name);
 | 
				
			||||||
			if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
								if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				ERR_clear_error();
 | 
									ERR_clear_error();
 | 
				
			||||||
				value=NULL;
 | 
									value=NULL;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			sprintf(buf,"%s_min",v->name);
 | 
								BIO_snprintf(buf,sizeof buf,"%s_min",v->name);
 | 
				
			||||||
			if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
 | 
								if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
									ERR_clear_error();
 | 
				
			||||||
				n_min = -1;
 | 
									n_min = -1;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			sprintf(buf,"%s_max",v->name);
 | 
								BIO_snprintf(buf,sizeof buf,"%s_max",v->name);
 | 
				
			||||||
			if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
 | 
								if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
									ERR_clear_error();
 | 
				
			||||||
				n_max = -1;
 | 
									n_max = -1;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (!add_DN_object(subj,v->value,def,value,nid,
 | 
								if (!add_DN_object(subj,v->value,def,value,nid,
 | 
				
			||||||
				n_min,n_max, chtype))
 | 
									n_min,n_max, chtype))
 | 
				
			||||||
@@ -1350,13 +1290,13 @@ start2:			for (;;)
 | 
				
			|||||||
				if ((nid=OBJ_txt2nid(type)) == NID_undef)
 | 
									if ((nid=OBJ_txt2nid(type)) == NID_undef)
 | 
				
			||||||
					goto start2;
 | 
										goto start2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if(strlen(v->name) > sizeof buf-9)
 | 
									if (BIO_snprintf(buf,sizeof buf,"%s_default",type)
 | 
				
			||||||
 | 
										>= sizeof buf)
 | 
				
			||||||
				   {
 | 
									   {
 | 
				
			||||||
				   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
									   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
				
			||||||
				   return 0;
 | 
									   return 0;
 | 
				
			||||||
				   }
 | 
									   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				sprintf(buf,"%s_default",type);
 | 
					 | 
				
			||||||
				if ((def=NCONF_get_string(req_conf,attr_sect,buf))
 | 
									if ((def=NCONF_get_string(req_conf,attr_sect,buf))
 | 
				
			||||||
					== NULL)
 | 
										== NULL)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
@@ -1365,7 +1305,7 @@ start2:			for (;;)
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
				sprintf(buf,"%s_value",type);
 | 
									BIO_snprintf(buf,sizeof buf,"%s_value",type);
 | 
				
			||||||
				if ((value=NCONF_get_string(req_conf,attr_sect,buf))
 | 
									if ((value=NCONF_get_string(req_conf,attr_sect,buf))
 | 
				
			||||||
					== NULL)
 | 
										== NULL)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
@@ -1373,11 +1313,11 @@ start2:			for (;;)
 | 
				
			|||||||
					value=NULL;
 | 
										value=NULL;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				sprintf(buf,"%s_min",type);
 | 
									BIO_snprintf(buf,sizeof buf,"%s_min",type);
 | 
				
			||||||
				if (!NCONF_get_number(req_conf,attr_sect,buf, &n_min))
 | 
									if (!NCONF_get_number(req_conf,attr_sect,buf, &n_min))
 | 
				
			||||||
					n_min = -1;
 | 
										n_min = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				sprintf(buf,"%s_max",type);
 | 
									BIO_snprintf(buf,sizeof buf,"%s_max",type);
 | 
				
			||||||
				if (!NCONF_get_number(req_conf,attr_sect,buf, &n_max))
 | 
									if (!NCONF_get_number(req_conf,attr_sect,buf, &n_max))
 | 
				
			||||||
					n_max = -1;
 | 
										n_max = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1459,9 +1399,8 @@ start:
 | 
				
			|||||||
	(void)BIO_flush(bio_err);
 | 
						(void)BIO_flush(bio_err);
 | 
				
			||||||
	if(value != NULL)
 | 
						if(value != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		OPENSSL_assert(strlen(value) < sizeof buf-2);
 | 
							BUF_strlcpy(buf,value,sizeof buf);
 | 
				
			||||||
		strcpy(buf,value);
 | 
							BUF_strlcat(buf,"\n",sizeof buf);
 | 
				
			||||||
		strcat(buf,"\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err,"%s\n",value);
 | 
							BIO_printf(bio_err,"%s\n",value);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
@@ -1483,8 +1422,8 @@ start:
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
		if ((def == NULL) || (def[0] == '\0'))
 | 
							if ((def == NULL) || (def[0] == '\0'))
 | 
				
			||||||
			return(1);
 | 
								return(1);
 | 
				
			||||||
		strcpy(buf,def);
 | 
							BUF_strlcpy(buf,def,sizeof buf);
 | 
				
			||||||
		strcat(buf,"\n");
 | 
							BUF_strlcat(buf,"\n",sizeof buf);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
 | 
						else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1518,9 +1457,8 @@ start:
 | 
				
			|||||||
	(void)BIO_flush(bio_err);
 | 
						(void)BIO_flush(bio_err);
 | 
				
			||||||
	if (value != NULL)
 | 
						if (value != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		OPENSSL_assert(strlen(value) < sizeof buf-2);
 | 
							BUF_strlcpy(buf,value,sizeof buf);
 | 
				
			||||||
		strcpy(buf,value);
 | 
							BUF_strlcat(buf,"\n",sizeof buf);
 | 
				
			||||||
		strcat(buf,"\n");
 | 
					 | 
				
			||||||
		BIO_printf(bio_err,"%s\n",value);
 | 
							BIO_printf(bio_err,"%s\n",value);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
@@ -1542,8 +1480,8 @@ start:
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
		if ((def == NULL) || (def[0] == '\0'))
 | 
							if ((def == NULL) || (def[0] == '\0'))
 | 
				
			||||||
			return(1);
 | 
								return(1);
 | 
				
			||||||
		strcpy(buf,def);
 | 
							BUF_strlcpy(buf,def,sizeof buf);
 | 
				
			||||||
		strcat(buf,"\n");
 | 
							BUF_strlcat(buf,"\n",sizeof buf);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
 | 
						else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								apps/rsa.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								apps/rsa.c
									
									
									
									
									
								
							@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	char *infile,*outfile,*prog;
 | 
						char *infile,*outfile,*prog;
 | 
				
			||||||
	char *passargin = NULL, *passargout = NULL;
 | 
						char *passargin = NULL, *passargout = NULL;
 | 
				
			||||||
	char *passin = NULL, *passout = NULL;
 | 
						char *passin = NULL, *passout = NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	int modulus=0;
 | 
						int modulus=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
@@ -156,11 +158,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			passargout= *(++argv);
 | 
								passargout= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-sgckey") == 0)
 | 
							else if (strcmp(*argv,"-sgckey") == 0)
 | 
				
			||||||
			sgckey=1;
 | 
								sgckey=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-pubin") == 0)
 | 
							else if (strcmp(*argv,"-pubin") == 0)
 | 
				
			||||||
@@ -212,13 +216,17 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -check          verify key consistency\n");
 | 
							BIO_printf(bio_err," -check          verify key consistency\n");
 | 
				
			||||||
		BIO_printf(bio_err," -pubin          expect a public key in input file\n");
 | 
							BIO_printf(bio_err," -pubin          expect a public key in input file\n");
 | 
				
			||||||
		BIO_printf(bio_err," -pubout         output a public key\n");
 | 
							BIO_printf(bio_err," -pubout         output a public key\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ERR_load_crypto_strings();
 | 
						ERR_load_crypto_strings();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
						if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
							BIO_printf(bio_err, "Error getting passwords\n");
 | 
				
			||||||
@@ -369,7 +377,7 @@ end:
 | 
				
			|||||||
	if(passin) OPENSSL_free(passin);
 | 
						if(passin) OPENSSL_free(passin);
 | 
				
			||||||
	if(passout) OPENSSL_free(passout);
 | 
						if(passout) OPENSSL_free(passout);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#else /* !OPENSSL_NO_RSA */
 | 
					#else /* !OPENSSL_NO_RSA */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,7 +85,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
	BIO *in = NULL, *out = NULL;
 | 
						BIO *in = NULL, *out = NULL;
 | 
				
			||||||
	char *infile = NULL, *outfile = NULL;
 | 
						char *infile = NULL, *outfile = NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine = NULL;
 | 
						char *engine = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	char *keyfile = NULL;
 | 
						char *keyfile = NULL;
 | 
				
			||||||
	char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
 | 
						char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
 | 
				
			||||||
	int keyform = FORMAT_PEM;
 | 
						int keyform = FORMAT_PEM;
 | 
				
			||||||
@@ -95,6 +97,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	EVP_PKEY *pkey = NULL;
 | 
						EVP_PKEY *pkey = NULL;
 | 
				
			||||||
	RSA *rsa = NULL;
 | 
						RSA *rsa = NULL;
 | 
				
			||||||
	unsigned char *rsa_in = NULL, *rsa_out = NULL, pad;
 | 
						unsigned char *rsa_in = NULL, *rsa_out = NULL, pad;
 | 
				
			||||||
 | 
						char *passargin = NULL, *passin = NULL;
 | 
				
			||||||
	int rsa_inlen, rsa_outlen = 0;
 | 
						int rsa_inlen, rsa_outlen = 0;
 | 
				
			||||||
	int keysize;
 | 
						int keysize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -122,12 +125,17 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		} else if(!strcmp(*argv, "-inkey")) {
 | 
							} else if(!strcmp(*argv, "-inkey")) {
 | 
				
			||||||
			if (--argc < 1) badarg = 1;
 | 
								if (--argc < 1) badarg = 1;
 | 
				
			||||||
			keyfile = *(++argv);
 | 
								keyfile = *(++argv);
 | 
				
			||||||
 | 
							} else if (!strcmp(*argv,"-passin")) {
 | 
				
			||||||
 | 
								if (--argc < 1) badarg = 1;
 | 
				
			||||||
 | 
								passargin= *(++argv);
 | 
				
			||||||
		} else if (strcmp(*argv,"-keyform") == 0) {
 | 
							} else if (strcmp(*argv,"-keyform") == 0) {
 | 
				
			||||||
			if (--argc < 1) badarg = 1;
 | 
								if (--argc < 1) badarg = 1;
 | 
				
			||||||
			keyform=str2fmt(*(++argv));
 | 
								keyform=str2fmt(*(++argv));
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		} else if(!strcmp(*argv, "-engine")) {
 | 
							} else if(!strcmp(*argv, "-engine")) {
 | 
				
			||||||
			if (--argc < 1) badarg = 1;
 | 
								if (--argc < 1) badarg = 1;
 | 
				
			||||||
			engine = *(++argv);
 | 
								engine = *(++argv);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		} else if(!strcmp(*argv, "-pubin")) {
 | 
							} else if(!strcmp(*argv, "-pubin")) {
 | 
				
			||||||
			key_type = KEY_PUBKEY;
 | 
								key_type = KEY_PUBKEY;
 | 
				
			||||||
		} else if(!strcmp(*argv, "-certin")) {
 | 
							} else if(!strcmp(*argv, "-certin")) {
 | 
				
			||||||
@@ -162,7 +170,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
 | 
				
			||||||
 | 
							BIO_printf(bio_err, "Error getting password\n");
 | 
				
			||||||
 | 
							goto end;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* FIXME: seed PRNG only if needed */
 | 
					/* FIXME: seed PRNG only if needed */
 | 
				
			||||||
	app_RAND_load_file(NULL, bio_err, 0);
 | 
						app_RAND_load_file(NULL, bio_err, 0);
 | 
				
			||||||
@@ -170,7 +184,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	switch(key_type) {
 | 
						switch(key_type) {
 | 
				
			||||||
		case KEY_PRIVKEY:
 | 
							case KEY_PRIVKEY:
 | 
				
			||||||
		pkey = load_key(bio_err, keyfile, keyform, 0,
 | 
							pkey = load_key(bio_err, keyfile, keyform, 0,
 | 
				
			||||||
			NULL, e, "Private Key");
 | 
								passin, e, "Private Key");
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case KEY_PUBKEY:
 | 
							case KEY_PUBKEY:
 | 
				
			||||||
@@ -284,6 +298,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	BIO_free_all(out);
 | 
						BIO_free_all(out);
 | 
				
			||||||
	if(rsa_in) OPENSSL_free(rsa_in);
 | 
						if(rsa_in) OPENSSL_free(rsa_in);
 | 
				
			||||||
	if(rsa_out) OPENSSL_free(rsa_out);
 | 
						if(rsa_out) OPENSSL_free(rsa_out);
 | 
				
			||||||
 | 
						if(passin) OPENSSL_free(passin);
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -305,7 +320,10 @@ static void usage()
 | 
				
			|||||||
	BIO_printf(bio_err, "-encrypt        encrypt with public key\n");
 | 
						BIO_printf(bio_err, "-encrypt        encrypt with public key\n");
 | 
				
			||||||
	BIO_printf(bio_err, "-decrypt        decrypt with private key\n");
 | 
						BIO_printf(bio_err, "-decrypt        decrypt with private key\n");
 | 
				
			||||||
	BIO_printf(bio_err, "-hexdump        hex dump output\n");
 | 
						BIO_printf(bio_err, "-hexdump        hex dump output\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	BIO_printf(bio_err, "-engine e       use engine e, possibly a hardware device.\n");
 | 
						BIO_printf(bio_err, "-engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
						BIO_printf (bio_err, "-passin arg    pass phrase source\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -112,6 +112,14 @@
 | 
				
			|||||||
#include <sys/types.h>
 | 
					#include <sys/types.h>
 | 
				
			||||||
#include <openssl/opensslconf.h>
 | 
					#include <openssl/opensslconf.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
 | 
					#include <conio.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef OPENSSL_SYS_MSDOS
 | 
				
			||||||
 | 
					#define _kbhit kbhit
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
 | 
					#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
 | 
				
			||||||
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
 | 
					/* VAX C does not defined fd_set and friends, but it's actually quite simple */
 | 
				
			||||||
/* These definitions are borrowed from SOCKETSHR.	/Richard Levitte */
 | 
					/* These definitions are borrowed from SOCKETSHR.	/Richard Levitte */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -136,10 +136,6 @@ typedef unsigned int u_int;
 | 
				
			|||||||
#include <openssl/rand.h>
 | 
					#include <openssl/rand.h>
 | 
				
			||||||
#include "s_apps.h"
 | 
					#include "s_apps.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					 | 
				
			||||||
#include <conio.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef OPENSSL_SYS_WINCE
 | 
					#ifdef OPENSSL_SYS_WINCE
 | 
				
			||||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
					/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
				
			||||||
#ifdef fileno
 | 
					#ifdef fileno
 | 
				
			||||||
@@ -221,8 +217,10 @@ static void sc_usage(void)
 | 
				
			|||||||
	BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
 | 
						BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
 | 
				
			||||||
	BIO_printf(bio_err,"                 for those protocols that support it, where\n");
 | 
						BIO_printf(bio_err,"                 for those protocols that support it, where\n");
 | 
				
			||||||
	BIO_printf(bio_err,"                 'prot' defines which one to assume.  Currently,\n");
 | 
						BIO_printf(bio_err,"                 'prot' defines which one to assume.  Currently,\n");
 | 
				
			||||||
	BIO_printf(bio_err,"                 only \"smtp\" is supported.\n");
 | 
						BIO_printf(bio_err,"                 only \"smtp\" and \"pop3\" are supported.\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 | 
						BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
						BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -249,14 +247,16 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
 | 
						int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
 | 
				
			||||||
	SSL_CTX *ctx=NULL;
 | 
						SSL_CTX *ctx=NULL;
 | 
				
			||||||
	int ret=1,in_init=1,i,nbio_test=0;
 | 
						int ret=1,in_init=1,i,nbio_test=0;
 | 
				
			||||||
	int smtp_starttls = 0;
 | 
						int starttls_proto = 0;
 | 
				
			||||||
	int prexit = 0, vflags = 0;
 | 
						int prexit = 0, vflags = 0;
 | 
				
			||||||
	SSL_METHOD *meth=NULL;
 | 
						SSL_METHOD *meth=NULL;
 | 
				
			||||||
	BIO *sbio;
 | 
						BIO *sbio;
 | 
				
			||||||
	char *inrand=NULL;
 | 
						char *inrand=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine_id=NULL;
 | 
						char *engine_id=NULL;
 | 
				
			||||||
	ENGINE *e=NULL;
 | 
						ENGINE *e=NULL;
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					#endif
 | 
				
			||||||
 | 
					#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
	struct timeval tv;
 | 
						struct timeval tv;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -411,15 +411,19 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			++argv;
 | 
								++argv;
 | 
				
			||||||
			if (strcmp(*argv,"smtp") == 0)
 | 
								if (strcmp(*argv,"smtp") == 0)
 | 
				
			||||||
				smtp_starttls = 1;
 | 
									starttls_proto = 1;
 | 
				
			||||||
 | 
								else if (strcmp(*argv,"pop3") == 0)
 | 
				
			||||||
 | 
									starttls_proto = 2;
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				goto bad;
 | 
									goto bad;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if	(strcmp(*argv,"-engine") == 0)
 | 
							else if	(strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine_id = *(++argv);
 | 
								engine_id = *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
							else if (strcmp(*argv,"-rand") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -444,7 +448,9 @@ bad:
 | 
				
			|||||||
	OpenSSL_add_ssl_algorithms();
 | 
						OpenSSL_add_ssl_algorithms();
 | 
				
			||||||
	SSL_load_error_strings();
 | 
						SSL_load_error_strings();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine_id, 1);
 | 
					        e = setup_engine(bio_err, engine_id, 1);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
 | 
						if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
 | 
				
			||||||
		&& !RAND_status())
 | 
							&& !RAND_status())
 | 
				
			||||||
@@ -579,12 +585,18 @@ re_start:
 | 
				
			|||||||
	sbuf_off=0;
 | 
						sbuf_off=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* This is an ugly hack that does a lot of assumptions */
 | 
						/* This is an ugly hack that does a lot of assumptions */
 | 
				
			||||||
	if (smtp_starttls)
 | 
						if (starttls_proto == 1)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		BIO_read(sbio,mbuf,BUFSIZZ);
 | 
							BIO_read(sbio,mbuf,BUFSIZZ);
 | 
				
			||||||
		BIO_printf(sbio,"STARTTLS\r\n");
 | 
							BIO_printf(sbio,"STARTTLS\r\n");
 | 
				
			||||||
		BIO_read(sbio,sbuf,BUFSIZZ);
 | 
							BIO_read(sbio,sbuf,BUFSIZZ);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						if (starttls_proto == 2)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_read(sbio,mbuf,BUFSIZZ);
 | 
				
			||||||
 | 
							BIO_printf(sbio,"STLS\r\n");
 | 
				
			||||||
 | 
							BIO_read(sbio,sbuf,BUFSIZZ);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (;;)
 | 
						for (;;)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -605,11 +617,11 @@ re_start:
 | 
				
			|||||||
				print_stuff(bio_c_out,con,full_log);
 | 
									print_stuff(bio_c_out,con,full_log);
 | 
				
			||||||
				if (full_log > 0) full_log--;
 | 
									if (full_log > 0) full_log--;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (smtp_starttls)
 | 
									if (starttls_proto)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
					BIO_printf(bio_err,"%s",mbuf);
 | 
										BIO_printf(bio_err,"%s",mbuf);
 | 
				
			||||||
					/* We don't need to know any more */
 | 
										/* We don't need to know any more */
 | 
				
			||||||
					smtp_starttls = 0;
 | 
										starttls_proto = 0;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (reconnect)
 | 
									if (reconnect)
 | 
				
			||||||
@@ -628,7 +640,7 @@ re_start:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (!ssl_pending)
 | 
							if (!ssl_pending)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
#ifndef OPENSSL_SYS_WINDOWS
 | 
					#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
			if (tty_on)
 | 
								if (tty_on)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				if (read_tty)  FD_SET(fileno(stdin),&readfds);
 | 
									if (read_tty)  FD_SET(fileno(stdin),&readfds);
 | 
				
			||||||
@@ -655,8 +667,8 @@ re_start:
 | 
				
			|||||||
			 * will choke the compiler: if you do have a cast then
 | 
								 * will choke the compiler: if you do have a cast then
 | 
				
			||||||
			 * you can either go for (int *) or (void *).
 | 
								 * you can either go for (int *) or (void *).
 | 
				
			||||||
			 */
 | 
								 */
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
			/* Under Windows we make the assumption that we can
 | 
					                        /* Under Windows/DOS we make the assumption that we can
 | 
				
			||||||
			 * always write to the tty: therefore if we need to
 | 
								 * always write to the tty: therefore if we need to
 | 
				
			||||||
			 * write to the tty we just fall through. Otherwise
 | 
								 * write to the tty we just fall through. Otherwise
 | 
				
			||||||
			 * we timeout the select every second and see if there
 | 
								 * we timeout the select every second and see if there
 | 
				
			||||||
@@ -670,7 +682,7 @@ re_start:
 | 
				
			|||||||
					tv.tv_usec = 0;
 | 
										tv.tv_usec = 0;
 | 
				
			||||||
					i=select(width,(void *)&readfds,(void *)&writefds,
 | 
										i=select(width,(void *)&readfds,(void *)&writefds,
 | 
				
			||||||
						 NULL,&tv);
 | 
											 NULL,&tv);
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINCE
 | 
					#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
					if(!i && (!_kbhit() || !read_tty) ) continue;
 | 
										if(!i && (!_kbhit() || !read_tty) ) continue;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
					if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
 | 
										if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
 | 
				
			||||||
@@ -839,8 +851,8 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINCE
 | 
					#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
		else if (_kbhit())
 | 
							else if (_kbhit())
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
		else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
 | 
							else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
 | 
				
			||||||
@@ -908,16 +920,16 @@ end:
 | 
				
			|||||||
	if (con != NULL) SSL_free(con);
 | 
						if (con != NULL) SSL_free(con);
 | 
				
			||||||
	if (con2 != NULL) SSL_free(con2);
 | 
						if (con2 != NULL) SSL_free(con2);
 | 
				
			||||||
	if (ctx != NULL) SSL_CTX_free(ctx);
 | 
						if (ctx != NULL) SSL_CTX_free(ctx);
 | 
				
			||||||
	if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
 | 
						if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
 | 
				
			||||||
	if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
 | 
						if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
 | 
				
			||||||
	if (mbuf != NULL) { memset(mbuf,0,BUFSIZZ); OPENSSL_free(mbuf); }
 | 
						if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
 | 
				
			||||||
	if (bio_c_out != NULL)
 | 
						if (bio_c_out != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		BIO_free(bio_c_out);
 | 
							BIO_free(bio_c_out);
 | 
				
			||||||
		bio_c_out=NULL;
 | 
							bio_c_out=NULL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										118
									
								
								apps/s_server.c
									
									
									
									
									
								
							
							
						
						
									
										118
									
								
								apps/s_server.c
									
									
									
									
									
								
							@@ -108,11 +108,6 @@
 | 
				
			|||||||
 * Hudson (tjh@cryptsoft.com).
 | 
					 * Hudson (tjh@cryptsoft.com).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
/* ====================================================================
 | 
					 | 
				
			||||||
 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
 | 
					 | 
				
			||||||
 * ECC cipher suite support in OpenSSL originally developed by 
 | 
					 | 
				
			||||||
 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <assert.h>
 | 
					#include <assert.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
@@ -145,10 +140,6 @@ typedef unsigned int u_int;
 | 
				
			|||||||
#include <openssl/rand.h>
 | 
					#include <openssl/rand.h>
 | 
				
			||||||
#include "s_apps.h"
 | 
					#include "s_apps.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					 | 
				
			||||||
#include <conio.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef OPENSSL_SYS_WINCE
 | 
					#ifdef OPENSSL_SYS_WINCE
 | 
				
			||||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
					/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
				
			||||||
#ifdef fileno
 | 
					#ifdef fileno
 | 
				
			||||||
@@ -177,7 +168,6 @@ static int generate_session_id(const SSL *ssl, unsigned char *id,
 | 
				
			|||||||
static DH *load_dh_param(char *dhfile);
 | 
					static DH *load_dh_param(char *dhfile);
 | 
				
			||||||
static DH *get_dh512(void);
 | 
					static DH *get_dh512(void);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef MONOLITH
 | 
					#ifdef MONOLITH
 | 
				
			||||||
static void s_server_init(void);
 | 
					static void s_server_init(void);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -216,7 +206,6 @@ static DH *get_dh512(void)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* static int load_CA(SSL_CTX *ctx, char *file);*/
 | 
					/* static int load_CA(SSL_CTX *ctx, char *file);*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#undef BUFSIZZ
 | 
					#undef BUFSIZZ
 | 
				
			||||||
@@ -249,7 +238,9 @@ static int s_msg=0;
 | 
				
			|||||||
static int s_quiet=0;
 | 
					static int s_quiet=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int hack=0;
 | 
					static int hack=0;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
static char *engine_id=NULL;
 | 
					static char *engine_id=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
static const char *session_id_prefix=NULL;
 | 
					static const char *session_id_prefix=NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef MONOLITH
 | 
					#ifdef MONOLITH
 | 
				
			||||||
@@ -274,7 +265,9 @@ static void s_server_init(void)
 | 
				
			|||||||
	s_msg=0;
 | 
						s_msg=0;
 | 
				
			||||||
	s_quiet=0;
 | 
						s_quiet=0;
 | 
				
			||||||
	hack=0;
 | 
						hack=0;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	engine_id=NULL;
 | 
						engine_id=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -294,11 +287,6 @@ static void sv_usage(void)
 | 
				
			|||||||
	BIO_printf(bio_err," -dkey arg     - second private key file to use (usually for DSA)\n");
 | 
						BIO_printf(bio_err," -dkey arg     - second private key file to use (usually for DSA)\n");
 | 
				
			||||||
	BIO_printf(bio_err," -dhparam arg  - DH parameter file to use, in cert file if not specified\n");
 | 
						BIO_printf(bio_err," -dhparam arg  - DH parameter file to use, in cert file if not specified\n");
 | 
				
			||||||
	BIO_printf(bio_err,"                 or a default set of parameters is used\n");
 | 
						BIO_printf(bio_err,"                 or a default set of parameters is used\n");
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	BIO_printf(bio_err," -named_curve arg  - Elliptic curve name to use for ephemeral ECDH keys.\n" \
 | 
					 | 
				
			||||||
	                   "                 Use \"openssl ecparam -list_curves\" for all names\n" \
 | 
					 | 
				
			||||||
	                   "                 (default is sect163r2).\n");
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifdef FIONBIO
 | 
					#ifdef FIONBIO
 | 
				
			||||||
	BIO_printf(bio_err," -nbio         - Run with non-blocking IO\n");
 | 
						BIO_printf(bio_err," -nbio         - Run with non-blocking IO\n");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -322,16 +310,15 @@ static void sv_usage(void)
 | 
				
			|||||||
	BIO_printf(bio_err," -no_tls1      - Just disable TLSv1\n");
 | 
						BIO_printf(bio_err," -no_tls1      - Just disable TLSv1\n");
 | 
				
			||||||
#ifndef OPENSSL_NO_DH
 | 
					#ifndef OPENSSL_NO_DH
 | 
				
			||||||
	BIO_printf(bio_err," -no_dhe       - Disable ephemeral DH\n");
 | 
						BIO_printf(bio_err," -no_dhe       - Disable ephemeral DH\n");
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	BIO_printf(bio_err," -no_ecdhe     - Disable ephemeral ECDH\n");
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	BIO_printf(bio_err," -bugs         - Turn on SSL bug compatibility\n");
 | 
						BIO_printf(bio_err," -bugs         - Turn on SSL bug compatibility\n");
 | 
				
			||||||
	BIO_printf(bio_err," -www          - Respond to a 'GET /' with a status page\n");
 | 
						BIO_printf(bio_err," -www          - Respond to a 'GET /' with a status page\n");
 | 
				
			||||||
	BIO_printf(bio_err," -WWW          - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
 | 
						BIO_printf(bio_err," -WWW          - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
 | 
				
			||||||
	BIO_printf(bio_err," -HTTP         - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
 | 
						BIO_printf(bio_err," -HTTP         - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
 | 
				
			||||||
        BIO_printf(bio_err,"                 with the assumption it contains a complete HTTP response.\n");
 | 
					        BIO_printf(bio_err,"                 with the assumption it contains a complete HTTP response.\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 | 
						BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
 | 
						BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
 | 
				
			||||||
	BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
						BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -499,14 +486,15 @@ int MAIN(int argc, char *argv[])
 | 
				
			|||||||
	char *CApath=NULL,*CAfile=NULL;
 | 
						char *CApath=NULL,*CAfile=NULL;
 | 
				
			||||||
	char *context = NULL;
 | 
						char *context = NULL;
 | 
				
			||||||
	char *dhfile = NULL;
 | 
						char *dhfile = NULL;
 | 
				
			||||||
	char *named_curve = NULL;
 | 
					 | 
				
			||||||
	int badop=0,bugs=0;
 | 
						int badop=0,bugs=0;
 | 
				
			||||||
	int ret=1;
 | 
						int ret=1;
 | 
				
			||||||
	int off=0;
 | 
						int off=0;
 | 
				
			||||||
	int no_tmp_rsa=0,no_dhe=0,no_ecdhe=0,nocert=0;
 | 
						int no_tmp_rsa=0,no_dhe=0,nocert=0;
 | 
				
			||||||
	int state=0;
 | 
						int state=0;
 | 
				
			||||||
	SSL_METHOD *meth=NULL;
 | 
						SSL_METHOD *meth=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e=NULL;
 | 
						ENGINE *e=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	char *inrand=NULL;
 | 
						char *inrand=NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
					#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
				
			||||||
@@ -584,13 +572,6 @@ int MAIN(int argc, char *argv[])
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			dhfile = *(++argv);
 | 
								dhfile = *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH		
 | 
					 | 
				
			||||||
		else if	(strcmp(*argv,"-named_curve") == 0)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
					 | 
				
			||||||
			named_curve = *(++argv);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
		else if	(strcmp(*argv,"-dcert") == 0)
 | 
							else if	(strcmp(*argv,"-dcert") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -659,8 +640,6 @@ int MAIN(int argc, char *argv[])
 | 
				
			|||||||
			{ no_tmp_rsa=1; }
 | 
								{ no_tmp_rsa=1; }
 | 
				
			||||||
		else if	(strcmp(*argv,"-no_dhe") == 0)
 | 
							else if	(strcmp(*argv,"-no_dhe") == 0)
 | 
				
			||||||
			{ no_dhe=1; }
 | 
								{ no_dhe=1; }
 | 
				
			||||||
		else if	(strcmp(*argv,"-no_ecdhe") == 0)
 | 
					 | 
				
			||||||
			{ no_ecdhe=1; }
 | 
					 | 
				
			||||||
		else if	(strcmp(*argv,"-www") == 0)
 | 
							else if	(strcmp(*argv,"-www") == 0)
 | 
				
			||||||
			{ www=1; }
 | 
								{ www=1; }
 | 
				
			||||||
		else if	(strcmp(*argv,"-WWW") == 0)
 | 
							else if	(strcmp(*argv,"-WWW") == 0)
 | 
				
			||||||
@@ -690,11 +669,13 @@ int MAIN(int argc, char *argv[])
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			session_id_prefix = *(++argv);
 | 
								session_id_prefix = *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine_id= *(++argv);
 | 
								engine_id= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
							else if (strcmp(*argv,"-rand") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
@@ -719,7 +700,9 @@ bad:
 | 
				
			|||||||
	SSL_load_error_strings();
 | 
						SSL_load_error_strings();
 | 
				
			||||||
	OpenSSL_add_ssl_algorithms();
 | 
						OpenSSL_add_ssl_algorithms();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine_id, 1);
 | 
					        e = setup_engine(bio_err, engine_id, 1);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
 | 
						if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
 | 
				
			||||||
		&& !RAND_status())
 | 
							&& !RAND_status())
 | 
				
			||||||
@@ -743,7 +726,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)
 | 
						if (nocert)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -832,59 +815,6 @@ bad:
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	if (!no_ecdhe)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		EC_KEY *ecdh=NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		ecdh = EC_KEY_new();
 | 
					 | 
				
			||||||
		if (ecdh == NULL)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"Could not create ECDH struct.\n");
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (named_curve)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			int nid = OBJ_sn2nid(named_curve);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			if (nid == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err, "unknown curve name (%s)\n", 
 | 
					 | 
				
			||||||
					named_curve);
 | 
					 | 
				
			||||||
				goto end;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			ecdh->group = EC_GROUP_new_by_nid(nid);
 | 
					 | 
				
			||||||
			if (ecdh->group == NULL)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err, "unable to create curve (%s)\n", 
 | 
					 | 
				
			||||||
					named_curve);
 | 
					 | 
				
			||||||
				goto end;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (ecdh->group != NULL)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_s_out,"Setting temp ECDH parameters\n");
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_s_out,"Using default temp ECDH parameters\n");
 | 
					 | 
				
			||||||
			ecdh->group=EC_GROUP_new_by_nid(NID_sect163r2);
 | 
					 | 
				
			||||||
			if (ecdh->group == NULL) 
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err, "unable to create curve (sect163r2)\n");
 | 
					 | 
				
			||||||
				goto end;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		(void)BIO_flush(bio_s_out);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		SSL_CTX_set_tmp_ecdh(ctx,ecdh);
 | 
					 | 
				
			||||||
		EC_KEY_free(ecdh);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	if (!set_cert_stuff(ctx,s_cert_file,s_key_file))
 | 
						if (!set_cert_stuff(ctx,s_cert_file,s_key_file))
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
	if (s_dcert_file != NULL)
 | 
						if (s_dcert_file != NULL)
 | 
				
			||||||
@@ -946,7 +876,7 @@ end:
 | 
				
			|||||||
		bio_s_out=NULL;
 | 
							bio_s_out=NULL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
 | 
					static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
 | 
				
			||||||
@@ -983,7 +913,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
				
			|||||||
	unsigned long l;
 | 
						unsigned long l;
 | 
				
			||||||
	SSL *con=NULL;
 | 
						SSL *con=NULL;
 | 
				
			||||||
	BIO *sbio;
 | 
						BIO *sbio;
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
	struct timeval tv;
 | 
						struct timeval tv;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1057,7 +987,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
				
			|||||||
		if (!read_from_sslcon)
 | 
							if (!read_from_sslcon)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			FD_ZERO(&readfds);
 | 
								FD_ZERO(&readfds);
 | 
				
			||||||
#ifndef OPENSSL_SYS_WINDOWS
 | 
					#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
			FD_SET(fileno(stdin),&readfds);
 | 
								FD_SET(fileno(stdin),&readfds);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
			FD_SET(s,&readfds);
 | 
								FD_SET(s,&readfds);
 | 
				
			||||||
@@ -1067,8 +997,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
				
			|||||||
			 * the compiler: if you do have a cast then you can either
 | 
								 * the compiler: if you do have a cast then you can either
 | 
				
			||||||
			 * go for (int *) or (void *).
 | 
								 * go for (int *) or (void *).
 | 
				
			||||||
			 */
 | 
								 */
 | 
				
			||||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
					#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
				
			||||||
			/* Under Windows we can't select on stdin: only
 | 
					                        /* Under DOS (non-djgpp) and Windows we can't select on stdin: only
 | 
				
			||||||
			 * on sockets. As a workaround we timeout the select every
 | 
								 * on sockets. As a workaround we timeout the select every
 | 
				
			||||||
			 * second and check for any keypress. In a proper Windows
 | 
								 * second and check for any keypress. In a proper Windows
 | 
				
			||||||
			 * application we wouldn't do this because it is inefficient.
 | 
								 * application we wouldn't do this because it is inefficient.
 | 
				
			||||||
@@ -1262,7 +1192,7 @@ err:
 | 
				
			|||||||
	BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
 | 
						BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
 | 
				
			||||||
	if (buf != NULL)
 | 
						if (buf != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		memset(buf,0,bufsize);
 | 
							OPENSSL_cleanse(buf,bufsize);
 | 
				
			||||||
		OPENSSL_free(buf);
 | 
							OPENSSL_free(buf);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if (ret >= 0)
 | 
						if (ret >= 0)
 | 
				
			||||||
@@ -1329,7 +1259,13 @@ static int init_ssl_connection(SSL *con)
 | 
				
			|||||||
	if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
 | 
						if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
 | 
				
			||||||
		TLS1_FLAGS_TLS_PADDING_BUG)
 | 
							TLS1_FLAGS_TLS_PADDING_BUG)
 | 
				
			||||||
		BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
 | 
							BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_KRB5
 | 
				
			||||||
 | 
						if (con->kssl_ctx->client_princ != NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
 | 
				
			||||||
 | 
								con->kssl_ctx->client_princ);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#endif /* OPENSSL_NO_KRB5 */
 | 
				
			||||||
	return(1);
 | 
						return(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,13 +62,7 @@
 | 
				
			|||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <signal.h>
 | 
					#include <signal.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef FLAT_INC
 | 
					#include <openssl/e_os2.h>
 | 
				
			||||||
#include "e_os.h"
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#include "../e_os.h"
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_SOCK
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* With IPv6, it looks like Digital has mixed up the proper order of
 | 
					/* With IPv6, it looks like Digital has mixed up the proper order of
 | 
				
			||||||
   recursive header file inclusion, resulting in the compiler complaining
 | 
					   recursive header file inclusion, resulting in the compiler complaining
 | 
				
			||||||
@@ -395,7 +389,7 @@ redoit:
 | 
				
			|||||||
			perror("OPENSSL_malloc");
 | 
								perror("OPENSSL_malloc");
 | 
				
			||||||
			return(0);
 | 
								return(0);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		strcpy(*host,h1->h_name);
 | 
							BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		h2=GetHostByName(*host);
 | 
							h2=GetHostByName(*host);
 | 
				
			||||||
		if (h2 == NULL)
 | 
							if (h2 == NULL)
 | 
				
			||||||
@@ -559,5 +553,3 @@ static struct hostent *GetHostByName(char *name)
 | 
				
			|||||||
		return(ret);
 | 
							return(ret);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -502,7 +502,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (s_www_path != NULL)
 | 
							if (s_www_path != NULL)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			sprintf(buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
 | 
								BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
 | 
				
			||||||
			SSL_write(scon,buf,strlen(buf));
 | 
								SSL_write(scon,buf,strlen(buf));
 | 
				
			||||||
			while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
 | 
								while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
 | 
				
			||||||
				bytes_read+=i;
 | 
									bytes_read+=i;
 | 
				
			||||||
@@ -557,7 +557,7 @@ next:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (s_www_path != NULL)
 | 
						if (s_www_path != NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		sprintf(buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
 | 
							BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
 | 
				
			||||||
		SSL_write(scon,buf,strlen(buf));
 | 
							SSL_write(scon,buf,strlen(buf));
 | 
				
			||||||
		while (SSL_read(scon,buf,sizeof(buf)) > 0)
 | 
							while (SSL_read(scon,buf,sizeof(buf)) > 0)
 | 
				
			||||||
			;
 | 
								;
 | 
				
			||||||
@@ -595,7 +595,7 @@ next:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (s_www_path)
 | 
							if (s_www_path)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			sprintf(buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
 | 
								BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
 | 
				
			||||||
			SSL_write(scon,buf,strlen(buf));
 | 
								SSL_write(scon,buf,strlen(buf));
 | 
				
			||||||
			while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
 | 
								while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
 | 
				
			||||||
				bytes_read+=i;
 | 
									bytes_read+=i;
 | 
				
			||||||
@@ -642,7 +642,7 @@ end:
 | 
				
			|||||||
		tm_ctx=NULL;
 | 
							tm_ctx=NULL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/***********************************************************************
 | 
					/***********************************************************************
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -273,7 +273,7 @@ end:
 | 
				
			|||||||
	if (out != NULL) BIO_free_all(out);
 | 
						if (out != NULL) BIO_free_all(out);
 | 
				
			||||||
	if (x != NULL) SSL_SESSION_free(x);
 | 
						if (x != NULL) SSL_SESSION_free(x);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static SSL_SESSION *load_sess_id(char *infile, int format)
 | 
					static SSL_SESSION *load_sess_id(char *infile, int format)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								apps/smime.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/smime.c
									
									
									
									
									
								
							@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	int need_rand = 0;
 | 
						int need_rand = 0;
 | 
				
			||||||
	int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
 | 
						int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
 | 
				
			||||||
        int keyform = FORMAT_PEM;
 | 
					        int keyform = FORMAT_PEM;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	args = argv + 1;
 | 
						args = argv + 1;
 | 
				
			||||||
	ret = 1;
 | 
						ret = 1;
 | 
				
			||||||
@@ -166,6 +168,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				flags |= PKCS7_BINARY;
 | 
									flags |= PKCS7_BINARY;
 | 
				
			||||||
		else if (!strcmp (*args, "-nosigs"))
 | 
							else if (!strcmp (*args, "-nosigs"))
 | 
				
			||||||
				flags |= PKCS7_NOSIGS;
 | 
									flags |= PKCS7_NOSIGS;
 | 
				
			||||||
 | 
							else if (!strcmp (*args, "-nooldmime"))
 | 
				
			||||||
 | 
									flags |= PKCS7_NOOLDMIMETYPE;
 | 
				
			||||||
 | 
							else if (!strcmp (*args, "-crlfeol"))
 | 
				
			||||||
 | 
									flags |= PKCS7_CRLFEOL;
 | 
				
			||||||
		else if (!strcmp (*args, "-crl_check"))
 | 
							else if (!strcmp (*args, "-crl_check"))
 | 
				
			||||||
				store_flags |= X509_V_FLAG_CRL_CHECK;
 | 
									store_flags |= X509_V_FLAG_CRL_CHECK;
 | 
				
			||||||
		else if (!strcmp (*args, "-crl_check_all"))
 | 
							else if (!strcmp (*args, "-crl_check_all"))
 | 
				
			||||||
@@ -176,11 +182,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				inrand = *args;
 | 
									inrand = *args;
 | 
				
			||||||
			} else badarg = 1;
 | 
								} else badarg = 1;
 | 
				
			||||||
			need_rand = 1;
 | 
								need_rand = 1;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		} else if (!strcmp(*args,"-engine")) {
 | 
							} else if (!strcmp(*args,"-engine")) {
 | 
				
			||||||
			if (args[1]) {
 | 
								if (args[1]) {
 | 
				
			||||||
				args++;
 | 
									args++;
 | 
				
			||||||
				engine = *args;
 | 
									engine = *args;
 | 
				
			||||||
			} else badarg = 1;
 | 
								} else badarg = 1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		} else if (!strcmp(*args,"-passin")) {
 | 
							} else if (!strcmp(*args,"-passin")) {
 | 
				
			||||||
			if (args[1]) {
 | 
								if (args[1]) {
 | 
				
			||||||
				args++;
 | 
									args++;
 | 
				
			||||||
@@ -330,7 +338,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		BIO_printf (bio_err, "-CAfile file   trusted certificates file\n");
 | 
							BIO_printf (bio_err, "-CAfile file   trusted certificates file\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-crl_check     check revocation status of signer's certificate using CRLs\n");
 | 
							BIO_printf (bio_err, "-crl_check     check revocation status of signer's certificate using CRLs\n");
 | 
				
			||||||
		BIO_printf (bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
 | 
							BIO_printf (bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf (bio_err, "-engine e      use engine e, possibly a hardware device.\n");
 | 
							BIO_printf (bio_err, "-engine e      use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		BIO_printf (bio_err, "-passin arg    input file pass phrase source\n");
 | 
							BIO_printf (bio_err, "-passin arg    input file pass phrase source\n");
 | 
				
			||||||
		BIO_printf(bio_err,  "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
							BIO_printf(bio_err,  "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
				
			||||||
		BIO_printf(bio_err,  "               load the file (or the files in the directory) into\n");
 | 
							BIO_printf(bio_err,  "               load the file (or the files in the directory) into\n");
 | 
				
			||||||
@@ -339,7 +349,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
 | 
						if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
 | 
				
			||||||
		BIO_printf(bio_err, "Error getting password\n");
 | 
							BIO_printf(bio_err, "Error getting password\n");
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										649
									
								
								apps/speed.c
									
									
									
									
									
								
							
							
						
						
									
										649
									
								
								apps/speed.c
									
									
									
									
									
								
							@@ -55,28 +55,15 @@
 | 
				
			|||||||
 * copied and put under another distribution licence
 | 
					 * copied and put under another distribution licence
 | 
				
			||||||
 * [including the GNU Public Licence.]
 | 
					 * [including the GNU Public Licence.]
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
/* ====================================================================
 | 
					 | 
				
			||||||
 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Portions of the attached software ("Contribution") are developed by 
 | 
					 | 
				
			||||||
 * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The Contribution is licensed pursuant to the OpenSSL open source
 | 
					 | 
				
			||||||
 * license provided above.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The ECDH and ECDSA speed test software is originally written by 
 | 
					 | 
				
			||||||
 * Sumit Gupta of Sun Microsystems Laboratories.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* most of this code has been pilfered from my libdes speed.c program */
 | 
					/* most of this code has been pilfered from my libdes speed.c program */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_SPEED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#undef SECONDS
 | 
					#undef SECONDS
 | 
				
			||||||
#define SECONDS		3	
 | 
					#define SECONDS		3	
 | 
				
			||||||
#define RSA_SECONDS	10
 | 
					#define RSA_SECONDS	10
 | 
				
			||||||
#define DSA_SECONDS	10
 | 
					#define DSA_SECONDS	10
 | 
				
			||||||
#define ECDSA_SECONDS   10
 | 
					 | 
				
			||||||
#define ECDH_SECONDS    10
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 | 
					/* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 | 
				
			||||||
/* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 | 
					/* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 | 
				
			||||||
@@ -199,12 +186,6 @@
 | 
				
			|||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
#include "./testdsa.h"
 | 
					#include "./testdsa.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
#include <openssl/ecdsa.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
#include <openssl/ecdh.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* The following if from times(3) man page.  It may need to be changed */
 | 
					/* The following if from times(3) man page.  It may need to be changed */
 | 
				
			||||||
#ifndef HZ
 | 
					#ifndef HZ
 | 
				
			||||||
@@ -248,10 +229,6 @@ static int do_multi(int multi);
 | 
				
			|||||||
#define SIZE_NUM	5
 | 
					#define SIZE_NUM	5
 | 
				
			||||||
#define RSA_NUM		4
 | 
					#define RSA_NUM		4
 | 
				
			||||||
#define DSA_NUM		3
 | 
					#define DSA_NUM		3
 | 
				
			||||||
 | 
					 | 
				
			||||||
#define EC_NUM       16
 | 
					 | 
				
			||||||
#define MAX_ECDH_SIZE 256
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static const char *names[ALGOR_NUM]={
 | 
					static const char *names[ALGOR_NUM]={
 | 
				
			||||||
  "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4",
 | 
					  "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4",
 | 
				
			||||||
  "des cbc","des ede3","idea cbc",
 | 
					  "des cbc","des ede3","idea cbc",
 | 
				
			||||||
@@ -261,9 +238,6 @@ static double results[ALGOR_NUM][SIZE_NUM];
 | 
				
			|||||||
static int lengths[SIZE_NUM]={16,64,256,1024,8*1024};
 | 
					static int lengths[SIZE_NUM]={16,64,256,1024,8*1024};
 | 
				
			||||||
static double rsa_results[RSA_NUM][2];
 | 
					static double rsa_results[RSA_NUM][2];
 | 
				
			||||||
static double dsa_results[DSA_NUM][2];
 | 
					static double dsa_results[DSA_NUM][2];
 | 
				
			||||||
static double ecdsa_results[EC_NUM][2];
 | 
					 | 
				
			||||||
static double ecdh_results[EC_NUM][1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef SIGALRM
 | 
					#ifdef SIGALRM
 | 
				
			||||||
#if defined(__STDC__) || defined(sgi) || defined(_AIX)
 | 
					#if defined(__STDC__) || defined(sgi) || defined(_AIX)
 | 
				
			||||||
@@ -398,7 +372,9 @@ int MAIN(int, char **);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	ENGINE *e = NULL;
 | 
						ENGINE *e = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	unsigned char *buf=NULL,*buf2=NULL;
 | 
						unsigned char *buf=NULL,*buf2=NULL;
 | 
				
			||||||
	int mret=1;
 | 
						int mret=1;
 | 
				
			||||||
	long count=0,save_count=0;
 | 
						long count=0,save_count=0;
 | 
				
			||||||
@@ -506,24 +482,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
#define	R_RSA_1024	1
 | 
					#define	R_RSA_1024	1
 | 
				
			||||||
#define	R_RSA_2048	2
 | 
					#define	R_RSA_2048	2
 | 
				
			||||||
#define	R_RSA_4096	3
 | 
					#define	R_RSA_4096	3
 | 
				
			||||||
 | 
					 | 
				
			||||||
#define R_EC_P160    0
 | 
					 | 
				
			||||||
#define R_EC_P192    1	
 | 
					 | 
				
			||||||
#define R_EC_P224    2
 | 
					 | 
				
			||||||
#define R_EC_P256    3
 | 
					 | 
				
			||||||
#define R_EC_P384    4
 | 
					 | 
				
			||||||
#define R_EC_P521    5
 | 
					 | 
				
			||||||
#define R_EC_K163    6
 | 
					 | 
				
			||||||
#define R_EC_K233    7
 | 
					 | 
				
			||||||
#define R_EC_K283    8
 | 
					 | 
				
			||||||
#define R_EC_K409    9
 | 
					 | 
				
			||||||
#define R_EC_K571    10
 | 
					 | 
				
			||||||
#define R_EC_B163    11
 | 
					 | 
				
			||||||
#define R_EC_B233    12
 | 
					 | 
				
			||||||
#define R_EC_B283    13
 | 
					 | 
				
			||||||
#define R_EC_B409    14
 | 
					 | 
				
			||||||
#define R_EC_B571    15
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_RSA
 | 
					#ifndef OPENSSL_NO_RSA
 | 
				
			||||||
	RSA *rsa_key[RSA_NUM];
 | 
						RSA *rsa_key[RSA_NUM];
 | 
				
			||||||
	long rsa_c[RSA_NUM][2];
 | 
						long rsa_c[RSA_NUM][2];
 | 
				
			||||||
@@ -539,83 +497,8 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	long dsa_c[DSA_NUM][2];
 | 
						long dsa_c[DSA_NUM][2];
 | 
				
			||||||
	static unsigned int dsa_bits[DSA_NUM]={512,1024,2048};
 | 
						static unsigned int dsa_bits[DSA_NUM]={512,1024,2048};
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_EC
 | 
					 | 
				
			||||||
	/* We only test over the following curves as they are representative, 
 | 
					 | 
				
			||||||
	 * To add tests over more curves, simply add the curve NID
 | 
					 | 
				
			||||||
	 * and curve name to the following arrays and increase the 
 | 
					 | 
				
			||||||
	 * EC_NUM value accordingly. 
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	static unsigned int test_curves[EC_NUM] = 
 | 
					 | 
				
			||||||
	{	
 | 
					 | 
				
			||||||
	/* Prime Curves */
 | 
					 | 
				
			||||||
	NID_secp160r1,
 | 
					 | 
				
			||||||
	NID_X9_62_prime192v1,
 | 
					 | 
				
			||||||
	NID_secp224r1,
 | 
					 | 
				
			||||||
	NID_X9_62_prime256v1,
 | 
					 | 
				
			||||||
	NID_secp384r1,
 | 
					 | 
				
			||||||
	NID_secp521r1,
 | 
					 | 
				
			||||||
	/* Binary Curves */
 | 
					 | 
				
			||||||
	NID_sect163k1,
 | 
					 | 
				
			||||||
	NID_sect233k1,
 | 
					 | 
				
			||||||
	NID_sect283k1,
 | 
					 | 
				
			||||||
	NID_sect409k1,
 | 
					 | 
				
			||||||
	NID_sect571k1,
 | 
					 | 
				
			||||||
	NID_sect163r2,
 | 
					 | 
				
			||||||
	NID_sect233r1,
 | 
					 | 
				
			||||||
	NID_sect283r1,
 | 
					 | 
				
			||||||
	NID_sect409r1,
 | 
					 | 
				
			||||||
	NID_sect571r1
 | 
					 | 
				
			||||||
	}; 
 | 
					 | 
				
			||||||
	static char * test_curves_names[EC_NUM] = 
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	/* Prime Curves */
 | 
					 | 
				
			||||||
	"secp160r1",
 | 
					 | 
				
			||||||
	"nistp192",
 | 
					 | 
				
			||||||
	"nistp224",
 | 
					 | 
				
			||||||
	"nistp256",
 | 
					 | 
				
			||||||
	"nistp384",
 | 
					 | 
				
			||||||
	"nistp521",
 | 
					 | 
				
			||||||
	/* Binary Curves */
 | 
					 | 
				
			||||||
	"nistk163",
 | 
					 | 
				
			||||||
	"nistk233",
 | 
					 | 
				
			||||||
	"nistk283",
 | 
					 | 
				
			||||||
	"nistk409",
 | 
					 | 
				
			||||||
	"nistk571",
 | 
					 | 
				
			||||||
	"nistb163",
 | 
					 | 
				
			||||||
	"nistb233",
 | 
					 | 
				
			||||||
	"nistb283",
 | 
					 | 
				
			||||||
	"nistb409",
 | 
					 | 
				
			||||||
	"nistb571"
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
	static int test_curves_bits[EC_NUM] =
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
        160, 192, 224, 256, 384, 521,
 | 
					 | 
				
			||||||
        163, 233, 283, 409, 571,
 | 
					 | 
				
			||||||
        163, 233, 283, 409, 571
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
        unsigned char ecdsasig[256];
 | 
					 | 
				
			||||||
        unsigned int ecdsasiglen;
 | 
					 | 
				
			||||||
        EC_KEY *ecdsa[EC_NUM];
 | 
					 | 
				
			||||||
        long ecdsa_c[EC_NUM][2];
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
        EC_KEY *ecdh_a[EC_NUM], *ecdh_b[EC_NUM];
 | 
					 | 
				
			||||||
        unsigned char secret_a[MAX_ECDH_SIZE], secret_b[MAX_ECDH_SIZE];
 | 
					 | 
				
			||||||
        int secret_size_a, secret_size_b;
 | 
					 | 
				
			||||||
        int ecdh_checks = 0;
 | 
					 | 
				
			||||||
        int secret_idx = 0;
 | 
					 | 
				
			||||||
        long ecdh_c[EC_NUM][2];
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	int rsa_doit[RSA_NUM];
 | 
						int rsa_doit[RSA_NUM];
 | 
				
			||||||
	int dsa_doit[DSA_NUM];
 | 
						int dsa_doit[DSA_NUM];
 | 
				
			||||||
	int ecdsa_doit[EC_NUM];
 | 
					 | 
				
			||||||
        int ecdh_doit[EC_NUM];
 | 
					 | 
				
			||||||
	int doit[ALGOR_NUM];
 | 
						int doit[ALGOR_NUM];
 | 
				
			||||||
	int pr_header=0;
 | 
						int pr_header=0;
 | 
				
			||||||
	const EVP_CIPHER *evp_cipher=NULL;
 | 
						const EVP_CIPHER *evp_cipher=NULL;
 | 
				
			||||||
@@ -634,17 +517,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
	memset(dsa_key,0,sizeof(dsa_key));
 | 
						memset(dsa_key,0,sizeof(dsa_key));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	for (i=0; i<EC_NUM; i++) ecdsa[i] = NULL;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	for (i=0; i<EC_NUM; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdh_a[i] = NULL;
 | 
					 | 
				
			||||||
		ecdh_b[i] = NULL;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (bio_err == NULL)
 | 
						if (bio_err == NULL)
 | 
				
			||||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
							if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
				
			||||||
@@ -683,15 +555,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		rsa_doit[i]=0;
 | 
							rsa_doit[i]=0;
 | 
				
			||||||
	for (i=0; i<DSA_NUM; i++)
 | 
						for (i=0; i<DSA_NUM; i++)
 | 
				
			||||||
		dsa_doit[i]=0;
 | 
							dsa_doit[i]=0;
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	for (i=0; i<EC_NUM; i++)
 | 
					 | 
				
			||||||
		ecdsa_doit[i]=0;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	for (i=0; i<EC_NUM; i++)
 | 
					 | 
				
			||||||
		ecdh_doit[i]=0;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	j=0;
 | 
						j=0;
 | 
				
			||||||
	argc--;
 | 
						argc--;
 | 
				
			||||||
@@ -731,6 +594,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			j--;	/* Otherwise, -elapsed gets confused with
 | 
								j--;	/* Otherwise, -elapsed gets confused with
 | 
				
			||||||
				   an algorithm. */
 | 
									   an algorithm. */
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if	((argc > 0) && (strcmp(*argv,"-engine") == 0))
 | 
							else if	((argc > 0) && (strcmp(*argv,"-engine") == 0))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			argc--;
 | 
								argc--;
 | 
				
			||||||
@@ -747,6 +611,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			   means all of them should be run) */
 | 
								   means all of them should be run) */
 | 
				
			||||||
			j--;
 | 
								j--;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#ifdef HAVE_FORK
 | 
					#ifdef HAVE_FORK
 | 
				
			||||||
		else if	((argc > 0) && (strcmp(*argv,"-multi") == 0))
 | 
							else if	((argc > 0) && (strcmp(*argv,"-multi") == 0))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -908,52 +773,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
			dsa_doit[R_DSA_512]=1;
 | 
								dsa_doit[R_DSA_512]=1;
 | 
				
			||||||
			dsa_doit[R_DSA_1024]=1;
 | 
								dsa_doit[R_DSA_1024]=1;
 | 
				
			||||||
			}
 | 
								dsa_doit[R_DSA_2048]=1;
 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
		     if (strcmp(*argv,"ecdsap160") == 0) ecdsa_doit[R_EC_P160]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsap224") == 0) ecdsa_doit[R_EC_P224]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsap256") == 0) ecdsa_doit[R_EC_P256]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsap384") == 0) ecdsa_doit[R_EC_P384]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsap521") == 0) ecdsa_doit[R_EC_P521]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsak163") == 0) ecdsa_doit[R_EC_K163]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsak233") == 0) ecdsa_doit[R_EC_K233]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsak283") == 0) ecdsa_doit[R_EC_K283]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsak409") == 0) ecdsa_doit[R_EC_K409]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsak571") == 0) ecdsa_doit[R_EC_K571]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsab163") == 0) ecdsa_doit[R_EC_B163]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsab233") == 0) ecdsa_doit[R_EC_B233]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsab283") == 0) ecdsa_doit[R_EC_B283]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsab409") == 0) ecdsa_doit[R_EC_B409]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsab571") == 0) ecdsa_doit[R_EC_B571]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdsa") == 0)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			for (i=0; i < EC_NUM; i++)
 | 
					 | 
				
			||||||
				ecdsa_doit[i]=1;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
		     if (strcmp(*argv,"ecdhp160") == 0) ecdh_doit[R_EC_P160]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhp224") == 0) ecdh_doit[R_EC_P224]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhp256") == 0) ecdh_doit[R_EC_P256]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhp384") == 0) ecdh_doit[R_EC_P384]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhp521") == 0) ecdh_doit[R_EC_P521]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhk163") == 0) ecdh_doit[R_EC_K163]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhk233") == 0) ecdh_doit[R_EC_K233]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhk283") == 0) ecdh_doit[R_EC_K283]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhk409") == 0) ecdh_doit[R_EC_K409]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhk571") == 0) ecdh_doit[R_EC_K571]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhb163") == 0) ecdh_doit[R_EC_B163]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhb233") == 0) ecdh_doit[R_EC_B233]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhb283") == 0) ecdh_doit[R_EC_B283]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhb409") == 0) ecdh_doit[R_EC_B409]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdhb571") == 0) ecdh_doit[R_EC_B571]=2;
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"ecdh") == 0)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			for (i=0; i < EC_NUM; i++)
 | 
					 | 
				
			||||||
				ecdh_doit[i]=1;
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -1022,18 +842,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
#ifndef OPENSSL_NO_DSA
 | 
					#ifndef OPENSSL_NO_DSA
 | 
				
			||||||
			BIO_printf(bio_err,"dsa512   dsa1024  dsa2048\n");
 | 
								BIO_printf(bio_err,"dsa512   dsa1024  dsa2048\n");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdsap160 ecdsap224 ecdsap256 ecdsap384 ecdsap521\n");
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdsak163 ecdsak233 ecdsak283 ecdsak409 ecdsak571\n");
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdsab163 ecdsab233 ecdsab283 ecdsab409 ecdsab571\n");
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdsa\n");
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdhp160  ecdhp224  ecdhp256  ecdhp384  ecdhp521\n");
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdhk163  ecdhk233  ecdhk283  ecdhk409  ecdhk571\n");
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdhb163  ecdhb233  ecdhb283  ecdhb409  ecdhb571\n");
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ecdh\n");
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef OPENSSL_NO_IDEA
 | 
					#ifndef OPENSSL_NO_IDEA
 | 
				
			||||||
			BIO_printf(bio_err,"idea     ");
 | 
								BIO_printf(bio_err,"idea     ");
 | 
				
			||||||
@@ -1064,7 +872,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
#if defined(TIMES) || defined(USE_TOD)
 | 
					#if defined(TIMES) || defined(USE_TOD)
 | 
				
			||||||
			BIO_printf(bio_err,"-elapsed        measure time in real time instead of CPU user time.\n");
 | 
								BIO_printf(bio_err,"-elapsed        measure time in real time instead of CPU user time.\n");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
			BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 | 
								BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
			BIO_printf(bio_err,"-evp e          use EVP e.\n");
 | 
								BIO_printf(bio_err,"-evp e          use EVP e.\n");
 | 
				
			||||||
			BIO_printf(bio_err,"-decrypt        time decryption instead of encryption (only EVP).\n");
 | 
								BIO_printf(bio_err,"-decrypt        time decryption instead of encryption (only EVP).\n");
 | 
				
			||||||
			BIO_printf(bio_err,"-mr             produce machine readable output.\n");
 | 
								BIO_printf(bio_err,"-mr             produce machine readable output.\n");
 | 
				
			||||||
@@ -1197,6 +1007,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	c[D_CBC_RC5][0]=count;
 | 
						c[D_CBC_RC5][0]=count;
 | 
				
			||||||
	c[D_CBC_BF][0]=count;
 | 
						c[D_CBC_BF][0]=count;
 | 
				
			||||||
	c[D_CBC_CAST][0]=count;
 | 
						c[D_CBC_CAST][0]=count;
 | 
				
			||||||
 | 
						c[D_CBC_128_AES][0]=count;
 | 
				
			||||||
 | 
						c[D_CBC_192_AES][0]=count;
 | 
				
			||||||
 | 
						c[D_CBC_256_AES][0]=count;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i=1; i<SIZE_NUM; i++)
 | 
						for (i=1; i<SIZE_NUM; i++)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -1222,6 +1035,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1;
 | 
							c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1;
 | 
				
			||||||
		c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1;
 | 
							c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1;
 | 
				
			||||||
		c[D_CBC_CAST][i]=c[D_CBC_CAST][i-1]*l0/l1;
 | 
							c[D_CBC_CAST][i]=c[D_CBC_CAST][i-1]*l0/l1;
 | 
				
			||||||
 | 
							c[D_CBC_128_AES][i]=c[D_CBC_128_AES][i-1]*l0/l1;
 | 
				
			||||||
 | 
							c[D_CBC_192_AES][i]=c[D_CBC_192_AES][i-1]*l0/l1;
 | 
				
			||||||
 | 
							c[D_CBC_256_AES][i]=c[D_CBC_256_AES][i-1]*l0/l1;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
#ifndef OPENSSL_NO_RSA
 | 
					#ifndef OPENSSL_NO_RSA
 | 
				
			||||||
	rsa_c[R_RSA_512][0]=count/2000;
 | 
						rsa_c[R_RSA_512][0]=count/2000;
 | 
				
			||||||
@@ -1263,114 +1079,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	ecdsa_c[R_EC_P160][0]=count/1000;
 | 
					 | 
				
			||||||
	ecdsa_c[R_EC_P160][1]=count/1000/2;
 | 
					 | 
				
			||||||
	for (i=R_EC_P224; i<=R_EC_P521; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdsa_c[i][0]=ecdsa_c[i-1][0]/2;
 | 
					 | 
				
			||||||
		ecdsa_c[i][1]=ecdsa_c[i-1][1]/2;
 | 
					 | 
				
			||||||
		if ((ecdsa_doit[i] <= 1) && (ecdsa_c[i][0] == 0))
 | 
					 | 
				
			||||||
			ecdsa_doit[i]=0;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (ecdsa_c[i] == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdsa_c[i][0]=1;
 | 
					 | 
				
			||||||
				ecdsa_c[i][1]=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	ecdsa_c[R_EC_K163][0]=count/1000;
 | 
					 | 
				
			||||||
	ecdsa_c[R_EC_K163][1]=count/1000/2;
 | 
					 | 
				
			||||||
	for (i=R_EC_K233; i<=R_EC_K571; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdsa_c[i][0]=ecdsa_c[i-1][0]/2;
 | 
					 | 
				
			||||||
		ecdsa_c[i][1]=ecdsa_c[i-1][1]/2;
 | 
					 | 
				
			||||||
		if ((ecdsa_doit[i] <= 1) && (ecdsa_c[i][0] == 0))
 | 
					 | 
				
			||||||
			ecdsa_doit[i]=0;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (ecdsa_c[i] == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdsa_c[i][0]=1;
 | 
					 | 
				
			||||||
				ecdsa_c[i][1]=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	ecdsa_c[R_EC_B163][0]=count/1000;
 | 
					 | 
				
			||||||
	ecdsa_c[R_EC_B163][1]=count/1000/2;
 | 
					 | 
				
			||||||
	for (i=R_EC_B233; i<=R_EC_B571; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdsa_c[i][0]=ecdsa_c[i-1][0]/2;
 | 
					 | 
				
			||||||
		ecdsa_c[i][1]=ecdsa_c[i-1][1]/2;
 | 
					 | 
				
			||||||
		if ((ecdsa_doit[i] <= 1) && (ecdsa_c[i][0] == 0))
 | 
					 | 
				
			||||||
			ecdsa_doit[i]=0;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (ecdsa_c[i] == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdsa_c[i][0]=1;
 | 
					 | 
				
			||||||
				ecdsa_c[i][1]=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	ecdh_c[R_EC_P160][0]=count/1000;
 | 
					 | 
				
			||||||
	ecdh_c[R_EC_P160][1]=count/1000;
 | 
					 | 
				
			||||||
	for (i=R_EC_P224; i<=R_EC_P521; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdh_c[i][0]=ecdh_c[i-1][0]/2;
 | 
					 | 
				
			||||||
		ecdh_c[i][1]=ecdh_c[i-1][1]/2;
 | 
					 | 
				
			||||||
		if ((ecdh_doit[i] <= 1) && (ecdh_c[i][0] == 0))
 | 
					 | 
				
			||||||
			ecdh_doit[i]=0;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (ecdh_c[i] == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdh_c[i][0]=1;
 | 
					 | 
				
			||||||
				ecdh_c[i][1]=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	ecdh_c[R_EC_K163][0]=count/1000;
 | 
					 | 
				
			||||||
	ecdh_c[R_EC_K163][1]=count/1000;
 | 
					 | 
				
			||||||
	for (i=R_EC_K233; i<=R_EC_K571; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdh_c[i][0]=ecdh_c[i-1][0]/2;
 | 
					 | 
				
			||||||
		ecdh_c[i][1]=ecdh_c[i-1][1]/2;
 | 
					 | 
				
			||||||
		if ((ecdh_doit[i] <= 1) && (ecdh_c[i][0] == 0))
 | 
					 | 
				
			||||||
			ecdh_doit[i]=0;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (ecdh_c[i] == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdh_c[i][0]=1;
 | 
					 | 
				
			||||||
				ecdh_c[i][1]=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	ecdh_c[R_EC_B163][0]=count/1000;
 | 
					 | 
				
			||||||
	ecdh_c[R_EC_B163][1]=count/1000;
 | 
					 | 
				
			||||||
	for (i=R_EC_B233; i<=R_EC_B571; i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ecdh_c[i][0]=ecdh_c[i-1][0]/2;
 | 
					 | 
				
			||||||
		ecdh_c[i][1]=ecdh_c[i-1][1]/2;
 | 
					 | 
				
			||||||
		if ((ecdh_doit[i] <= 1) && (ecdh_c[i][0] == 0))
 | 
					 | 
				
			||||||
			ecdh_doit[i]=0;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (ecdh_c[i] == 0)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdh_c[i][0]=1;
 | 
					 | 
				
			||||||
				ecdh_c[i][1]=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define COND(d)	(count < (d))
 | 
					#define COND(d)	(count < (d))
 | 
				
			||||||
#define COUNT(d) (d)
 | 
					#define COUNT(d) (d)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
@@ -1700,6 +1408,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				else
 | 
									else
 | 
				
			||||||
					EVP_EncryptFinal_ex(&ctx,buf,&outl);
 | 
										EVP_EncryptFinal_ex(&ctx,buf,&outl);
 | 
				
			||||||
				d=Time_F(STOP);
 | 
									d=Time_F(STOP);
 | 
				
			||||||
 | 
									EVP_CIPHER_CTX_cleanup(&ctx);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			if (evp_md)
 | 
								if (evp_md)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
@@ -1895,220 +1604,6 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	if (rnd_fake) RAND_cleanup();
 | 
						if (rnd_fake) RAND_cleanup();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	if (RAND_status() != 1) 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		RAND_seed(rnd_seed, sizeof rnd_seed);
 | 
					 | 
				
			||||||
		rnd_fake = 1;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	for (j=0; j<EC_NUM; j++) 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		int ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (!ecdsa_doit[j]) continue; /* Ignore Curve */ 
 | 
					 | 
				
			||||||
		ecdsa[j] = EC_KEY_new();
 | 
					 | 
				
			||||||
		if (ecdsa[j] == NULL) 
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ECDSA failure.\n");
 | 
					 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
			rsa_count=1;
 | 
					 | 
				
			||||||
			} 
 | 
					 | 
				
			||||||
		else 
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ecdsa[j]->group = EC_GROUP_new_by_nid(test_curves[j]);
 | 
					 | 
				
			||||||
			/* Could not obtain group information */
 | 
					 | 
				
			||||||
			if (ecdsa[j]->group == NULL) 
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err,"ECDSA failure.Could not obtain group information\n");
 | 
					 | 
				
			||||||
				ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
				rsa_count=1;
 | 
					 | 
				
			||||||
				} 
 | 
					 | 
				
			||||||
			else 
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				/* Perform ECDSA signature test */
 | 
					 | 
				
			||||||
				EC_KEY_generate_key(ecdsa[j]);
 | 
					 | 
				
			||||||
				ret = ECDSA_sign(0, buf, 20, ecdsasig, 
 | 
					 | 
				
			||||||
					&ecdsasiglen, ecdsa[j]);
 | 
					 | 
				
			||||||
				if (ret == 0) 
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					BIO_printf(bio_err,"ECDSA sign failure.  No ECDSA sign will be done.\n");
 | 
					 | 
				
			||||||
					ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
					rsa_count=1;
 | 
					 | 
				
			||||||
					} 
 | 
					 | 
				
			||||||
				else 
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					pkey_print_message("sign","ecdsa",
 | 
					 | 
				
			||||||
						ecdsa_c[j][0], 
 | 
					 | 
				
			||||||
						test_curves_bits[j],
 | 
					 | 
				
			||||||
						ECDSA_SECONDS);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
					Time_F(START);
 | 
					 | 
				
			||||||
					for (count=0,run=1; COND(ecdsa_c[j][0]);
 | 
					 | 
				
			||||||
						count++) 
 | 
					 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
						ret=ECDSA_sign(0, buf, 20, 
 | 
					 | 
				
			||||||
							ecdsasig, &ecdsasiglen,
 | 
					 | 
				
			||||||
							ecdsa[j]);
 | 
					 | 
				
			||||||
						if (ret == 0) 
 | 
					 | 
				
			||||||
							{
 | 
					 | 
				
			||||||
							BIO_printf(bio_err, "ECDSA sign failure\n");
 | 
					 | 
				
			||||||
							ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
							count=1;
 | 
					 | 
				
			||||||
							break;
 | 
					 | 
				
			||||||
							}
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
						d=Time_F(STOP);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
						BIO_printf(bio_err, mr ? "+R5:%ld:%d:%.2f\n" :
 | 
					 | 
				
			||||||
						"%ld %d bit ECDSA signs in %.2fs \n", 
 | 
					 | 
				
			||||||
						count, test_curves_bits[j], d);
 | 
					 | 
				
			||||||
						ecdsa_results[j][0]=d/(double)count;
 | 
					 | 
				
			||||||
						rsa_count=count;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				/* Perform ECDSA verification test */
 | 
					 | 
				
			||||||
				ret=ECDSA_verify(0, buf, 20, ecdsasig, 
 | 
					 | 
				
			||||||
					ecdsasiglen, ecdsa[j]);
 | 
					 | 
				
			||||||
				if (ret != 1) 
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					BIO_printf(bio_err,"ECDSA verify failure.  No ECDSA verify will be done.\n");
 | 
					 | 
				
			||||||
					ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
					ecdsa_doit[j] = 0;
 | 
					 | 
				
			||||||
					} 
 | 
					 | 
				
			||||||
				else 
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					pkey_print_message("verify","ecdsa",
 | 
					 | 
				
			||||||
					ecdsa_c[j][1],
 | 
					 | 
				
			||||||
					test_curves_bits[j],
 | 
					 | 
				
			||||||
					ECDSA_SECONDS);
 | 
					 | 
				
			||||||
					Time_F(START);
 | 
					 | 
				
			||||||
					for (count=0,run=1; COND(ecdsa_c[j][1]); count++) 
 | 
					 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
						ret=ECDSA_verify(0, buf, 20, ecdsasig, ecdsasiglen, ecdsa[j]);
 | 
					 | 
				
			||||||
						if (ret != 1) 
 | 
					 | 
				
			||||||
							{
 | 
					 | 
				
			||||||
							BIO_printf(bio_err, "ECDSA verify failure\n");
 | 
					 | 
				
			||||||
							ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
							count=1;
 | 
					 | 
				
			||||||
							break;
 | 
					 | 
				
			||||||
							}
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
						d=Time_F(STOP);
 | 
					 | 
				
			||||||
						BIO_printf(bio_err, mr? "+R6:%ld:%d:%.2f\n"
 | 
					 | 
				
			||||||
							: "%ld %d bit ECDSA verify in %.2fs\n",
 | 
					 | 
				
			||||||
						count, test_curves_bits[j], d);
 | 
					 | 
				
			||||||
						ecdsa_results[j][1]=d/(double)count;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				if (rsa_count <= 1) 
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					/* if longer than 10s, don't do any more */
 | 
					 | 
				
			||||||
					for (j++; j<EC_NUM; j++)
 | 
					 | 
				
			||||||
					ecdsa_doit[j]=0;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	if (rnd_fake) RAND_cleanup();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	if (RAND_status() != 1)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		RAND_seed(rnd_seed, sizeof rnd_seed);
 | 
					 | 
				
			||||||
		rnd_fake = 1;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	for (j=0; j<EC_NUM; j++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (!ecdh_doit[j]) continue;
 | 
					 | 
				
			||||||
		ecdh_a[j] = EC_KEY_new();
 | 
					 | 
				
			||||||
		ecdh_b[j] = EC_KEY_new();
 | 
					 | 
				
			||||||
		if ((ecdh_a[j] == NULL) || (ecdh_b[j] == NULL))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			BIO_printf(bio_err,"ECDH failure.\n");
 | 
					 | 
				
			||||||
			ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
			rsa_count=1;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ecdh_a[j]->group = EC_GROUP_new_by_nid(test_curves[j]);
 | 
					 | 
				
			||||||
			if (ecdh_a[j]->group == NULL)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err,"ECDH failure.\n");
 | 
					 | 
				
			||||||
				ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
				rsa_count=1;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			else
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ecdh_b[j]->group = ecdh_a[j]->group;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				/* generate two ECDH key pairs */
 | 
					 | 
				
			||||||
				if (!EC_KEY_generate_key(ecdh_a[j]) ||
 | 
					 | 
				
			||||||
					!EC_KEY_generate_key(ecdh_b[j]))
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					BIO_printf(bio_err,"ECDH key generation failure.\n");
 | 
					 | 
				
			||||||
					ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
					rsa_count=1;		
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
					secret_size_a = ECDH_compute_key(secret_a, 
 | 
					 | 
				
			||||||
						ecdh_b[j]->pub_key,
 | 
					 | 
				
			||||||
						ecdh_a[j]);
 | 
					 | 
				
			||||||
					secret_size_b = ECDH_compute_key(secret_b, 
 | 
					 | 
				
			||||||
						ecdh_a[j]->pub_key,
 | 
					 | 
				
			||||||
						ecdh_b[j]);
 | 
					 | 
				
			||||||
					if (secret_size_a != secret_size_b) 
 | 
					 | 
				
			||||||
						ecdh_checks = 0;
 | 
					 | 
				
			||||||
					else
 | 
					 | 
				
			||||||
						ecdh_checks = 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
					for (secret_idx = 0; 
 | 
					 | 
				
			||||||
					    (secret_idx < secret_size_a)
 | 
					 | 
				
			||||||
						&& (ecdh_checks == 1);
 | 
					 | 
				
			||||||
					    secret_idx++)
 | 
					 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
						if (secret_a[secret_idx] != secret_b[secret_idx])
 | 
					 | 
				
			||||||
						ecdh_checks = 0;
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
					if (ecdh_checks == 0)
 | 
					 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
						BIO_printf(bio_err,"ECDH computations don't match.\n");
 | 
					 | 
				
			||||||
						ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
						rsa_count=1;		
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
					pkey_print_message("","ecdh",
 | 
					 | 
				
			||||||
					ecdh_c[j][0], 
 | 
					 | 
				
			||||||
					test_curves_bits[j],
 | 
					 | 
				
			||||||
					ECDH_SECONDS);
 | 
					 | 
				
			||||||
					Time_F(START);
 | 
					 | 
				
			||||||
					for (count=0,run=1; COND(ecdh_c[j][0]); count++)
 | 
					 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
						ECDH_compute_key(secret_a, 
 | 
					 | 
				
			||||||
						ecdh_b[j]->pub_key,
 | 
					 | 
				
			||||||
						ecdh_a[j]);
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
					d=Time_F(STOP);
 | 
					 | 
				
			||||||
					BIO_printf(bio_err, mr ? "+R7:%ld:%d:%.2f\n" :"%ld %d-bit ECDH ops in %.2fs\n",
 | 
					 | 
				
			||||||
					count, test_curves_bits[j], d);
 | 
					 | 
				
			||||||
					ecdh_results[j][0]=d/(double)count;
 | 
					 | 
				
			||||||
					rsa_count=count;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (rsa_count <= 1)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			/* if longer than 10s, don't do any more */
 | 
					 | 
				
			||||||
			for (j++; j<EC_NUM; j++)
 | 
					 | 
				
			||||||
			ecdh_doit[j]=0;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	if (rnd_fake) RAND_cleanup();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifdef HAVE_FORK
 | 
					#ifdef HAVE_FORK
 | 
				
			||||||
show_res:
 | 
					show_res:
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -2234,57 +1729,7 @@ show_res:
 | 
				
			|||||||
				1.0/dsa_results[k][0],1.0/dsa_results[k][1]);
 | 
									1.0/dsa_results[k][0],1.0/dsa_results[k][1]);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	j=1;
 | 
					 | 
				
			||||||
	for (k=0; k<EC_NUM; k++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (!ecdsa_doit[k]) continue;
 | 
					 | 
				
			||||||
		if (j && !mr)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			printf("%30ssign    verify    sign/s verify/s\n"," ");
 | 
					 | 
				
			||||||
			j=0;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (mr)
 | 
					 | 
				
			||||||
			fprintf(stdout,"+F4:%u:%u:%f:%f\n", 
 | 
					 | 
				
			||||||
				k, test_curves_bits[k],
 | 
					 | 
				
			||||||
				ecdsa_results[k][0],ecdsa_results[k][1]);
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			fprintf(stdout,
 | 
					 | 
				
			||||||
				"%4u bit ecdsa (%s) %8.4fs %8.4fs %8.1f %8.1f\n", 
 | 
					 | 
				
			||||||
				test_curves_bits[k],
 | 
					 | 
				
			||||||
				test_curves_names[k],
 | 
					 | 
				
			||||||
				ecdsa_results[k][0],ecdsa_results[k][1], 
 | 
					 | 
				
			||||||
				1.0/ecdsa_results[k][0],1.0/ecdsa_results[k][1]);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	j=1;
 | 
					 | 
				
			||||||
	for (k=0; k<EC_NUM; k++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (!ecdh_doit[k]) continue;
 | 
					 | 
				
			||||||
		if (j && !mr)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			printf("%30sop      op/s\n"," ");
 | 
					 | 
				
			||||||
			j=0;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (mr)
 | 
					 | 
				
			||||||
			fprintf(stdout,"+F5:%u:%u:%f:%f\n",
 | 
					 | 
				
			||||||
				k, test_curves_bits[k],
 | 
					 | 
				
			||||||
				ecdh_results[k][0], 1.0/ecdh_results[k][0]);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			fprintf(stdout,"%4u bit ecdh (%s) %8.4fs %8.1f\n",
 | 
					 | 
				
			||||||
				test_curves_bits[k],
 | 
					 | 
				
			||||||
				test_curves_names[k],
 | 
					 | 
				
			||||||
				ecdh_results[k][0], 1.0/ecdh_results[k][0]);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	mret=0;
 | 
						mret=0;
 | 
				
			||||||
 | 
					 | 
				
			||||||
end:
 | 
					end:
 | 
				
			||||||
	ERR_print_errors(bio_err);
 | 
						ERR_print_errors(bio_err);
 | 
				
			||||||
	if (buf != NULL) OPENSSL_free(buf);
 | 
						if (buf != NULL) OPENSSL_free(buf);
 | 
				
			||||||
@@ -2299,24 +1744,8 @@ end:
 | 
				
			|||||||
		if (dsa_key[i] != NULL)
 | 
							if (dsa_key[i] != NULL)
 | 
				
			||||||
			DSA_free(dsa_key[i]);
 | 
								DSA_free(dsa_key[i]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
	for (i=0; i<EC_NUM; i++)
 | 
					 | 
				
			||||||
		if (ecdsa[i] != NULL)
 | 
					 | 
				
			||||||
			EC_KEY_free(ecdsa[i]);
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
	for (i=0; i<EC_NUM; i++)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		if (ecdh_a[i] != NULL)
 | 
					 | 
				
			||||||
			EC_KEY_free(ecdh_a[i]);
 | 
					 | 
				
			||||||
		if (ecdh_b[i] != NULL)
 | 
					 | 
				
			||||||
			EC_KEY_free(ecdh_b[i]);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(mret);
 | 
						OPENSSL_EXIT(mret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void print_message(const char *s, long num, int length)
 | 
					static void print_message(const char *s, long num, int length)
 | 
				
			||||||
@@ -2516,49 +1945,6 @@ static int do_multi(int multi)
 | 
				
			|||||||
				else
 | 
									else
 | 
				
			||||||
					dsa_results[k][1]=d;
 | 
										dsa_results[k][1]=d;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
			else if(!strncmp(buf,"+F4:",4))
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				int k;
 | 
					 | 
				
			||||||
				double d;
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				p=buf+4;
 | 
					 | 
				
			||||||
				k=atoi(sstrsep(&p,sep));
 | 
					 | 
				
			||||||
				sstrsep(&p,sep);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				d=atof(sstrsep(&p,sep));
 | 
					 | 
				
			||||||
				if(n)
 | 
					 | 
				
			||||||
					ecdsa_results[k][0]=1/(1/ecdsa_results[k][0]+1/d);
 | 
					 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					ecdsa_results[k][0]=d;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				d=atof(sstrsep(&p,sep));
 | 
					 | 
				
			||||||
				if(n)
 | 
					 | 
				
			||||||
					ecdsa_results[k][1]=1/(1/ecdsa_results[k][1]+1/d);
 | 
					 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					ecdsa_results[k][1]=d;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
#endif 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef OPENSSL_NO_ECDH
 | 
					 | 
				
			||||||
			else if(!strncmp(buf,"+F5:",4))
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				int k;
 | 
					 | 
				
			||||||
				double d;
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				p=buf+4;
 | 
					 | 
				
			||||||
				k=atoi(sstrsep(&p,sep));
 | 
					 | 
				
			||||||
				sstrsep(&p,sep);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				d=atof(sstrsep(&p,sep));
 | 
					 | 
				
			||||||
				if(n)
 | 
					 | 
				
			||||||
					ecdh_results[k][0]=1/(1/ecdh_results[k][0]+1/d);
 | 
					 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					ecdh_results[k][0]=d;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			else if(!strncmp(buf,"+H:",3))
 | 
								else if(!strncmp(buf,"+H:",3))
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
@@ -2569,3 +1955,4 @@ static int do_multi(int multi)
 | 
				
			|||||||
	return 1;
 | 
						return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								apps/spkac.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								apps/spkac.c
									
									
									
									
									
								
							@@ -92,7 +92,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	CONF *conf = NULL;
 | 
						CONF *conf = NULL;
 | 
				
			||||||
	NETSCAPE_SPKI *spki = NULL;
 | 
						NETSCAPE_SPKI *spki = NULL;
 | 
				
			||||||
	EVP_PKEY *pkey = NULL;
 | 
						EVP_PKEY *pkey = NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -141,11 +143,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			spksect= *(++argv);
 | 
								spksect= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-noout") == 0)
 | 
							else if (strcmp(*argv,"-noout") == 0)
 | 
				
			||||||
			noout=1;
 | 
								noout=1;
 | 
				
			||||||
		else if (strcmp(*argv,"-pubkey") == 0)
 | 
							else if (strcmp(*argv,"-pubkey") == 0)
 | 
				
			||||||
@@ -171,7 +175,9 @@ bad:
 | 
				
			|||||||
		BIO_printf(bio_err," -noout         don't print SPKAC\n");
 | 
							BIO_printf(bio_err," -noout         don't print SPKAC\n");
 | 
				
			||||||
		BIO_printf(bio_err," -pubkey        output public key\n");
 | 
							BIO_printf(bio_err," -pubkey        output public key\n");
 | 
				
			||||||
		BIO_printf(bio_err," -verify        verify SPKAC signature\n");
 | 
							BIO_printf(bio_err," -verify        verify SPKAC signature\n");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
		BIO_printf(bio_err," -engine e      use engine e, possibly a hardware device.\n");
 | 
							BIO_printf(bio_err," -engine e      use engine e, possibly a hardware device.\n");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -181,7 +187,9 @@ bad:
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(keyfile) {
 | 
						if(keyfile) {
 | 
				
			||||||
		pkey = load_key(bio_err,
 | 
							pkey = load_key(bio_err,
 | 
				
			||||||
@@ -295,5 +303,5 @@ end:
 | 
				
			|||||||
	EVP_PKEY_free(pkey);
 | 
						EVP_PKEY_free(pkey);
 | 
				
			||||||
	if(passin) OPENSSL_free(passin);
 | 
						if(passin) OPENSSL_free(passin);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -86,7 +86,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
 | 
						STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
 | 
				
			||||||
	X509_STORE *cert_ctx=NULL;
 | 
						X509_STORE *cert_ctx=NULL;
 | 
				
			||||||
	X509_LOOKUP *lookup=NULL;
 | 
						X509_LOOKUP *lookup=NULL;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cert_ctx=X509_STORE_new();
 | 
						cert_ctx=X509_STORE_new();
 | 
				
			||||||
	if (cert_ctx == NULL) goto end;
 | 
						if (cert_ctx == NULL) goto end;
 | 
				
			||||||
@@ -142,11 +144,13 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
				if (argc-- < 1) goto end;
 | 
									if (argc-- < 1) goto end;
 | 
				
			||||||
				trustfile= *(++argv);
 | 
									trustfile= *(++argv);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
			else if (strcmp(*argv,"-engine") == 0)
 | 
								else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				if (--argc < 1) goto end;
 | 
									if (--argc < 1) goto end;
 | 
				
			||||||
				engine= *(++argv);
 | 
									engine= *(++argv);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
			else if (strcmp(*argv,"-help") == 0)
 | 
								else if (strcmp(*argv,"-help") == 0)
 | 
				
			||||||
				goto end;
 | 
									goto end;
 | 
				
			||||||
			else if (strcmp(*argv,"-ignore_critical") == 0)
 | 
								else if (strcmp(*argv,"-ignore_critical") == 0)
 | 
				
			||||||
@@ -170,7 +174,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
 | 
						lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
 | 
				
			||||||
	if (lookup == NULL) abort();
 | 
						if (lookup == NULL) abort();
 | 
				
			||||||
@@ -219,7 +225,11 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	ret=0;
 | 
						ret=0;
 | 
				
			||||||
end:
 | 
					end:
 | 
				
			||||||
	if (ret == 1) {
 | 
						if (ret == 1) {
 | 
				
			||||||
		BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check] [-engine e] cert1 cert2 ...\n");
 | 
							BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check]");
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
 | 
							BIO_printf(bio_err," [-engine e]");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							BIO_printf(bio_err," cert1 cert2 ...\n");
 | 
				
			||||||
		BIO_printf(bio_err,"recognized usages:\n");
 | 
							BIO_printf(bio_err,"recognized usages:\n");
 | 
				
			||||||
		for(i = 0; i < X509_PURPOSE_get_count(); i++) {
 | 
							for(i = 0; i < X509_PURPOSE_get_count(); i++) {
 | 
				
			||||||
			X509_PURPOSE *ptmp;
 | 
								X509_PURPOSE *ptmp;
 | 
				
			||||||
@@ -232,7 +242,7 @@ end:
 | 
				
			|||||||
	sk_X509_pop_free(untrusted, X509_free);
 | 
						sk_X509_pop_free(untrusted, X509_free);
 | 
				
			||||||
	sk_X509_pop_free(trusted, X509_free);
 | 
						sk_X509_pop_free(trusted, X509_free);
 | 
				
			||||||
	apps_shutdown();
 | 
						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)
 | 
					static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -172,19 +172,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (version)
 | 
						if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION));
 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (SSLeay() == SSLEAY_VERSION_NUMBER)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			printf("%s\n",SSLeay_version(SSLEAY_VERSION));
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			printf("%s (Library: %s)\n",
 | 
					 | 
				
			||||||
				OPENSSL_VERSION_TEXT,
 | 
					 | 
				
			||||||
				SSLeay_version(SSLEAY_VERSION));
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	if (date)    printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
 | 
						if (date)    printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
 | 
				
			||||||
	if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM));
 | 
						if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM));
 | 
				
			||||||
	if (options) 
 | 
						if (options) 
 | 
				
			||||||
@@ -212,5 +200,5 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
 | 
						if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
 | 
				
			||||||
end:
 | 
					end:
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										140
									
								
								apps/x509.c
									
									
									
									
									
								
							
							
						
						
									
										140
									
								
								apps/x509.c
									
									
									
									
									
								
							@@ -131,7 +131,9 @@ static char *x509_usage[]={
 | 
				
			|||||||
" -extensions     - section from config file with X509V3 extensions to add\n",
 | 
					" -extensions     - section from config file with X509V3 extensions to add\n",
 | 
				
			||||||
" -clrext         - delete extensions before signing and input certificate\n",
 | 
					" -clrext         - delete extensions before signing and input certificate\n",
 | 
				
			||||||
" -nameopt arg    - various certificate name options\n",
 | 
					" -nameopt arg    - various certificate name options\n",
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
" -engine e       - use engine e, possibly a hardware device.\n",
 | 
					" -engine e       - use engine e, possibly a hardware device.\n",
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
" -certopt arg    - various certificate text options\n",
 | 
					" -certopt arg    - various certificate text options\n",
 | 
				
			||||||
NULL
 | 
					NULL
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -166,7 +168,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	char *CAkeyfile=NULL,*CAserial=NULL;
 | 
						char *CAkeyfile=NULL,*CAserial=NULL;
 | 
				
			||||||
	char *alias=NULL;
 | 
						char *alias=NULL;
 | 
				
			||||||
	int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0;
 | 
						int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0;
 | 
				
			||||||
	int ocspid=0;
 | 
						int next_serial=0,ocspid=0;
 | 
				
			||||||
	int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0;
 | 
						int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0;
 | 
				
			||||||
	int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0;
 | 
						int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0;
 | 
				
			||||||
	int C=0;
 | 
						int C=0;
 | 
				
			||||||
@@ -183,7 +185,9 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
	int need_rand = 0;
 | 
						int need_rand = 0;
 | 
				
			||||||
	int checkend=0,checkoffset=0;
 | 
						int checkend=0,checkoffset=0;
 | 
				
			||||||
	unsigned long nmflag = 0, certflag = 0;
 | 
						unsigned long nmflag = 0, certflag = 0;
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
	char *engine=NULL;
 | 
						char *engine=NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	reqfile=0;
 | 
						reqfile=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -354,23 +358,21 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			if (!set_name_ex(&nmflag, *(++argv))) goto bad;
 | 
								if (!set_name_ex(&nmflag, *(++argv))) goto bad;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		else if (strcmp(*argv,"-setalias") == 0)
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
					 | 
				
			||||||
			alias= *(++argv);
 | 
					 | 
				
			||||||
			trustout = 1;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
							else if (strcmp(*argv,"-engine") == 0)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			if (--argc < 1) goto bad;
 | 
								if (--argc < 1) goto bad;
 | 
				
			||||||
			engine= *(++argv);
 | 
								engine= *(++argv);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		else if (strcmp(*argv,"-C") == 0)
 | 
							else if (strcmp(*argv,"-C") == 0)
 | 
				
			||||||
			C= ++num;
 | 
								C= ++num;
 | 
				
			||||||
		else if (strcmp(*argv,"-email") == 0)
 | 
							else if (strcmp(*argv,"-email") == 0)
 | 
				
			||||||
			email= ++num;
 | 
								email= ++num;
 | 
				
			||||||
		else if (strcmp(*argv,"-serial") == 0)
 | 
							else if (strcmp(*argv,"-serial") == 0)
 | 
				
			||||||
			serial= ++num;
 | 
								serial= ++num;
 | 
				
			||||||
 | 
							else if (strcmp(*argv,"-next_serial") == 0)
 | 
				
			||||||
 | 
								next_serial= ++num;
 | 
				
			||||||
		else if (strcmp(*argv,"-modulus") == 0)
 | 
							else if (strcmp(*argv,"-modulus") == 0)
 | 
				
			||||||
			modulus= ++num;
 | 
								modulus= ++num;
 | 
				
			||||||
		else if (strcmp(*argv,"-pubkey") == 0)
 | 
							else if (strcmp(*argv,"-pubkey") == 0)
 | 
				
			||||||
@@ -450,7 +452,9 @@ bad:
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_ENGINE
 | 
				
			||||||
        e = setup_engine(bio_err, engine, 0);
 | 
					        e = setup_engine(bio_err, engine, 0);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (need_rand)
 | 
						if (need_rand)
 | 
				
			||||||
		app_RAND_load_file(NULL, bio_err, 0);
 | 
							app_RAND_load_file(NULL, bio_err, 0);
 | 
				
			||||||
@@ -615,7 +619,7 @@ bad:
 | 
				
			|||||||
		if (xca == NULL) goto end;
 | 
							if (xca == NULL) goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!noout || text)
 | 
						if (!noout || text || next_serial)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		OBJ_create("2.99999.3",
 | 
							OBJ_create("2.99999.3",
 | 
				
			||||||
			"SET.ex3","SET x509v3 extension 3");
 | 
								"SET.ex3","SET x509v3 extension 3");
 | 
				
			||||||
@@ -689,6 +693,24 @@ bad:
 | 
				
			|||||||
				i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber);
 | 
									i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber);
 | 
				
			||||||
				BIO_printf(STDout,"\n");
 | 
									BIO_printf(STDout,"\n");
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
								else if (next_serial == i)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
									BIGNUM *bnser;
 | 
				
			||||||
 | 
									ASN1_INTEGER *ser;
 | 
				
			||||||
 | 
									ser = X509_get_serialNumber(x);
 | 
				
			||||||
 | 
									bnser = ASN1_INTEGER_to_BN(ser, NULL);
 | 
				
			||||||
 | 
									if (!bnser)
 | 
				
			||||||
 | 
										goto end;
 | 
				
			||||||
 | 
									if (!BN_add_word(bnser, 1))
 | 
				
			||||||
 | 
										goto end;
 | 
				
			||||||
 | 
									ser = BN_to_ASN1_INTEGER(bnser, NULL);
 | 
				
			||||||
 | 
									if (!ser)
 | 
				
			||||||
 | 
										goto end;
 | 
				
			||||||
 | 
									BN_free(bnser);
 | 
				
			||||||
 | 
									i2a_ASN1_INTEGER(out, ser);
 | 
				
			||||||
 | 
									ASN1_INTEGER_free(ser);
 | 
				
			||||||
 | 
									BIO_puts(out, "\n");
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
			else if (email == i) 
 | 
								else if (email == i) 
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				int j;
 | 
									int j;
 | 
				
			||||||
@@ -870,10 +892,6 @@ bad:
 | 
				
			|||||||
		                if (Upkey->type == EVP_PKEY_DSA)
 | 
							                if (Upkey->type == EVP_PKEY_DSA)
 | 
				
			||||||
		                        digest=EVP_dss1();
 | 
							                        digest=EVP_dss1();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
				if (Upkey->type == EVP_PKEY_EC)
 | 
					 | 
				
			||||||
					digest=EVP_ecdsa();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
				assert(need_rand);
 | 
									assert(need_rand);
 | 
				
			||||||
				if (!sign(x,Upkey,days,clrext,digest,
 | 
									if (!sign(x,Upkey,days,clrext,digest,
 | 
				
			||||||
@@ -894,10 +912,6 @@ bad:
 | 
				
			|||||||
		                if (CApkey->type == EVP_PKEY_DSA)
 | 
							                if (CApkey->type == EVP_PKEY_DSA)
 | 
				
			||||||
		                        digest=EVP_dss1();
 | 
							                        digest=EVP_dss1();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
				if (CApkey->type == EVP_PKEY_EC)
 | 
					 | 
				
			||||||
					digest = EVP_ecdsa();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
				assert(need_rand);
 | 
									assert(need_rand);
 | 
				
			||||||
				if (!x509_certify(ctx,CAfile,digest,x,xca,
 | 
									if (!x509_certify(ctx,CAfile,digest,x,xca,
 | 
				
			||||||
@@ -929,10 +943,6 @@ bad:
 | 
				
			|||||||
		                if (pk->type == EVP_PKEY_DSA)
 | 
							                if (pk->type == EVP_PKEY_DSA)
 | 
				
			||||||
		                        digest=EVP_dss1();
 | 
							                        digest=EVP_dss1();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_ECDSA
 | 
					 | 
				
			||||||
				if (pk->type == EVP_PKEY_EC)
 | 
					 | 
				
			||||||
					digest=EVP_ecdsa();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
				rq=X509_to_X509_REQ(x,pk,digest);
 | 
									rq=X509_to_X509_REQ(x,pk,digest);
 | 
				
			||||||
				EVP_PKEY_free(pk);
 | 
									EVP_PKEY_free(pk);
 | 
				
			||||||
@@ -1029,34 +1039,34 @@ end:
 | 
				
			|||||||
	sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
 | 
						sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
 | 
				
			||||||
	if (passin) OPENSSL_free(passin);
 | 
						if (passin) OPENSSL_free(passin);
 | 
				
			||||||
	apps_shutdown();
 | 
						apps_shutdown();
 | 
				
			||||||
	EXIT(ret);
 | 
						OPENSSL_EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
 | 
					static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	char *buf = NULL, *p;
 | 
						char *buf = NULL, *p;
 | 
				
			||||||
	MS_STATIC char buf2[1024];
 | 
						ASN1_INTEGER *bs = NULL;
 | 
				
			||||||
	ASN1_INTEGER *bs = NULL, *bs2 = NULL;
 | 
					 | 
				
			||||||
	BIO *io = NULL;
 | 
					 | 
				
			||||||
	BIGNUM *serial = NULL;
 | 
						BIGNUM *serial = NULL;
 | 
				
			||||||
 | 
						size_t len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	buf=OPENSSL_malloc( ((serialfile == NULL)
 | 
						len = ((serialfile == NULL)
 | 
				
			||||||
			?(strlen(CAfile)+strlen(POSTFIX)+1)
 | 
							?(strlen(CAfile)+strlen(POSTFIX)+1)
 | 
				
			||||||
			:(strlen(serialfile)))+1);
 | 
							:(strlen(serialfile)))+1;
 | 
				
			||||||
 | 
						buf=OPENSSL_malloc(len);
 | 
				
			||||||
	if (buf == NULL) { BIO_printf(bio_err,"out of mem\n"); goto end; }
 | 
						if (buf == NULL) { BIO_printf(bio_err,"out of mem\n"); goto end; }
 | 
				
			||||||
	if (serialfile == NULL)
 | 
						if (serialfile == NULL)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		strcpy(buf,CAfile);
 | 
							BUF_strlcpy(buf,CAfile,len);
 | 
				
			||||||
		for (p=buf; *p; p++)
 | 
							for (p=buf; *p; p++)
 | 
				
			||||||
			if (*p == '.')
 | 
								if (*p == '.')
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
				*p='\0';
 | 
									*p='\0';
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
		strcat(buf,POSTFIX);
 | 
							BUF_strlcat(buf,POSTFIX,len);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		strcpy(buf,serialfile);
 | 
							BUF_strlcpy(buf,serialfile,len);
 | 
				
			||||||
	serial=BN_new();
 | 
						serial=BN_new();
 | 
				
			||||||
	bs=ASN1_INTEGER_new();
 | 
						bs=ASN1_INTEGER_new();
 | 
				
			||||||
	if ((serial == NULL) || (bs == NULL))
 | 
						if ((serial == NULL) || (bs == NULL))
 | 
				
			||||||
@@ -1065,72 +1075,18 @@ static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	io=BIO_new(BIO_s_file());
 | 
						serial = load_serial(buf, create, NULL);
 | 
				
			||||||
	if (io == NULL)
 | 
						if (serial == NULL) goto end;
 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ERR_print_errors(bio_err);
 | 
					 | 
				
			||||||
		goto end;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	if (BIO_read_filename(io,buf) <= 0)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (!create)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			perror(buf);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1_INTEGER_set(bs,1);
 | 
					 | 
				
			||||||
			BN_one(serial);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	else 
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		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);
 | 
					 | 
				
			||||||
			goto end;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			serial=BN_bin2bn(bs->data,bs->length,serial);
 | 
					 | 
				
			||||||
			if (serial == NULL)
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				BIO_printf(bio_err,"error converting bin 2 bn");
 | 
					 | 
				
			||||||
				goto end;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!BN_add_word(serial,1))
 | 
						if (!BN_add_word(serial,1))
 | 
				
			||||||
		{ BIO_printf(bio_err,"add_word failure\n"); goto end; }
 | 
							{ BIO_printf(bio_err,"add_word failure\n"); goto end; }
 | 
				
			||||||
	if (!(bs2 = BN_to_ASN1_INTEGER(serial, NULL)))
 | 
					 | 
				
			||||||
		{ BIO_printf(bio_err,"error converting bn 2 asn1_integer\n"); goto end; }
 | 
					 | 
				
			||||||
	if (BIO_write_filename(io,buf) <= 0)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		BIO_printf(bio_err,"error attempting to write serial number file\n");
 | 
					 | 
				
			||||||
		perror(buf);
 | 
					 | 
				
			||||||
		goto end;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	i2a_ASN1_INTEGER(io,bs2);
 | 
					 | 
				
			||||||
	BIO_puts(io,"\n");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	BIO_free(io);
 | 
						if (!save_serial(buf, NULL, serial, &bs)) goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 end:
 | 
				
			||||||
	if (buf) OPENSSL_free(buf);
 | 
						if (buf) OPENSSL_free(buf);
 | 
				
			||||||
	ASN1_INTEGER_free(bs2);
 | 
					 | 
				
			||||||
	BN_free(serial);
 | 
						BN_free(serial);
 | 
				
			||||||
	io=NULL;
 | 
					 | 
				
			||||||
	return bs;
 | 
						return bs;
 | 
				
			||||||
 | 
					 | 
				
			||||||
	end:
 | 
					 | 
				
			||||||
	if (buf) OPENSSL_free(buf);
 | 
					 | 
				
			||||||
	BIO_free(io);
 | 
					 | 
				
			||||||
	ASN1_INTEGER_free(bs);
 | 
					 | 
				
			||||||
	BN_free(serial);
 | 
					 | 
				
			||||||
	return NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
 | 
					static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
 | 
				
			||||||
@@ -1152,10 +1108,10 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
 | 
				
			|||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if (sno) bs = sno;
 | 
						if (sno) bs = sno;
 | 
				
			||||||
	else if (!(bs = load_serial(CAfile, serialfile, create)))
 | 
						else if (!(bs = x509_load_serial(CAfile, serialfile, create)))
 | 
				
			||||||
		goto end;
 | 
							goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!X509_STORE_add_cert(ctx,x)) goto end;
 | 
					/*	if (!X509_STORE_add_cert(ctx,x)) goto end;*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* NOTE: this certificate can/should be self signed, unless it was
 | 
						/* NOTE: this certificate can/should be self signed, unless it was
 | 
				
			||||||
	 * a certificate request in which case it is not. */
 | 
						 * a certificate request in which case it is not. */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@ RC4-MD5, but a re-connect tries to use DES-CBC-SHA.  So netscape, when
 | 
				
			|||||||
doing a re-connect, always takes the first cipher in the cipher list.
 | 
					doing a re-connect, always takes the first cipher in the cipher list.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If we accept a netscape connection, demand a client cert, have a
 | 
					If we accept a netscape connection, demand a client cert, have a
 | 
				
			||||||
non-self-sighed CA which does not have it's CA in netscape, and the
 | 
					non-self-signed CA which does not have it's CA in netscape, and the
 | 
				
			||||||
browser has a cert, it will crash/hang.  Works for 3.x and 4.xbeta
 | 
					browser has a cert, it will crash/hang.  Works for 3.x and 4.xbeta
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Netscape browsers do not really notice the server sending a
 | 
					Netscape browsers do not really notice the server sending a
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										23
									
								
								certs/eng1.pem
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								certs/eng1.pem
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
 | 
					MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
				
			||||||
 | 
					CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9CYW5rRW5n
 | 
				
			||||||
 | 
					aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
				
			||||||
 | 
					aW9uMRMwEQYDVQQDEwpiYW5rZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBiYW5r
 | 
				
			||||||
 | 
					ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
				
			||||||
 | 
					CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
				
			||||||
 | 
					BAoTD0JhbmtFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
				
			||||||
 | 
					b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmJhbmtlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
				
			||||||
 | 
					CQEWEWNhQGJhbmtlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
 | 
				
			||||||
 | 
					CgKCAQEA14LoTUAl1/hEy+Kh1kLHiBdW2zD3V4IhM7xxTVKsYsIH56nr69ATTIxU
 | 
				
			||||||
 | 
					P36eRzeZ137qt1AxHFjDCidk3m1Ul6l59ProPexdslLLM2npM3f2cteg+toyiYiS
 | 
				
			||||||
 | 
					EJKjyzIu1xF1j9qzGkymSY/4DsXLZNk9FaczxMk/Ooc6Os1M3AverL4VG4rYIb6f
 | 
				
			||||||
 | 
					eR32cIKJ9Q1fGuyKk7ipq1XQfPW8a8TgZdbHbe7U9Gk3iasGMHHvpR9Ep3mGbgdT
 | 
				
			||||||
 | 
					uQ98SBEuIwe1BUCGg/MXpVy48MNXfAMotBgGw4pl9yqSjMni2FB+E9Q9DHFs2RgX
 | 
				
			||||||
 | 
					MqzKuo8zcPxKx2kZ6Arj8+27dw2clQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
 | 
				
			||||||
 | 
					CSqGSIb3DQEBBQUAA4IBAQBauupHX9EhpC/r57d6b5kkeWvognxIP9//TO4iw3qb
 | 
				
			||||||
 | 
					zIXEkPXmJmwVzlzoKJWqiya+aw19SP0+G6CzsFOBo/9ehmz+hZ8bhYX4MjlWzX5u
 | 
				
			||||||
 | 
					Tnkhz172j9fOBUmrTVPkcRIs6zjCD5PQAGoBPP1/Zdy2N36lZ0U7lg07Opirj/yJ
 | 
				
			||||||
 | 
					PSJeM2j0fwIFAroiVckvdT0BVwB6S/cPaAQGPghbbr1YGSmYrMriSv825ILJUfxz
 | 
				
			||||||
 | 
					rJYunGR9FiY9Ob7+jwJwiZMS4CxSPktutxr/3hOvr1+ALS7IcVakhhA3PuZAJbdH
 | 
				
			||||||
 | 
					FRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA
 | 
				
			||||||
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
							
								
								
									
										23
									
								
								certs/eng2.pem
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								certs/eng2.pem
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
 | 
					MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
				
			||||||
 | 
					CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9DZXJ0RW5n
 | 
				
			||||||
 | 
					aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
				
			||||||
 | 
					aW9uMRMwEQYDVQQDEwpjZXJ0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBjZXJ0
 | 
				
			||||||
 | 
					ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
				
			||||||
 | 
					CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
				
			||||||
 | 
					BAoTD0NlcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
				
			||||||
 | 
					b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmNlcnRlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
				
			||||||
 | 
					CQEWEWNhQGNlcnRlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
 | 
				
			||||||
 | 
					CgKCAQEA7aTXURShaeVt9u/dP3Q2dVib3jTCZvEyc6yfpGgaYWewXWuP4HOSfI4h
 | 
				
			||||||
 | 
					GZblbpl+dzJc6RjhR+pguIRtbT5FJB8SJGjRqoujBEOQOxtVtc2fjM9Dqh0iOvMW
 | 
				
			||||||
 | 
					WS6buxHG55GVrHAQaO5HXEScKQBa9ZyNmpSXPTEBrDMej1OAGOkc524/TZrgFPF4
 | 
				
			||||||
 | 
					AiJLLkxCcP8NuzUKlW3WzNMSSoCtjkUKy4wjSLlAWCFM0T9Df6/+Z8ZUQTzHoKCD
 | 
				
			||||||
 | 
					ncH5Qnynd7DlOwKQ2JwwxRhYGiGVTUN0GUq7qA11kW3+vnbFesKQXoF6o2PVx9s2
 | 
				
			||||||
 | 
					YXviI2NXXUjZ0pVnsnFCc45Pm8XojwIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
 | 
				
			||||||
 | 
					CSqGSIb3DQEBBQUAA4IBAQBP/aHOKJ00Akzc9HWM1X30hlWZFBaQi4pqD4Uhk8+p
 | 
				
			||||||
 | 
					KzzwFP5DRLBOz8TYBbtdXrS6hxVMr2sqWmhVkuyepWhHZazKGyHY/y0FbOXsewAV
 | 
				
			||||||
 | 
					1QxxSyx7ve89pCKv4/w0rQcP916iHc8Y/TCpmz7eITa3GId+8H/XTaBi8GBp9X9O
 | 
				
			||||||
 | 
					w8m25FmEB1NT+eJwefvfdKowjy4tSorKdW/eJspxNuTSRGmUy8G71W5dYvgpAlx6
 | 
				
			||||||
 | 
					mdnHyzxEGvRYNNI2bS0ifXgbEFNWqSas9q34ea5KOpkJu8T/KyXfSb6rPOsBSb0t
 | 
				
			||||||
 | 
					wMowwGtCVH2C4Lw/8zo0EjhMpTOsPaub408PrZ+NQ2bl
 | 
				
			||||||
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
							
								
								
									
										34
									
								
								certs/eng3.pem
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								certs/eng3.pem
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
 | 
					MIIF3TCCA8WgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
				
			||||||
 | 
					CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9Gb3J0RW5n
 | 
				
			||||||
 | 
					aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
				
			||||||
 | 
					aW9uMRMwEQYDVQQDEwpmb3J0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBmb3J0
 | 
				
			||||||
 | 
					ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
				
			||||||
 | 
					CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
				
			||||||
 | 
					BAoTD0ZvcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
				
			||||||
 | 
					b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmZvcnRlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
				
			||||||
 | 
					CQEWEWNhQGZvcnRlbmdpbmUuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
 | 
				
			||||||
 | 
					CgKCAgEAyr7GbpwDxx1v3EYbo0gcO+ligEhlDqG2e7u/AbWGoVAqc8+q6auUJUtz
 | 
				
			||||||
 | 
					4i7oh0yNadu1o9kpXW+znkgO0zlrgjGskqqMO1ooppzTJdFy/P8gR6x1Iuv3kWtX
 | 
				
			||||||
 | 
					OuzwPPEjv09LWlhyJsN+oU4ztTVf07I0Q9zYupcoDQ58XKRheI9KdDB2DYSmxywA
 | 
				
			||||||
 | 
					WSLQwIeG0Qa7gvokeQlpkgkEC7viEecJ3752KXBJHnh7As51mxnlpmG6sDy67Eli
 | 
				
			||||||
 | 
					HDw5tHETRqbtnscGBjskGQBqR5xt7+QnnthZrN8HJHDoa9zgGephwizhkL44lXLF
 | 
				
			||||||
 | 
					YK9W5XhFbblw2c+mAcHkokRiwD7CPeIoyD2a/Jcw3n5hegKTlNhd4BFGVF6JR7gF
 | 
				
			||||||
 | 
					OFk2QfHXit5uthsij9Xhl7WAgQUqLgggD9MphqPf4nY66OZUJV9ZsmB+Qfp8UizB
 | 
				
			||||||
 | 
					0WAOegactKVyRqHtRa+KIEXQXNtZgjcmMk9CYkP0nIbKtgKXaH6+9VMHNOryCnFE
 | 
				
			||||||
 | 
					7pSsuPUkypncFWCHGSeiFO3w4w4J4csltxBADQzxfRu5KZnlToQN7bVpI/Q31tVX
 | 
				
			||||||
 | 
					E5bjrJcq6Oj/OTqZ3ID+OqbkUdAg0ggjRKcTgxnLHd/AbMzJ6PsclDDf7cLs0WSl
 | 
				
			||||||
 | 
					xMxQR/z5bNST1rNtT9rsiv2TOhfvCBxO9AOjBioO8PLO032HTNECAwEAAaMQMA4w
 | 
				
			||||||
 | 
					DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAgEAVyBpPWfT2VOyvVpslGKx
 | 
				
			||||||
 | 
					8h0+CWP8cilygGRtZJ5dAJzc//1REAHdvK+TgZ4Foz3dqHhXI+RNN0FpzuWaYMjW
 | 
				
			||||||
 | 
					ZTS0kAmcOQuGY1Oo4PGlPHI21pNz29oFDTJr0ZmLBJ4JKVsE2soJg55jdk9MZHA7
 | 
				
			||||||
 | 
					K//7HH9RsmrWZOE5DZDlrxp6+naixhMwnlPKKisIy9GNZUPqGdUWABMdB/BUVVNl
 | 
				
			||||||
 | 
					NU5TtWpIXUClMd8a+eoKcItBeYXowkHOBpinPkDX3clFDIUfWiw0Ro08s8SrrFqR
 | 
				
			||||||
 | 
					8Szwbrj52Xv1RM56oGqCjnkvJctxihODV7NcpxoAFjIZokDom0q6zPrrTUsLFQov
 | 
				
			||||||
 | 
					Plovc3w5hmALiDMshaTvE1nm3Psn4yQ+FlRE8epTZrQiIGypZkZC6lcz0mYawueW
 | 
				
			||||||
 | 
					cThYWGFhVG4ktQzOjjNRsNxopW+W7cF1zQTxiWUDnxIKSj7gtdQ2jiubxEEhfVag
 | 
				
			||||||
 | 
					r8DMtAccNVTZVURpGi56TptOOuotrTqqC+2GviW4hlxvdvmuQN0OlXlUwzz2Trxc
 | 
				
			||||||
 | 
					FamNnuA54lZw/8arLtxsFmHrcnPw53+1spumLD0S5UkxHNu40h6LIVpZz3H+0rLz
 | 
				
			||||||
 | 
					uFofTfiyMjcfK2AyHQTgUCbsrvgNuLDQUbyFGVchdFUkhztX3DhEVnxnnrpY4BVj
 | 
				
			||||||
 | 
					QdTqWIvw7lGlSuDCjxEQAOc=
 | 
				
			||||||
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
							
								
								
									
										23
									
								
								certs/eng4.pem
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								certs/eng4.pem
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
 | 
					MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
 | 
				
			||||||
 | 
					CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9NYWlsRW5n
 | 
				
			||||||
 | 
					aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
 | 
				
			||||||
 | 
					aW9uMRMwEQYDVQQDEwptYWlsZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBtYWls
 | 
				
			||||||
 | 
					ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
 | 
				
			||||||
 | 
					CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
 | 
				
			||||||
 | 
					BAoTD01haWxFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
 | 
				
			||||||
 | 
					b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCm1haWxlbmdpbmUxIDAeBgkqhkiG9w0B
 | 
				
			||||||
 | 
					CQEWEWNhQG1haWxlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
 | 
				
			||||||
 | 
					CgKCAQEAqXmfsU+lx+NFmn6tN17RTOyaddHqLnr/3rzEDIyT9TN+tF9TG7jmK7lJ
 | 
				
			||||||
 | 
					Jrj5arQ3nTFaLF8JuND2U1z/cLPw6/TX+1tE3v3CNUDSjaisyUDiUyp3TE8hMMMz
 | 
				
			||||||
 | 
					zfZQn0JsGgNhhWxqyzjhRQGtKL4+xtn8VsF/8zGgZYke7nlmVKz/FslDFTnNoodL
 | 
				
			||||||
 | 
					BAEGiu9JQS9qqpbSs20NdZ6LXPL2A4iTjnsNFBW3jIMVIn/JVVyaycU7ue2oFviD
 | 
				
			||||||
 | 
					vLNpkVZcR7A+jjIdIumOc5VSF0y7y74cQC5YwkR2mLK7UBYDK6NCY3ta/C4M8NsM
 | 
				
			||||||
 | 
					0FpmvRl0+A1ivZtVwqI98dxDtp7HeQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
 | 
				
			||||||
 | 
					CSqGSIb3DQEBBQUAA4IBAQAjfNn5BCzxylBDakFQGWKE/P43PRibMOEzfd7+DzbY
 | 
				
			||||||
 | 
					WIekoz3i00DwoH3b6j4gwlDJRAOq4dF6/Pt/uBOHDo/op+ef+9ErmKPd+ehXN9h3
 | 
				
			||||||
 | 
					7QbccTgz7DtVwA4iRlDRLru+JuXzT+OsCHuFZMOLJ+KD2JAGh3W68JjdcLkrlcpt
 | 
				
			||||||
 | 
					AU0wc5aOHPPfEBdIah8y8QtNzXRVzoBt8zzvgCARkXxTS2u/9QaXR1hML0JtDgQS
 | 
				
			||||||
 | 
					SdZ6Kd8SN6yzqxD+buYD5sOfJmjBF/n3lqFHNMHnnGXy2TAXZtIAWzffU3A0cGPB
 | 
				
			||||||
 | 
					N6FZ026a86HbF1X4k+xszhbJu/ikczyuWnCJIg3fTYSD
 | 
				
			||||||
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
							
								
								
									
										23
									
								
								certs/eng5.pem
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								certs/eng5.pem
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
 | 
					MIID6TCCAtGgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UEBhMCQ0Ex
 | 
				
			||||||
 | 
					CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRowGAYDVQQKExFUcmFkZXJF
 | 
				
			||||||
 | 
					bmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2
 | 
				
			||||||
 | 
					aXNpb24xFTATBgNVBAMTDHRyYWRlcmVuZ2luZTEiMCAGCSqGSIb3DQEJARYTY2FA
 | 
				
			||||||
 | 
					dHJhZGVyZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBa
 | 
				
			||||||
 | 
					MIGuMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8x
 | 
				
			||||||
 | 
					GjAYBgNVBAoTEVRyYWRlckVuZ2luZSBJbmMuMSkwJwYDVQQLEyBDZXJ0aWZpY2F0
 | 
				
			||||||
 | 
					aW9uIEF1dGhvcml0eSBEaXZpc2lvbjEVMBMGA1UEAxMMdHJhZGVyZW5naW5lMSIw
 | 
				
			||||||
 | 
					IAYJKoZIhvcNAQkBFhNjYUB0cmFkZXJlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0B
 | 
				
			||||||
 | 
					AQEFAAOCAQ8AMIIBCgKCAQEAzyX5QE+5SN+zgNn1v3zp9HmP4hQOWW8WuEVItZVP
 | 
				
			||||||
 | 
					9bt/xj5NeJd1kyPL/SqnF2qHcL3o/74r0Ga55aKHniwKYgQTlp5ELGfQ568QQeN9
 | 
				
			||||||
 | 
					xNIHtUXeStI9zCNZyZC+4YqObdMR/ivKA/WsLfUVMl2lV5JzJJz1BOE0gKEYiEyz
 | 
				
			||||||
 | 
					gIq5oLzkP/mOXoHRvWSZD2D0eHYIO7ovV2epVFK7g7p+dC4QoeIUEli+GF/Myg88
 | 
				
			||||||
 | 
					dV/qmi+Sybck2RLPXa8Nh27/ETVQ7kE1Eafmx7EyCqIhG+5lwJAy3HwHUBwAYuzj
 | 
				
			||||||
 | 
					iuZz5lD8aQmr8SKuvy3eOH9SVN5wh3YBlrNGwTStkESVLwIDAQABoxAwDjAMBgNV
 | 
				
			||||||
 | 
					HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAWOPAUhZd3x9EQiFJcuxFTMd9q
 | 
				
			||||||
 | 
					axgcriCzJsM6D96sYGko9xTeLhX/lr1bliVYI5AlupoLXAdMzGHJkOgaTirKjQXr
 | 
				
			||||||
 | 
					F9nymDdUWKe3TmwGob5016nQlH7qRKvGO3hka0rOGRK2U/2JT/4Qp8iH/DFi6cyM
 | 
				
			||||||
 | 
					uP0q8n64SAkxZXLzUuFQXqf7U/SNjzb9XJQEIAdjp7eYd3Qb4jDsDcX0FrKMF1aV
 | 
				
			||||||
 | 
					r0dCDnS7am7WTXPYCDGdSkPgEHEtLYIYH3lZp5sKdVZ9wl4F0WNFkRWRUr7AXPjw
 | 
				
			||||||
 | 
					50uLmUNmKCd8JZLMGA1TRNSTi7U9EcrWt0OkMWm74T2WVnAgNsDv2WrWsGfj
 | 
				
			||||||
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
							
								
								
									
										18
									
								
								certs/expired/vsign3.pem
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								certs/expired/vsign3.pem
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
 | 
				
			||||||
 | 
					notBefore=Jan 29 00:00:00 1996 GMT
 | 
				
			||||||
 | 
					notAfter=Jan  7 23:59:59 2004 GMT
 | 
				
			||||||
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
 | 
					MIICPTCCAaYCEQDknv3zOugOz6URPhmkJAIyMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
 | 
				
			||||||
 | 
					BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
 | 
				
			||||||
 | 
					c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
 | 
				
			||||||
 | 
					NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
 | 
				
			||||||
 | 
					VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJp
 | 
				
			||||||
 | 
					bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
 | 
				
			||||||
 | 
					jQAwgYkCgYEAyVxZnvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqo
 | 
				
			||||||
 | 
					RAWq7AMfeH+ek7maAKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4
 | 
				
			||||||
 | 
					rCNfcCk2pMmG57GaIMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATAN
 | 
				
			||||||
 | 
					BgkqhkiG9w0BAQIFAAOBgQBhcOwvP579K+ZoVCGwZ3kIDCCWMYoNer62Jt95LCJp
 | 
				
			||||||
 | 
					STbjl3diYaIy13pUITa6Ask05yXaRDWw0lyAXbOU+Pms7qRgdSoflUkjsUp89LNH
 | 
				
			||||||
 | 
					ciFbfperVKxi513srpvSybIk+4Kt6WcVS7qqpvCXoPawl1cAyAw8CaCCBLpB2veZ
 | 
				
			||||||
 | 
					pA==
 | 
				
			||||||
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
@@ -1,18 +1,17 @@
 | 
				
			|||||||
subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
 | 
					subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
 | 
				
			||||||
notBefore=Jan 29 00:00:00 1996 GMT
 | 
					notBefore=Jan 29 00:00:00 1996 GMT
 | 
				
			||||||
notAfter=Jan  7 23:59:59 2004 GMT
 | 
					notAfter=Aug  1 23:59:59 2028 GMT
 | 
				
			||||||
-----BEGIN CERTIFICATE-----
 | 
					-----BEGIN CERTIFICATE-----
 | 
				
			||||||
MIICPTCCAaYCEQDknv3zOugOz6URPhmkJAIyMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
 | 
					MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
 | 
				
			||||||
BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
 | 
					A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
 | 
				
			||||||
c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
 | 
					cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
 | 
				
			||||||
NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
 | 
					MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
 | 
				
			||||||
VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJp
 | 
					BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
 | 
				
			||||||
bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
 | 
					YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
 | 
				
			||||||
jQAwgYkCgYEAyVxZnvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqo
 | 
					ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
 | 
				
			||||||
RAWq7AMfeH+ek7maAKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4
 | 
					BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
 | 
				
			||||||
rCNfcCk2pMmG57GaIMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATAN
 | 
					I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
 | 
				
			||||||
BgkqhkiG9w0BAQIFAAOBgQBhcOwvP579K+ZoVCGwZ3kIDCCWMYoNer62Jt95LCJp
 | 
					CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
 | 
				
			||||||
STbjl3diYaIy13pUITa6Ask05yXaRDWw0lyAXbOU+Pms7qRgdSoflUkjsUp89LNH
 | 
					lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
 | 
				
			||||||
ciFbfperVKxi513srpvSybIk+4Kt6WcVS7qqpvCXoPawl1cAyAw8CaCCBLpB2veZ
 | 
					AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
 | 
				
			||||||
pA==
 | 
					 | 
				
			||||||
-----END CERTIFICATE-----
 | 
					-----END CERTIFICATE-----
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										91
									
								
								config
									
									
									
									
									
								
							
							
						
						
									
										91
									
								
								config
									
									
									
									
									
								
							@@ -74,34 +74,27 @@ if [ "x$XREL" != "x" ]; then
 | 
				
			|||||||
		echo "whatever-whatever-sco5"; exit 0
 | 
							echo "whatever-whatever-sco5"; exit 0
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	    4.2MP)
 | 
						    4.2MP)
 | 
				
			||||||
		if [ "x$VERSION" = "x2.01" ]; then
 | 
							case "x${VERSION}" in
 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware201"; exit 0
 | 
							    x2.0*) echo "whatever-whatever-unixware20"; exit 0 ;;
 | 
				
			||||||
		elif [ "x$VERSION" = "x2.02" ]; then
 | 
							    x2.1*) echo "whatever-whatever-unixware21"; exit 0 ;;
 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware202"; exit 0
 | 
							    x2*)   echo "whatever-whatever-unixware2";  exit 0 ;;
 | 
				
			||||||
		elif [ "x$VERSION" = "x2.03" ]; then
 | 
							esac
 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware203"; exit 0
 | 
					 | 
				
			||||||
		elif [ "x$VERSION" = "x2.1.1" ]; then
 | 
					 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware211"; exit 0
 | 
					 | 
				
			||||||
		elif [ "x$VERSION" = "x2.1.2" ]; then
 | 
					 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware212"; exit 0
 | 
					 | 
				
			||||||
		elif [ "x$VERSION" = "x2.1.3" ]; then
 | 
					 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware213"; exit 0
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
		    echo "${MACHINE}-whatever-unixware2"; exit 0
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	    4.2)
 | 
						    4.2)
 | 
				
			||||||
		echo "whatever-whatever-unixware1"; exit 0
 | 
							echo "i386-whatever-unixware1"; exit 0
 | 
				
			||||||
		;;
 | 
					 | 
				
			||||||
	    OpenUNIX)
 | 
					 | 
				
			||||||
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x8" ]; then
 | 
					 | 
				
			||||||
		    echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
 | 
					 | 
				
			||||||
		fi
 | 
					 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	    5)
 | 
						    5)
 | 
				
			||||||
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
 | 
							case "x${VERSION}" in
 | 
				
			||||||
		    echo "${MACHINE}-sco-unixware7"; exit 0
 | 
							    # We hardcode i586 in place of ${MACHINE} for the
 | 
				
			||||||
		fi
 | 
							    # following reason. The catch is that even though Pentium
 | 
				
			||||||
 | 
							    # is minimum requirement for platforms in question,
 | 
				
			||||||
 | 
							    # ${MACHINE} gets always assigned to i386. Now, problem
 | 
				
			||||||
 | 
							    # with i386 is that it makes ./config pass 386 to
 | 
				
			||||||
 | 
							    # ./Configure, which in turn makes make generate
 | 
				
			||||||
 | 
							    # inefficient SHA-1 (for this moment) code.
 | 
				
			||||||
 | 
							    x7*)  echo "i586-sco-unixware7";           exit 0 ;;
 | 
				
			||||||
 | 
							    x8*)  echo "i586-unkn-OpenUNIX${VERSION}"; exit 0 ;;
 | 
				
			||||||
 | 
							esac
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	esac
 | 
						esac
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
@@ -141,7 +134,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
 | 
				
			|||||||
	HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 | 
						HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 | 
				
			||||||
	case "$HPUXVER" in
 | 
						case "$HPUXVER" in
 | 
				
			||||||
	    1[0-9].*)	# HPUX 10 and 11 targets are unified
 | 
						    1[0-9].*)	# HPUX 10 and 11 targets are unified
 | 
				
			||||||
		echo "${MACHINE}-hp-hpux10"; exit 0
 | 
							echo "${MACHINE}-hp-hpux1x"; exit 0
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	    *)
 | 
						    *)
 | 
				
			||||||
		echo "${MACHINE}-hp-hpux"; exit 0
 | 
							echo "${MACHINE}-hp-hpux"; exit 0
 | 
				
			||||||
@@ -196,7 +189,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
 | 
				
			|||||||
	echo "${MACHINE}-whatever-bsdi"; exit 0
 | 
						echo "${MACHINE}-whatever-bsdi"; exit 0
 | 
				
			||||||
	;;
 | 
						;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    FreeBSD:*)
 | 
					    FreeBSD:*:*:*386*)
 | 
				
			||||||
        VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
 | 
					        VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
 | 
				
			||||||
        MACH=`sysctl -n hw.model`
 | 
					        MACH=`sysctl -n hw.model`
 | 
				
			||||||
        ARCH='whatever'
 | 
					        ARCH='whatever'
 | 
				
			||||||
@@ -205,7 +198,6 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
 | 
				
			|||||||
           *486*       ) MACH="i486"     ;;
 | 
					           *486*       ) MACH="i486"     ;;
 | 
				
			||||||
           Pentium\ II*) MACH="i686"     ;;
 | 
					           Pentium\ II*) MACH="i686"     ;;
 | 
				
			||||||
           Pentium*    ) MACH="i586"     ;;
 | 
					           Pentium*    ) MACH="i586"     ;;
 | 
				
			||||||
           Alpha*      ) MACH="alpha"    ;;
 | 
					 | 
				
			||||||
           *           ) MACH="$MACHINE" ;;
 | 
					           *           ) MACH="$MACHINE" ;;
 | 
				
			||||||
        esac
 | 
					        esac
 | 
				
			||||||
        case ${MACH} in
 | 
					        case ${MACH} in
 | 
				
			||||||
@@ -214,6 +206,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
 | 
				
			|||||||
        echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
 | 
					        echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    FreeBSD:*)
 | 
				
			||||||
 | 
						echo "${MACHINE}-whatever-freebsd"; exit 0
 | 
				
			||||||
 | 
						;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    NetBSD:*:*:*386*)
 | 
					    NetBSD:*:*:*386*)
 | 
				
			||||||
        echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
 | 
					        echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
 | 
				
			||||||
	;;
 | 
						;;
 | 
				
			||||||
@@ -414,9 +410,10 @@ if [ "$SYSTEM" = "HP-UX" ];then
 | 
				
			|||||||
  GCC_BITS="32"
 | 
					  GCC_BITS="32"
 | 
				
			||||||
  if [ $GCCVER -ge 30 ]; then
 | 
					  if [ $GCCVER -ge 30 ]; then
 | 
				
			||||||
    # PA64 support only came in with gcc 3.0.x.
 | 
					    # PA64 support only came in with gcc 3.0.x.
 | 
				
			||||||
    # We look for the preprocessor symbol __LP64__ indicating
 | 
					    # We check if the preprocessor symbol __LP64__ is defined...
 | 
				
			||||||
    # 64bit bit long and pointer.  sizeof(int) == 32 on HPUX64.
 | 
					    if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
 | 
				
			||||||
    if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
 | 
					      : # __LP64__ has slipped through, it therefore is not defined
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
      GCC_BITS="64"
 | 
					      GCC_BITS="64"
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
@@ -461,6 +458,10 @@ if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
 | 
				
			|||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "${SYSTEM}" = "AIX" ]; then	# favor vendor cc over gcc
 | 
				
			||||||
 | 
					    (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CCVER=${CCVER:-0}
 | 
					CCVER=${CCVER:-0}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# read the output of the embedded GuessOS 
 | 
					# read the output of the embedded GuessOS 
 | 
				
			||||||
@@ -473,7 +474,7 @@ echo Operating system: $GUESSOS
 | 
				
			|||||||
# more time that I want to waste at the moment
 | 
					# more time that I want to waste at the moment
 | 
				
			||||||
case "$GUESSOS" in
 | 
					case "$GUESSOS" in
 | 
				
			||||||
  mips2-sgi-irix)
 | 
					  mips2-sgi-irix)
 | 
				
			||||||
	CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
 | 
						CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
 | 
				
			||||||
	CPU=${CPU:-0}
 | 
						CPU=${CPU:-0}
 | 
				
			||||||
	if [ $CPU -ge 4000 ]; then
 | 
						if [ $CPU -ge 4000 ]; then
 | 
				
			||||||
		options="$options -mips2"
 | 
							options="$options -mips2"
 | 
				
			||||||
@@ -481,7 +482,7 @@ case "$GUESSOS" in
 | 
				
			|||||||
	OUT="irix-$CC"
 | 
						OUT="irix-$CC"
 | 
				
			||||||
	;;
 | 
						;;
 | 
				
			||||||
  mips3-sgi-irix)
 | 
					  mips3-sgi-irix)
 | 
				
			||||||
	CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
 | 
						CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
 | 
				
			||||||
	CPU=${CPU:-0}
 | 
						CPU=${CPU:-0}
 | 
				
			||||||
	if [ $CPU -ge 5000 ]; then
 | 
						if [ $CPU -ge 5000 ]; then
 | 
				
			||||||
		options="$options -mips4"
 | 
							options="$options -mips4"
 | 
				
			||||||
@@ -497,7 +498,7 @@ case "$GUESSOS" in
 | 
				
			|||||||
	  echo "         You have about 5 seconds to press Ctrl-C to abort."
 | 
						  echo "         You have about 5 seconds to press Ctrl-C to abort."
 | 
				
			||||||
	  (stty -icanon min 0 time 50; read waste) < /dev/tty
 | 
						  (stty -icanon min 0 time 50; read waste) < /dev/tty
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
        CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
 | 
					        CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
 | 
				
			||||||
        CPU=${CPU:-0}
 | 
					        CPU=${CPU:-0}
 | 
				
			||||||
        if [ $CPU -ge 5000 ]; then
 | 
					        if [ $CPU -ge 5000 ]; then
 | 
				
			||||||
                options="$options -mips4"
 | 
					                options="$options -mips4"
 | 
				
			||||||
@@ -547,12 +548,13 @@ EOF
 | 
				
			|||||||
  ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
 | 
					  ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
 | 
				
			||||||
  i386-apple-darwin*) OUT="darwin-i386-cc" ;;
 | 
					  i386-apple-darwin*) OUT="darwin-i386-cc" ;;
 | 
				
			||||||
  sparc64-*-linux2)
 | 
					  sparc64-*-linux2)
 | 
				
			||||||
	#Before we can uncomment following lines we have to wait at least
 | 
						echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
 | 
				
			||||||
	#till 64-bit glibc for SPARC is operational:-(
 | 
						echo "         and wish to build 64-bit library, then you have to"
 | 
				
			||||||
	#echo "WARNING! If you wish to build 64-bit library, then you have to"
 | 
						echo "         invoke './Configure linux64-sparcv9' *manually*."
 | 
				
			||||||
	#echo "         invoke './Configure linux64-sparcv9' *manually*."
 | 
						if [ "$TEST" = "false" ]; then
 | 
				
			||||||
	#echo "         Type return if you want to continue, Ctrl-C to abort."
 | 
						  echo "          You have about 5 seconds to press Ctrl-C to abort."
 | 
				
			||||||
	#read waste < /dev/tty
 | 
						  (stty -icanon min 0 time 50; read waste) < /dev/tty
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
	OUT="linux-sparcv9" ;;
 | 
						OUT="linux-sparcv9" ;;
 | 
				
			||||||
  sparc-*-linux2)
 | 
					  sparc-*-linux2)
 | 
				
			||||||
	KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
 | 
						KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
 | 
				
			||||||
@@ -585,6 +587,7 @@ EOF
 | 
				
			|||||||
  arm*-*-linux2) OUT="linux-elf-arm" ;;
 | 
					  arm*-*-linux2) OUT="linux-elf-arm" ;;
 | 
				
			||||||
  s390-*-linux2) OUT="linux-s390" ;;
 | 
					  s390-*-linux2) OUT="linux-s390" ;;
 | 
				
			||||||
  s390x-*-linux?) OUT="linux-s390x" ;;
 | 
					  s390x-*-linux?) OUT="linux-s390x" ;;
 | 
				
			||||||
 | 
					  x86_64-*-linux?) OUT="linux-x86_64" ;;
 | 
				
			||||||
  *-*-linux2) OUT="linux-elf"
 | 
					  *-*-linux2) OUT="linux-elf"
 | 
				
			||||||
	if [ "$GCCVER" -gt 28 ]; then
 | 
						if [ "$GCCVER" -gt 28 ]; then
 | 
				
			||||||
          if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
 | 
					          if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
 | 
				
			||||||
@@ -638,6 +641,8 @@ EOF
 | 
				
			|||||||
  *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
 | 
					  *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
 | 
				
			||||||
  *-*-sunos4) OUT="sunos-$CC" ;;
 | 
					  *-*-sunos4) OUT="sunos-$CC" ;;
 | 
				
			||||||
  alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
 | 
					  alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
 | 
				
			||||||
 | 
					  sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;;
 | 
				
			||||||
 | 
					  ia64-*-freebsd*) OUT="FreeBSD-ia64" ;;
 | 
				
			||||||
  *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
 | 
					  *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
 | 
				
			||||||
  *-freebsd[1-2]*) OUT="FreeBSD" ;;
 | 
					  *-freebsd[1-2]*) OUT="FreeBSD" ;;
 | 
				
			||||||
  *86*-*-netbsd) OUT="NetBSD-x86" ;;
 | 
					  *86*-*-netbsd) OUT="NetBSD-x86" ;;
 | 
				
			||||||
@@ -681,7 +686,7 @@ EOF
 | 
				
			|||||||
	if [ $CC = "gcc" ];
 | 
						if [ $CC = "gcc" ];
 | 
				
			||||||
	then
 | 
						then
 | 
				
			||||||
	  if [ $GCC_BITS = "64" ]; then
 | 
						  if [ $GCC_BITS = "64" ]; then
 | 
				
			||||||
	    OUT="hpux64-parisc-gcc"
 | 
						    OUT="hpux64-parisc2-gcc"
 | 
				
			||||||
	  else
 | 
						  else
 | 
				
			||||||
	    OUT="hpux-parisc-gcc"
 | 
						    OUT="hpux-parisc-gcc"
 | 
				
			||||||
	  fi
 | 
						  fi
 | 
				
			||||||
@@ -694,9 +699,11 @@ EOF
 | 
				
			|||||||
	CPU_VERSION=${CPU_VERSION:-0}
 | 
						CPU_VERSION=${CPU_VERSION:-0}
 | 
				
			||||||
	# See <sys/unistd.h> for further info on CPU_VERSION.
 | 
						# See <sys/unistd.h> for further info on CPU_VERSION.
 | 
				
			||||||
	if   [ $CPU_VERSION -ge 768 ]; then	# IA-64 CPU
 | 
						if   [ $CPU_VERSION -ge 768 ]; then	# IA-64 CPU
 | 
				
			||||||
	     echo "NOTICE! 64-bit is the only ABI currently operational on HP-UXi."
 | 
						     echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
 | 
				
			||||||
	     echo "        Post request to openssl-dev@openssl.org for 32-bit support."
 | 
						     echo "         If you wish to build 32-bit library, the you have to"
 | 
				
			||||||
 | 
						     echo "         invoke './Configure hpux-ia64-cc' *manually*."
 | 
				
			||||||
	     if [ "$TEST" = "false" ]; then
 | 
						     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
 | 
							(stty -icanon min 0 time 50; read waste) < /dev/tty
 | 
				
			||||||
	     fi
 | 
						     fi
 | 
				
			||||||
	     OUT="hpux64-ia64-cc"
 | 
						     OUT="hpux64-ia64-cc"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,10 +11,9 @@ CFLAG=		-g
 | 
				
			|||||||
INSTALL_PREFIX=
 | 
					INSTALL_PREFIX=
 | 
				
			||||||
OPENSSLDIR=     /usr/local/ssl
 | 
					OPENSSLDIR=     /usr/local/ssl
 | 
				
			||||||
INSTALLTOP=	/usr/local/ssl
 | 
					INSTALLTOP=	/usr/local/ssl
 | 
				
			||||||
MAKE=           make -f Makefile.ssl
 | 
					 | 
				
			||||||
MAKEDEPPROG=	makedepend
 | 
					MAKEDEPPROG=	makedepend
 | 
				
			||||||
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
					MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
				
			||||||
MAKEFILE=       Makefile.ssl
 | 
					MAKEFILE=       Makefile
 | 
				
			||||||
RM=             rm -f
 | 
					RM=             rm -f
 | 
				
			||||||
AR=		ar r
 | 
					AR=		ar r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -28,7 +27,7 @@ LIBS=
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
SDIRS=	md2 md5 sha mdc2 hmac ripemd \
 | 
					SDIRS=	md2 md5 sha mdc2 hmac ripemd \
 | 
				
			||||||
	des rc2 rc4 rc5 idea bf cast \
 | 
						des rc2 rc4 rc5 idea bf cast \
 | 
				
			||||||
	bn ec rsa dsa ecdsa ecdh dh dso engine aes \
 | 
						bn ec rsa dsa dh dso engine aes \
 | 
				
			||||||
	buffer bio stack lhash rand err objects \
 | 
						buffer bio stack lhash rand err objects \
 | 
				
			||||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
						evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -36,25 +35,25 @@ GENERAL=Makefile README crypto-lib.com install.com
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
LIB= $(TOP)/libcrypto.a
 | 
					LIB= $(TOP)/libcrypto.a
 | 
				
			||||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
 | 
					SHARED_LIB= libcrypto$(SHLIB_EXT)
 | 
				
			||||||
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
 | 
					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 o_str.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
 | 
					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 o_str.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SRC= $(LIBSRC)
 | 
					SRC= $(LIBSRC)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
 | 
					EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
 | 
				
			||||||
	ossl_typ.h
 | 
						ossl_typ.h
 | 
				
			||||||
HEADER=	cryptlib.h buildinf.h md32_common.h o_time.h $(EXHEADER)
 | 
					HEADER=	cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALL=    $(GENERAL) $(SRC) $(HEADER)
 | 
					ALL=    $(GENERAL) $(SRC) $(HEADER)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
top:
 | 
					top:
 | 
				
			||||||
	@(cd ..; $(MAKE) DIRS=$(DIR) all)
 | 
						@(cd ..; $(MAKE) DIRS=$(DIR) all)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
all: buildinf.h lib subdirs shared
 | 
					all: shared
 | 
				
			||||||
 | 
					
 | 
				
			||||||
buildinf.h: ../Makefile.ssl
 | 
					buildinf.h: ../Makefile
 | 
				
			||||||
	( echo "#ifndef MK1MF_BUILD"; \
 | 
						( echo "#ifndef MK1MF_BUILD"; \
 | 
				
			||||||
	echo '  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
 | 
						echo '  /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
 | 
				
			||||||
	echo '  #define CFLAGS "$(CC) $(CFLAG)"'; \
 | 
						echo '  #define CFLAGS "$(CC) $(CFLAG)"'; \
 | 
				
			||||||
	echo '  #define PLATFORM "$(PLATFORM)"'; \
 | 
						echo '  #define PLATFORM "$(PLATFORM)"'; \
 | 
				
			||||||
	echo "  #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
 | 
						echo "  #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
 | 
				
			||||||
@@ -73,7 +72,7 @@ subdirs:
 | 
				
			|||||||
	done;
 | 
						done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
files:
 | 
					files:
 | 
				
			||||||
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
 | 
						$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
 | 
				
			||||||
	@for i in $(SDIRS) ;\
 | 
						@for i in $(SDIRS) ;\
 | 
				
			||||||
	do \
 | 
						do \
 | 
				
			||||||
	(cd $$i && echo "making 'files' in crypto/$$i..." && \
 | 
						(cd $$i && echo "making 'files' in crypto/$$i..." && \
 | 
				
			||||||
@@ -81,11 +80,9 @@ files:
 | 
				
			|||||||
	done;
 | 
						done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
links:
 | 
					links:
 | 
				
			||||||
	@$(TOP)/util/point.sh Makefile.ssl Makefile
 | 
					 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
 | 
						@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
 | 
						@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
 | 
						@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
 | 
				
			||||||
	@$(TOP)/util/point.sh Makefile.ssl Makefile
 | 
					 | 
				
			||||||
	@for i in $(SDIRS); do \
 | 
						@for i in $(SDIRS); do \
 | 
				
			||||||
	(cd $$i && echo "making links in crypto/$$i..." && \
 | 
						(cd $$i && echo "making links in crypto/$$i..." && \
 | 
				
			||||||
	$(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
 | 
						$(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
 | 
				
			||||||
@@ -96,7 +93,7 @@ lib:	$(LIBOBJ)
 | 
				
			|||||||
	$(RANLIB) $(LIB) || echo Never mind.
 | 
						$(RANLIB) $(LIB) || echo Never mind.
 | 
				
			||||||
	@touch lib
 | 
						@touch lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
shared:
 | 
					shared: buildinf.h lib subdirs
 | 
				
			||||||
	if [ -n "$(SHARED_LIBS)" ]; then \
 | 
						if [ -n "$(SHARED_LIBS)" ]; then \
 | 
				
			||||||
		(cd ..; $(MAKE) $(SHARED_LIB)); \
 | 
							(cd ..; $(MAKE) $(SHARED_LIB)); \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
@@ -141,7 +138,7 @@ depend:
 | 
				
			|||||||
	@for i in $(SDIRS) ;\
 | 
						@for i in $(SDIRS) ;\
 | 
				
			||||||
	do \
 | 
						do \
 | 
				
			||||||
	(cd $$i && echo "making depend in crypto/$$i..." && \
 | 
						(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;
 | 
						done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
@@ -203,6 +200,8 @@ mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
 | 
				
			|||||||
mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
					mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
				
			||||||
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 | 
					mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 | 
				
			||||||
mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
 | 
					mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
 | 
				
			||||||
 | 
					o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
 | 
				
			||||||
 | 
					o_str.o: o_str.h
 | 
				
			||||||
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
 | 
					o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
 | 
				
			||||||
o_time.o: o_time.h
 | 
					o_time.o: o_time.h
 | 
				
			||||||
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
 | 
					tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
 | 
				
			||||||
@@ -11,10 +11,9 @@ CFLAG=-g
 | 
				
			|||||||
INSTALL_PREFIX=
 | 
					INSTALL_PREFIX=
 | 
				
			||||||
OPENSSLDIR=     /usr/local/ssl
 | 
					OPENSSLDIR=     /usr/local/ssl
 | 
				
			||||||
INSTALLTOP=	/usr/local/ssl
 | 
					INSTALLTOP=	/usr/local/ssl
 | 
				
			||||||
MAKE=		make -f Makefile.ssl
 | 
					 | 
				
			||||||
MAKEDEPPROG=	makedepend
 | 
					MAKEDEPPROG=	makedepend
 | 
				
			||||||
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
					MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
				
			||||||
MAKEFILE=	Makefile.ssl
 | 
					MAKEFILE=	Makefile
 | 
				
			||||||
AR=		ar r
 | 
					AR=		ar r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
 | 
					# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
 | 
				
			||||||
@@ -49,10 +48,9 @@ lib:	$(LIBOBJ)
 | 
				
			|||||||
$(LIBOBJ): $(LIBSRC)
 | 
					$(LIBOBJ): $(LIBSRC)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
files:
 | 
					files:
 | 
				
			||||||
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
 | 
						$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
links:
 | 
					links:
 | 
				
			||||||
	@$(TOP)/util/point.sh Makefile.ssl Makefile
 | 
					 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
 | 
						@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
 | 
						@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
 | 
				
			||||||
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 | 
						@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 | 
				
			||||||
@@ -91,7 +89,8 @@ aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h
 | 
				
			|||||||
aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
					aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
				
			||||||
aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c aes_locl.h
 | 
					aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c aes_locl.h
 | 
				
			||||||
aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
					aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
				
			||||||
aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
 | 
					aes_core.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h
 | 
				
			||||||
 | 
					aes_core.o: aes_core.c aes_locl.h
 | 
				
			||||||
aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
					aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
				
			||||||
aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
 | 
					aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
 | 
				
			||||||
aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
					aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 | 
				
			||||||
@@ -56,8 +56,9 @@
 | 
				
			|||||||
#error AES is disabled.
 | 
					#error AES is disabled.
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const int AES_DECRYPT = 0;
 | 
					#define AES_ENCRYPT	1
 | 
				
			||||||
static const int AES_ENCRYPT = 1;
 | 
					#define AES_DECRYPT	0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Because array size can't be a const in C, the following two are macros.
 | 
					/* Because array size can't be a const in C, the following two are macros.
 | 
				
			||||||
   Both sizes are in bytes. */
 | 
					   Both sizes are in bytes. */
 | 
				
			||||||
#define AES_MAXNR 14
 | 
					#define AES_MAXNR 14
 | 
				
			||||||
@@ -94,12 +95,21 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			|||||||
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
 | 
					void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
	const unsigned long length, const AES_KEY *key,
 | 
						const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
	unsigned char *ivec, int *num, const int enc);
 | 
						unsigned char *ivec, int *num, const int enc);
 | 
				
			||||||
 | 
					void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
 | 
						const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
 | 
						unsigned char *ivec, int *num, const int enc);
 | 
				
			||||||
 | 
					void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
 | 
						const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
 | 
						unsigned char *ivec, int *num, const int enc);
 | 
				
			||||||
 | 
					void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
 | 
				
			||||||
 | 
								    const int nbits,const AES_KEY *key,
 | 
				
			||||||
 | 
								    unsigned char *ivec,const int enc);
 | 
				
			||||||
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
 | 
					void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
	const unsigned long length, const AES_KEY *key,
 | 
						const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
	unsigned char *ivec, int *num);
 | 
						unsigned char *ivec, int *num);
 | 
				
			||||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
					void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
	const unsigned long length, const AES_KEY *key,
 | 
						const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
	unsigned char counter[AES_BLOCK_SIZE],
 | 
						unsigned char ivec[AES_BLOCK_SIZE],
 | 
				
			||||||
	unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
						unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
				
			||||||
	unsigned int *num);
 | 
						unsigned int *num);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -86,7 +86,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			|||||||
			for(n=len; n < AES_BLOCK_SIZE; ++n)
 | 
								for(n=len; n < AES_BLOCK_SIZE; ++n)
 | 
				
			||||||
				tmp[n] = ivec[n];
 | 
									tmp[n] = ivec[n];
 | 
				
			||||||
			AES_encrypt(tmp, tmp, key);
 | 
								AES_encrypt(tmp, tmp, key);
 | 
				
			||||||
			memcpy(out, tmp, len);
 | 
								memcpy(out, tmp, AES_BLOCK_SIZE);
 | 
				
			||||||
			memcpy(ivec, tmp, AES_BLOCK_SIZE);
 | 
								memcpy(ivec, tmp, AES_BLOCK_SIZE);
 | 
				
			||||||
		}			
 | 
							}			
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
@@ -104,7 +104,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			|||||||
			memcpy(tmp, in, AES_BLOCK_SIZE);
 | 
								memcpy(tmp, in, AES_BLOCK_SIZE);
 | 
				
			||||||
			AES_decrypt(tmp, tmp, key);
 | 
								AES_decrypt(tmp, tmp, key);
 | 
				
			||||||
			for(n=0; n < len; ++n)
 | 
								for(n=0; n < len; ++n)
 | 
				
			||||||
				out[n] ^= ivec[n];
 | 
									out[n] = tmp[n] ^ ivec[n];
 | 
				
			||||||
			memcpy(ivec, tmp, AES_BLOCK_SIZE);
 | 
								memcpy(ivec, tmp, AES_BLOCK_SIZE);
 | 
				
			||||||
		}			
 | 
							}			
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -155,3 +155,96 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			|||||||
	*num=n;
 | 
						*num=n;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* This expects a single block of size nbits for both in and out. Note that
 | 
				
			||||||
 | 
					   it corrupts any extra bits in the last byte of out */
 | 
				
			||||||
 | 
					/* Untested, once it is working, it will be optimised */
 | 
				
			||||||
 | 
					void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
 | 
				
			||||||
 | 
								    const int nbits,const AES_KEY *key,
 | 
				
			||||||
 | 
								    unsigned char *ivec,const int enc)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    int n;
 | 
				
			||||||
 | 
					    unsigned char ovec[AES_BLOCK_SIZE*2];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    assert(in && out && key && ivec);
 | 
				
			||||||
 | 
					    if(enc)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						/* construct the new IV */
 | 
				
			||||||
 | 
						AES_encrypt(ivec,ovec,key);
 | 
				
			||||||
 | 
						/* encrypt the input */
 | 
				
			||||||
 | 
						for(n=0 ; n < (nbits+7)/8 ; ++n)
 | 
				
			||||||
 | 
						    out[n]=in[n]^ovec[n];
 | 
				
			||||||
 | 
						/* fill in the first half of the new IV with the current IV */
 | 
				
			||||||
 | 
						memcpy(ovec,ivec,AES_BLOCK_SIZE);
 | 
				
			||||||
 | 
						/* and put the ciphertext in the second half */
 | 
				
			||||||
 | 
						memcpy(ovec+AES_BLOCK_SIZE,out,(nbits+7)/8);
 | 
				
			||||||
 | 
						/* shift ovec left most of the bits... */
 | 
				
			||||||
 | 
						memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
 | 
				
			||||||
 | 
						/* now the remaining bits */
 | 
				
			||||||
 | 
						if(nbits%8 != 0)
 | 
				
			||||||
 | 
						    for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ovec[n]<<=nbits%8;
 | 
				
			||||||
 | 
							ovec[n]|=ovec[n+1]>>(8-nbits%8);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						/* finally, move it back into place */
 | 
				
			||||||
 | 
						memcpy(ivec,ovec,AES_BLOCK_SIZE);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						/* construct the new IV in the first half of ovec */
 | 
				
			||||||
 | 
						AES_encrypt(ivec,ovec,key);
 | 
				
			||||||
 | 
						/* decrypt the input */
 | 
				
			||||||
 | 
						for(n=0 ; n < (nbits+7)/8 ; ++n)
 | 
				
			||||||
 | 
						    out[n]=in[n]^ovec[n];
 | 
				
			||||||
 | 
						/* fill in the first half of the new IV with the current IV */
 | 
				
			||||||
 | 
						memcpy(ovec,ivec,AES_BLOCK_SIZE);
 | 
				
			||||||
 | 
						/* append the ciphertext */
 | 
				
			||||||
 | 
						memcpy(ovec+AES_BLOCK_SIZE,in,(nbits+7)/8);
 | 
				
			||||||
 | 
						/* shift ovec left most of the bits... */
 | 
				
			||||||
 | 
						memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
 | 
				
			||||||
 | 
						/* now the remaining bits */
 | 
				
			||||||
 | 
						if(nbits%8 != 0)
 | 
				
			||||||
 | 
						    for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ovec[n]<<=nbits%8;
 | 
				
			||||||
 | 
							ovec[n]|=ovec[n+1]>>(8-nbits%8);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						/* finally, move it back into place */
 | 
				
			||||||
 | 
						memcpy(ivec,ovec,AES_BLOCK_SIZE);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    /* it is not necessary to cleanse ovec, since the IV is not secret */
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* N.B. This expects the input to be packed, MS bit first */
 | 
				
			||||||
 | 
					void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
 | 
							      const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
 | 
							      unsigned char *ivec, int *num, const int enc)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    unsigned int n;
 | 
				
			||||||
 | 
					    unsigned char c[1],d[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    assert(in && out && key && ivec && num);
 | 
				
			||||||
 | 
					    assert(*num == 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    memset(out,0,(length+7)/8);
 | 
				
			||||||
 | 
					    for(n=0 ; n < length ; ++n)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
 | 
				
			||||||
 | 
						AES_cfbr_encrypt_block(c,d,1,key,ivec,enc);
 | 
				
			||||||
 | 
						out[n/8]=(out[n/8]&~(1 << (7-n%8)))|((d[0]&0x80) >> (n%8));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
 | 
							      const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
 | 
							      unsigned char *ivec, int *num, const int enc)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    unsigned int n;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    assert(in && out && key && ivec && num);
 | 
				
			||||||
 | 
					    assert(*num == 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for(n=0 ; n < length ; ++n)
 | 
				
			||||||
 | 
						AES_cfbr_encrypt_block(&in[n],&out[n],8,key,ivec,enc);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,8 +37,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <openssl/aes.h>
 | 
					#include <openssl/aes.h>
 | 
				
			||||||
 | 
					#include <openssl/fips.h>
 | 
				
			||||||
#include "aes_locl.h"
 | 
					#include "aes_locl.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef OPENSSL_FIPS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
Te0[x] = S [x].[02, 01, 01, 03];
 | 
					Te0[x] = S [x].[02, 01, 01, 03];
 | 
				
			||||||
Te1[x] = S [x].[03, 02, 01, 01];
 | 
					Te1[x] = S [x].[03, 02, 01, 01];
 | 
				
			||||||
@@ -750,7 +753,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
				
			|||||||
	rk[2] = GETU32(userKey +  8);
 | 
						rk[2] = GETU32(userKey +  8);
 | 
				
			||||||
	rk[3] = GETU32(userKey + 12);
 | 
						rk[3] = GETU32(userKey + 12);
 | 
				
			||||||
	if (bits == 128) {
 | 
						if (bits == 128) {
 | 
				
			||||||
		for (;;) {
 | 
							while (1) {
 | 
				
			||||||
			temp  = rk[3];
 | 
								temp  = rk[3];
 | 
				
			||||||
			rk[4] = rk[0] ^
 | 
								rk[4] = rk[0] ^
 | 
				
			||||||
				(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
									(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
				
			||||||
@@ -770,7 +773,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
				
			|||||||
	rk[4] = GETU32(userKey + 16);
 | 
						rk[4] = GETU32(userKey + 16);
 | 
				
			||||||
	rk[5] = GETU32(userKey + 20);
 | 
						rk[5] = GETU32(userKey + 20);
 | 
				
			||||||
	if (bits == 192) {
 | 
						if (bits == 192) {
 | 
				
			||||||
		for (;;) {
 | 
							while (1) {
 | 
				
			||||||
			temp = rk[ 5];
 | 
								temp = rk[ 5];
 | 
				
			||||||
			rk[ 6] = rk[ 0] ^
 | 
								rk[ 6] = rk[ 0] ^
 | 
				
			||||||
				(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
									(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
				
			||||||
@@ -792,7 +795,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
 | 
				
			|||||||
	rk[6] = GETU32(userKey + 24);
 | 
						rk[6] = GETU32(userKey + 24);
 | 
				
			||||||
	rk[7] = GETU32(userKey + 28);
 | 
						rk[7] = GETU32(userKey + 28);
 | 
				
			||||||
	if (bits == 256) {
 | 
						if (bits == 256) {
 | 
				
			||||||
		for (;;) {
 | 
							while (1) {
 | 
				
			||||||
			temp = rk[ 7];
 | 
								temp = rk[ 7];
 | 
				
			||||||
			rk[ 8] = rk[ 0] ^
 | 
								rk[ 8] = rk[ 0] ^
 | 
				
			||||||
				(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
									(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
 | 
				
			||||||
@@ -1255,3 +1258,4 @@ void AES_decrypt(const unsigned char *in, unsigned char *out,
 | 
				
			|||||||
	PUTU32(out + 12, s3);
 | 
						PUTU32(out + 12, s3);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* ndef OPENSSL_FIPS */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,19 +62,49 @@
 | 
				
			|||||||
/* NOTE: CTR mode is big-endian.  The rest of the AES code
 | 
					/* NOTE: CTR mode is big-endian.  The rest of the AES code
 | 
				
			||||||
 * is endian-neutral. */
 | 
					 * is endian-neutral. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* increment counter (128-bit int) by 2^64 */
 | 
					/* increment counter (128-bit int) by 1 */
 | 
				
			||||||
static void AES_ctr128_inc(unsigned char *counter) {
 | 
					static void AES_ctr128_inc(unsigned char *counter) {
 | 
				
			||||||
	unsigned long c;
 | 
						unsigned long c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Grab 3rd dword of counter and increment */
 | 
						/* Grab bottom dword of counter and increment */
 | 
				
			||||||
#ifdef L_ENDIAN
 | 
					#ifdef L_ENDIAN
 | 
				
			||||||
	c = GETU32(counter + 8);
 | 
						c = GETU32(counter +  0);
 | 
				
			||||||
	c++;
 | 
						c++;
 | 
				
			||||||
	PUTU32(counter + 8, c);
 | 
						PUTU32(counter +  0, c);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	c = GETU32(counter + 4);
 | 
						c = GETU32(counter + 12);
 | 
				
			||||||
	c++;
 | 
						c++;
 | 
				
			||||||
	PUTU32(counter + 4, c);
 | 
						PUTU32(counter + 12, c);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* if no overflow, we're done */
 | 
				
			||||||
 | 
						if (c)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Grab 1st dword of counter and increment */
 | 
				
			||||||
 | 
					#ifdef L_ENDIAN
 | 
				
			||||||
 | 
						c = GETU32(counter +  4);
 | 
				
			||||||
 | 
						c++;
 | 
				
			||||||
 | 
						PUTU32(counter +  4, c);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						c = GETU32(counter +  8);
 | 
				
			||||||
 | 
						c++;
 | 
				
			||||||
 | 
						PUTU32(counter +  8, c);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* if no overflow, we're done */
 | 
				
			||||||
 | 
						if (c)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Grab 2nd dword of counter and increment */
 | 
				
			||||||
 | 
					#ifdef L_ENDIAN
 | 
				
			||||||
 | 
						c = GETU32(counter +  8);
 | 
				
			||||||
 | 
						c++;
 | 
				
			||||||
 | 
						PUTU32(counter +  8, c);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						c = GETU32(counter +  4);
 | 
				
			||||||
 | 
						c++;
 | 
				
			||||||
 | 
						PUTU32(counter +  4, c);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* if no overflow, we're done */
 | 
						/* if no overflow, we're done */
 | 
				
			||||||
@@ -100,10 +130,16 @@ static void AES_ctr128_inc(unsigned char *counter) {
 | 
				
			|||||||
 * encrypted counter is kept in ecount_buf.  Both *num and
 | 
					 * encrypted counter is kept in ecount_buf.  Both *num and
 | 
				
			||||||
 * ecount_buf must be initialised with zeros before the first
 | 
					 * ecount_buf must be initialised with zeros before the first
 | 
				
			||||||
 * call to AES_ctr128_encrypt().
 | 
					 * call to AES_ctr128_encrypt().
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This algorithm assumes that the counter is in the x lower bits
 | 
				
			||||||
 | 
					 * of the IV (ivec), and that the application has full control over
 | 
				
			||||||
 | 
					 * overflow and the rest of the IV.  This implementation takes NO
 | 
				
			||||||
 | 
					 * responsability for checking that the counter doesn't overflow
 | 
				
			||||||
 | 
					 * into the rest of the IV when incremented.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
					void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			||||||
	const unsigned long length, const AES_KEY *key,
 | 
						const unsigned long length, const AES_KEY *key,
 | 
				
			||||||
	unsigned char counter[AES_BLOCK_SIZE],
 | 
						unsigned char ivec[AES_BLOCK_SIZE],
 | 
				
			||||||
	unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
						unsigned char ecount_buf[AES_BLOCK_SIZE],
 | 
				
			||||||
	unsigned int *num) {
 | 
						unsigned int *num) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -117,8 +153,8 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	while (l--) {
 | 
						while (l--) {
 | 
				
			||||||
		if (n == 0) {
 | 
							if (n == 0) {
 | 
				
			||||||
			AES_encrypt(counter, ecount_buf, key);
 | 
								AES_encrypt(ivec, ecount_buf, key);
 | 
				
			||||||
			AES_ctr128_inc(counter);
 | 
					 			AES_ctr128_inc(ivec);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		*(out++) = *(in++) ^ ecount_buf[n];
 | 
							*(out++) = *(in++) ^ ecount_buf[n];
 | 
				
			||||||
		n = (n+1) % AES_BLOCK_SIZE;
 | 
							n = (n+1) % AES_BLOCK_SIZE;
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -149,7 +149,12 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
 | 
				
			|||||||
	ASN1_CTX c;
 | 
						ASN1_CTX c;
 | 
				
			||||||
	int want=HEADER_SIZE;
 | 
						int want=HEADER_SIZE;
 | 
				
			||||||
	int eos=0;
 | 
						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;
 | 
						int off=0;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	int len=0;
 | 
						int len=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	b=BUF_MEM_new();
 | 
						b=BUF_MEM_new();
 | 
				
			||||||
@@ -226,13 +231,18 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
 | 
				
			|||||||
					ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
 | 
										ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
 | 
				
			||||||
					goto err;
 | 
										goto err;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				i=BIO_read(in,&(b->data[len]),want);
 | 
									while (want > 0)
 | 
				
			||||||
				if (i <= 0)
 | 
					 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
					ASN1err(ASN1_F_ASN1_D2I_BIO,ASN1_R_NOT_ENOUGH_DATA);
 | 
										i=BIO_read(in,&(b->data[len]),want);
 | 
				
			||||||
					goto err;
 | 
										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;
 | 
								off+=(int)c.slen;
 | 
				
			||||||
			if (eos <= 0)
 | 
								if (eos <= 0)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -147,7 +147,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
 | 
				
			|||||||
		ASN1err(ASN1_F_BN_TO_ASN1_ENUMERATED,ERR_R_NESTED_ASN1_ERROR);
 | 
							ASN1err(ASN1_F_BN_TO_ASN1_ENUMERATED,ERR_R_NESTED_ASN1_ERROR);
 | 
				
			||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if(BN_get_sign(bn)) ret->type = V_ASN1_NEG_ENUMERATED;
 | 
						if(bn->neg) ret->type = V_ASN1_NEG_ENUMERATED;
 | 
				
			||||||
	else ret->type=V_ASN1_ENUMERATED;
 | 
						else ret->type=V_ASN1_ENUMERATED;
 | 
				
			||||||
	j=BN_num_bits(bn);
 | 
						j=BN_num_bits(bn);
 | 
				
			||||||
	len=((j == 0)?0:((j/8)+1));
 | 
						len=((j == 0)?0:((j/8)+1));
 | 
				
			||||||
@@ -175,6 +175,6 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
 | 
						if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_ENUMERATED_TO_BN,ASN1_R_BN_LIB);
 | 
							ASN1err(ASN1_F_ASN1_ENUMERATED_TO_BN,ASN1_R_BN_LIB);
 | 
				
			||||||
	else if(ai->type == V_ASN1_NEG_ENUMERATED) BN_set_sign(ret,1);
 | 
						else if(ai->type == V_ASN1_NEG_ENUMERATED) ret->neg = 1;
 | 
				
			||||||
	return(ret);
 | 
						return(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -115,7 +115,7 @@ err:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
 | 
					int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
 | 
						static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
 | 
				
			||||||
	static int max[9]={99, 99,12,31,23,59,59,12,59};
 | 
						static int max[9]={99, 99,12,31,23,59,59,12,59};
 | 
				
			||||||
@@ -208,6 +208,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
 | 
				
			|||||||
	char *p;
 | 
						char *p;
 | 
				
			||||||
	struct tm *ts;
 | 
						struct tm *ts;
 | 
				
			||||||
	struct tm data;
 | 
						struct tm data;
 | 
				
			||||||
 | 
						size_t len = 20; 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (s == NULL)
 | 
						if (s == NULL)
 | 
				
			||||||
		s=M_ASN1_GENERALIZEDTIME_new();
 | 
							s=M_ASN1_GENERALIZEDTIME_new();
 | 
				
			||||||
@@ -219,17 +220,17 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
 | 
				
			|||||||
		return(NULL);
 | 
							return(NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p=(char *)s->data;
 | 
						p=(char *)s->data;
 | 
				
			||||||
	if ((p == NULL) || (s->length < 16))
 | 
						if ((p == NULL) || ((size_t)s->length < len))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		p=OPENSSL_malloc(20);
 | 
							p=OPENSSL_malloc(len);
 | 
				
			||||||
		if (p == NULL) return(NULL);
 | 
							if (p == NULL) return(NULL);
 | 
				
			||||||
		if (s->data != NULL)
 | 
							if (s->data != NULL)
 | 
				
			||||||
			OPENSSL_free(s->data);
 | 
								OPENSSL_free(s->data);
 | 
				
			||||||
		s->data=(unsigned char *)p;
 | 
							s->data=(unsigned char *)p;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sprintf(p,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
 | 
						BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
 | 
				
			||||||
		ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
 | 
							     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
 | 
				
			||||||
	s->length=strlen(p);
 | 
						s->length=strlen(p);
 | 
				
			||||||
	s->type=V_ASN1_GENERALIZEDTIME;
 | 
						s->type=V_ASN1_GENERALIZEDTIME;
 | 
				
			||||||
#ifdef CHARSET_EBCDIC_not
 | 
					#ifdef CHARSET_EBCDIC_not
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -393,8 +393,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
 | 
				
			|||||||
		ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_NESTED_ASN1_ERROR);
 | 
							ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_NESTED_ASN1_ERROR);
 | 
				
			||||||
		goto err;
 | 
							goto err;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if (BN_get_sign(bn))
 | 
						if(bn->neg) ret->type = V_ASN1_NEG_INTEGER;
 | 
				
			||||||
		ret->type = V_ASN1_NEG_INTEGER;
 | 
					 | 
				
			||||||
	else ret->type=V_ASN1_INTEGER;
 | 
						else ret->type=V_ASN1_INTEGER;
 | 
				
			||||||
	j=BN_num_bits(bn);
 | 
						j=BN_num_bits(bn);
 | 
				
			||||||
	len=((j == 0)?0:((j/8)+1));
 | 
						len=((j == 0)?0:((j/8)+1));
 | 
				
			||||||
@@ -427,8 +426,7 @@ BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
 | 
						if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB);
 | 
							ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB);
 | 
				
			||||||
	else if(ai->type == V_ASN1_NEG_INTEGER)
 | 
						else if(ai->type == V_ASN1_NEG_INTEGER) ret->neg = 1;
 | 
				
			||||||
		BN_set_sign(ret, 1);
 | 
					 | 
				
			||||||
	return(ret);
 | 
						return(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if((minsize > 0) && (nchar < minsize)) {
 | 
						if((minsize > 0) && (nchar < minsize)) {
 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT);
 | 
							ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT);
 | 
				
			||||||
		sprintf(strbuf, "%ld", minsize);
 | 
							BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize);
 | 
				
			||||||
		ERR_add_error_data(2, "minsize=", strbuf);
 | 
							ERR_add_error_data(2, "minsize=", strbuf);
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if((maxsize > 0) && (nchar > maxsize)) {
 | 
						if((maxsize > 0) && (nchar > maxsize)) {
 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG);
 | 
							ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG);
 | 
				
			||||||
		sprintf(strbuf, "%ld", maxsize);
 | 
							BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
 | 
				
			||||||
		ERR_add_error_data(2, "maxsize=", strbuf);
 | 
							ERR_add_error_data(2, "maxsize=", strbuf);
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -296,7 +296,7 @@ static int in_utf8(unsigned long value, void *arg)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static int out_utf8(unsigned long value, void *arg)
 | 
					static int out_utf8(unsigned long value, void *arg)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	long *outlen;
 | 
						int *outlen;
 | 
				
			||||||
	outlen = arg;
 | 
						outlen = arg;
 | 
				
			||||||
	*outlen += UTF8_putc(NULL, -1, value);
 | 
						*outlen += UTF8_putc(NULL, -1, value);
 | 
				
			||||||
	return 1;
 | 
						return 1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -204,9 +204,9 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
 | 
				
			|||||||
err:
 | 
					err:
 | 
				
			||||||
	EVP_MD_CTX_cleanup(&ctx);
 | 
						EVP_MD_CTX_cleanup(&ctx);
 | 
				
			||||||
	if (buf_in != NULL)
 | 
						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)
 | 
						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);
 | 
						return(outl);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -287,8 +287,8 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
 | 
				
			|||||||
err:
 | 
					err:
 | 
				
			||||||
	EVP_MD_CTX_cleanup(&ctx);
 | 
						EVP_MD_CTX_cleanup(&ctx);
 | 
				
			||||||
	if (buf_in != NULL)
 | 
						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)
 | 
						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);
 | 
						return(outl);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -279,13 +279,13 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING
 | 
				
			|||||||
 * otherwise it is the number of bytes per character
 | 
					 * otherwise it is the number of bytes per character
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const static char tag2nbyte[] = {
 | 
					const static signed char tag2nbyte[] = {
 | 
				
			||||||
	-1, -1, -1, -1, -1,	/* 0-4 */
 | 
						-1, -1, -1, -1, -1,	/* 0-4 */
 | 
				
			||||||
	-1, -1, -1, -1, -1,	/* 5-9 */
 | 
						-1, -1, -1, -1, -1,	/* 5-9 */
 | 
				
			||||||
	-1, -1, 0, -1,		/* 10-13 */
 | 
						-1, -1, 0, -1,		/* 10-13 */
 | 
				
			||||||
	-1, -1, -1, -1,		/* 15-17 */
 | 
						-1, -1, -1, -1,		/* 15-17 */
 | 
				
			||||||
	-1, 1, 1,		/* 18-20 */
 | 
						-1, 1, 1,		/* 18-20 */
 | 
				
			||||||
	-1, 1, -1,-1,		/* 21-24 */
 | 
						-1, 1, 1, 1,		/* 21-24 */
 | 
				
			||||||
	-1, 1, -1,		/* 25-27 */
 | 
						-1, 1, -1,		/* 25-27 */
 | 
				
			||||||
	4, -1, 2		/* 28-30 */
 | 
						4, -1, 2		/* 28-30 */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -143,7 +143,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
 | 
				
			|||||||
/* Now the tables and helper functions for the string table:
 | 
					/* Now the tables and helper functions for the string table:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* size limits: this stuff is taken straight from RFC2459 */
 | 
					/* size limits: this stuff is taken straight from RFC3280 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ub_name				32768
 | 
					#define ub_name				32768
 | 
				
			||||||
#define ub_common_name			64
 | 
					#define ub_common_name			64
 | 
				
			||||||
@@ -153,6 +153,8 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
 | 
				
			|||||||
#define ub_organization_unit_name	64
 | 
					#define ub_organization_unit_name	64
 | 
				
			||||||
#define ub_title			64
 | 
					#define ub_title			64
 | 
				
			||||||
#define ub_email_address		128
 | 
					#define ub_email_address		128
 | 
				
			||||||
 | 
					#define ub_serial_number		64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* This table must be kept in NID order */
 | 
					/* This table must be kept in NID order */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -170,9 +172,11 @@ static ASN1_STRING_TABLE tbl_standard[] = {
 | 
				
			|||||||
{NID_givenName,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
					{NID_givenName,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
				
			||||||
{NID_surname,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
					{NID_surname,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
				
			||||||
{NID_initials,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
					{NID_initials,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
				
			||||||
 | 
					{NID_serialNumber,		1, ub_serial_number, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
 | 
				
			||||||
{NID_friendlyName,		-1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
 | 
					{NID_friendlyName,		-1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
 | 
				
			||||||
{NID_name,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
					{NID_name,			1, ub_name, DIRSTRING_TYPE, 0},
 | 
				
			||||||
{NID_dnQualifier,		-1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
 | 
					{NID_dnQualifier,		-1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
 | 
				
			||||||
 | 
					{NID_domainComponent,		1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
 | 
				
			||||||
{NID_ms_csp_name,		-1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
 | 
					{NID_ms_csp_name,		-1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -249,4 +253,38 @@ static void st_free(ASN1_STRING_TABLE *tbl)
 | 
				
			|||||||
	if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl);
 | 
						if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_STACK_OF(ASN1_STRING_TABLE)
 | 
					IMPLEMENT_STACK_OF(ASN1_STRING_TABLE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef STRING_TABLE_TEST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					main()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						ASN1_STRING_TABLE *tmp;
 | 
				
			||||||
 | 
						int i, last_nid = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (tmp = tbl_standard, i = 0;
 | 
				
			||||||
 | 
							i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (tmp->nid < last_nid)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
									last_nid = 0;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								last_nid = tmp->nid;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (last_nid != 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							printf("Table order OK\n");
 | 
				
			||||||
 | 
							exit(0);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (tmp = tbl_standard, i = 0;
 | 
				
			||||||
 | 
							i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
 | 
				
			||||||
 | 
								printf("Index %d, NID %d, Name=%s\n", i, tmp->nid,
 | 
				
			||||||
 | 
												OBJ_nid2ln(tmp->nid));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -105,13 +105,16 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	ts=OPENSSL_gmtime(&t,&data);
 | 
						ts=OPENSSL_gmtime(&t,&data);
 | 
				
			||||||
	if (ts == NULL)
 | 
						if (ts == NULL)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							ASN1err(ASN1_F_ASN1_TIME_SET, ASN1_R_ERROR_GETTING_TIME);
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	if((ts->tm_year >= 50) && (ts->tm_year < 150))
 | 
						if((ts->tm_year >= 50) && (ts->tm_year < 150))
 | 
				
			||||||
					return ASN1_UTCTIME_set(s, t);
 | 
										return ASN1_UTCTIME_set(s, t);
 | 
				
			||||||
	return ASN1_GENERALIZEDTIME_set(s,t);
 | 
						return ASN1_GENERALIZEDTIME_set(s,t);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ASN1_TIME_check(ASN1_TIME *t)
 | 
					int ASN1_TIME_check(const ASN1_TIME *t)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	if (t->type == V_ASN1_GENERALIZEDTIME)
 | 
						if (t->type == V_ASN1_GENERALIZEDTIME)
 | 
				
			||||||
		return ASN1_GENERALIZEDTIME_check(t);
 | 
							return ASN1_GENERALIZEDTIME_check(t);
 | 
				
			||||||
@@ -121,10 +124,12 @@ int ASN1_TIME_check(ASN1_TIME *t)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Convert an ASN1_TIME structure to GeneralizedTime */
 | 
					/* Convert an ASN1_TIME structure to GeneralizedTime */
 | 
				
			||||||
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out)
 | 
					ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
 | 
				
			||||||
 | 
											   ASN1_GENERALIZEDTIME **out)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	ASN1_GENERALIZEDTIME *ret;
 | 
						ASN1_GENERALIZEDTIME *ret;
 | 
				
			||||||
	char *str;
 | 
						char *str;
 | 
				
			||||||
 | 
						int newlen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!ASN1_TIME_check(t)) return NULL;
 | 
						if (!ASN1_TIME_check(t)) return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -147,12 +152,14 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
 | 
				
			|||||||
	/* grow the string */
 | 
						/* grow the string */
 | 
				
			||||||
	if (!ASN1_STRING_set(ret, NULL, t->length + 2))
 | 
						if (!ASN1_STRING_set(ret, NULL, t->length + 2))
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
						/* ASN1_STRING_set() allocated 'len + 1' bytes. */
 | 
				
			||||||
 | 
						newlen = t->length + 2 + 1;
 | 
				
			||||||
	str = (char *)ret->data;
 | 
						str = (char *)ret->data;
 | 
				
			||||||
	/* Work out the century and prepend */
 | 
						/* Work out the century and prepend */
 | 
				
			||||||
	if (t->data[0] >= '5') strcpy(str, "19");
 | 
						if (t->data[0] >= '5') BUF_strlcpy(str, "19", newlen);
 | 
				
			||||||
	else strcpy(str, "20");
 | 
						else BUF_strlcpy(str, "20", newlen);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	BUF_strlcat(str, (char *)t->data, t->length+2);
 | 
						BUF_strlcat(str, (char *)t->data, newlen);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,7 +62,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int ASN1_TYPE_get(ASN1_TYPE *a)
 | 
					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);
 | 
							return(a->type);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		return(0);
 | 
							return(0);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -112,7 +112,7 @@ err:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
 | 
					int ASN1_UTCTIME_check(const ASN1_UTCTIME *d)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
 | 
						static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
 | 
				
			||||||
	static int max[8]={99,12,31,23,59,59,12,59};
 | 
						static int max[8]={99,12,31,23,59,59,12,59};
 | 
				
			||||||
@@ -188,6 +188,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
 | 
				
			|||||||
	char *p;
 | 
						char *p;
 | 
				
			||||||
	struct tm *ts;
 | 
						struct tm *ts;
 | 
				
			||||||
	struct tm data;
 | 
						struct tm data;
 | 
				
			||||||
 | 
						size_t len = 20;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (s == NULL)
 | 
						if (s == NULL)
 | 
				
			||||||
		s=M_ASN1_UTCTIME_new();
 | 
							s=M_ASN1_UTCTIME_new();
 | 
				
			||||||
@@ -199,17 +200,17 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
 | 
				
			|||||||
		return(NULL);
 | 
							return(NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p=(char *)s->data;
 | 
						p=(char *)s->data;
 | 
				
			||||||
	if ((p == NULL) || (s->length < 14))
 | 
						if ((p == NULL) || ((size_t)s->length < len))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		p=OPENSSL_malloc(20);
 | 
							p=OPENSSL_malloc(len);
 | 
				
			||||||
		if (p == NULL) return(NULL);
 | 
							if (p == NULL) return(NULL);
 | 
				
			||||||
		if (s->data != NULL)
 | 
							if (s->data != NULL)
 | 
				
			||||||
			OPENSSL_free(s->data);
 | 
								OPENSSL_free(s->data);
 | 
				
			||||||
		s->data=(unsigned char *)p;
 | 
							s->data=(unsigned char *)p;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sprintf(p,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
 | 
						BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
 | 
				
			||||||
		ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
 | 
							     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
 | 
				
			||||||
	s->length=strlen(p);
 | 
						s->length=strlen(p);
 | 
				
			||||||
	s->type=V_ASN1_UTCTIME;
 | 
						s->type=V_ASN1_UTCTIME;
 | 
				
			||||||
#ifdef CHARSET_EBCDIC_not
 | 
					#ifdef CHARSET_EBCDIC_not
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -103,7 +103,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
 | 
				
			|||||||
	EVP_VerifyInit_ex(&ctx,type, NULL);
 | 
						EVP_VerifyInit_ex(&ctx,type, NULL);
 | 
				
			||||||
	EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
 | 
						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);
 | 
						OPENSSL_free(buf_in);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
 | 
						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_VerifyInit_ex(&ctx,type, NULL);
 | 
				
			||||||
	EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
 | 
						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);
 | 
						OPENSSL_free(buf_in);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
 | 
						if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -132,7 +132,7 @@ extern "C" {
 | 
				
			|||||||
#define B_ASN1_NUMERICSTRING	0x0001
 | 
					#define B_ASN1_NUMERICSTRING	0x0001
 | 
				
			||||||
#define B_ASN1_PRINTABLESTRING	0x0002
 | 
					#define B_ASN1_PRINTABLESTRING	0x0002
 | 
				
			||||||
#define B_ASN1_T61STRING	0x0004
 | 
					#define B_ASN1_T61STRING	0x0004
 | 
				
			||||||
#define B_ASN1_TELETEXSTRING	0x0008
 | 
					#define B_ASN1_TELETEXSTRING	0x0004
 | 
				
			||||||
#define B_ASN1_VIDEOTEXSTRING	0x0008
 | 
					#define B_ASN1_VIDEOTEXSTRING	0x0008
 | 
				
			||||||
#define B_ASN1_IA5STRING	0x0010
 | 
					#define B_ASN1_IA5STRING	0x0010
 | 
				
			||||||
#define B_ASN1_GRAPHICSTRING	0x0020
 | 
					#define B_ASN1_GRAPHICSTRING	0x0020
 | 
				
			||||||
@@ -191,11 +191,6 @@ typedef struct asn1_object_st
 | 
				
			|||||||
	} ASN1_OBJECT;
 | 
						} ASN1_OBJECT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
 | 
					#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
 | 
				
			||||||
/* This indicates that the ASN1_STRING is not a real value but just a place
 | 
					 | 
				
			||||||
 * holder for the location where indefinite length constructed data should
 | 
					 | 
				
			||||||
 * be inserted in the memory buffer 
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#define ASN1_STRING_FLAG_NDEF 0x010 
 | 
					 | 
				
			||||||
/* This is the base type that holds just about everything :-) */
 | 
					/* This is the base type that holds just about everything :-) */
 | 
				
			||||||
typedef struct asn1_string_st
 | 
					typedef struct asn1_string_st
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -284,9 +279,6 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
 | 
				
			|||||||
	int i2d_##name(const type *a, unsigned char **out); \
 | 
						int i2d_##name(const type *a, unsigned char **out); \
 | 
				
			||||||
	DECLARE_ASN1_ITEM(name)
 | 
						DECLARE_ASN1_ITEM(name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define	DECLARE_ASN1_NDEF_FUNCTION(name) \
 | 
					 | 
				
			||||||
	int i2d_##name##_NDEF(name *a, unsigned char **out);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define DECLARE_ASN1_FUNCTIONS_const(name) \
 | 
					#define DECLARE_ASN1_FUNCTIONS_const(name) \
 | 
				
			||||||
	name *name##_new(void); \
 | 
						name *name##_new(void); \
 | 
				
			||||||
	void name##_free(name *a);
 | 
						void name##_free(name *a);
 | 
				
			||||||
@@ -762,7 +754,7 @@ int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
 | 
					DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ASN1_UTCTIME_check(ASN1_UTCTIME *a);
 | 
					int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
 | 
				
			||||||
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
 | 
					ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
 | 
				
			||||||
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str); 
 | 
					int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str); 
 | 
				
			||||||
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
 | 
					int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
 | 
				
			||||||
@@ -770,7 +762,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
 | 
				
			|||||||
time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
 | 
					time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a);
 | 
					int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
 | 
				
			||||||
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
 | 
					ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
 | 
				
			||||||
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str); 
 | 
					int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -800,11 +792,9 @@ DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
 | 
				
			|||||||
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
 | 
					DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
 | 
				
			||||||
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
 | 
					DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
 | 
					ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
 | 
				
			||||||
int ASN1_TIME_check(ASN1_TIME *t);
 | 
					int ASN1_TIME_check(const ASN1_TIME *t);
 | 
				
			||||||
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
 | 
					ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int		i2d_ASN1_SET(STACK *a, unsigned char **pp,
 | 
					int		i2d_ASN1_SET(STACK *a, unsigned char **pp,
 | 
				
			||||||
			int (*func)(), int ex_tag, int ex_class, int is_set);
 | 
								int (*func)(), int ex_tag, int ex_class, int is_set);
 | 
				
			||||||
@@ -858,7 +848,6 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag,
 | 
				
			|||||||
int ASN1_check_infinite_end(unsigned char **p,long len);
 | 
					int ASN1_check_infinite_end(unsigned char **p,long len);
 | 
				
			||||||
void ASN1_put_object(unsigned char **pp, int constructed, int length,
 | 
					void ASN1_put_object(unsigned char **pp, int constructed, int length,
 | 
				
			||||||
	int tag, int xclass);
 | 
						int tag, int xclass);
 | 
				
			||||||
int ASN1_put_eoc(unsigned char **pp);
 | 
					 | 
				
			||||||
int ASN1_object_size(int constructed, int length, int tag);
 | 
					int ASN1_object_size(int constructed, int length, int tag);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Used to implement other functions */
 | 
					/* Used to implement other functions */
 | 
				
			||||||
@@ -945,13 +934,9 @@ ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
 | 
				
			|||||||
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
 | 
					void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
 | 
				
			||||||
ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, unsigned char **in, long len, const ASN1_ITEM *it);
 | 
					ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, unsigned char **in, long len, const ASN1_ITEM *it);
 | 
				
			||||||
int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 | 
					int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 | 
				
			||||||
int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ASN1_add_oid_module(void);
 | 
					void ASN1_add_oid_module(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
 | 
					 | 
				
			||||||
ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
/* BEGIN ERROR CODES */
 | 
					/* BEGIN ERROR CODES */
 | 
				
			||||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
 | 
					/* The following lines are auto generated by the script mkerr.pl. Any changes
 | 
				
			||||||
 * made after this point may be overwritten when the script is next run.
 | 
					 * made after this point may be overwritten when the script is next run.
 | 
				
			||||||
@@ -965,8 +950,6 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_F_A2I_ASN1_ENUMERATED			 101
 | 
					#define ASN1_F_A2I_ASN1_ENUMERATED			 101
 | 
				
			||||||
#define ASN1_F_A2I_ASN1_INTEGER				 102
 | 
					#define ASN1_F_A2I_ASN1_INTEGER				 102
 | 
				
			||||||
#define ASN1_F_A2I_ASN1_STRING				 103
 | 
					#define ASN1_F_A2I_ASN1_STRING				 103
 | 
				
			||||||
#define ASN1_F_APPEND_TAG				 177
 | 
					 | 
				
			||||||
#define ASN1_F_ASN1_CB					 178
 | 
					 | 
				
			||||||
#define ASN1_F_ASN1_CHECK_TLEN				 104
 | 
					#define ASN1_F_ASN1_CHECK_TLEN				 104
 | 
				
			||||||
#define ASN1_F_ASN1_COLLATE_PRIMITIVE			 105
 | 
					#define ASN1_F_ASN1_COLLATE_PRIMITIVE			 105
 | 
				
			||||||
#define ASN1_F_ASN1_COLLECT				 106
 | 
					#define ASN1_F_ASN1_COLLECT				 106
 | 
				
			||||||
@@ -977,7 +960,6 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_F_ASN1_DUP					 111
 | 
					#define ASN1_F_ASN1_DUP					 111
 | 
				
			||||||
#define ASN1_F_ASN1_ENUMERATED_SET			 112
 | 
					#define ASN1_F_ASN1_ENUMERATED_SET			 112
 | 
				
			||||||
#define ASN1_F_ASN1_ENUMERATED_TO_BN			 113
 | 
					#define ASN1_F_ASN1_ENUMERATED_TO_BN			 113
 | 
				
			||||||
#define ASN1_F_ASN1_GENERATE_V3				 182
 | 
					 | 
				
			||||||
#define ASN1_F_ASN1_GET_OBJECT				 114
 | 
					#define ASN1_F_ASN1_GET_OBJECT				 114
 | 
				
			||||||
#define ASN1_F_ASN1_HEADER_NEW				 115
 | 
					#define ASN1_F_ASN1_HEADER_NEW				 115
 | 
				
			||||||
#define ASN1_F_ASN1_I2D_BIO				 116
 | 
					#define ASN1_F_ASN1_I2D_BIO				 116
 | 
				
			||||||
@@ -993,17 +975,16 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_F_ASN1_SEQ_PACK				 126
 | 
					#define ASN1_F_ASN1_SEQ_PACK				 126
 | 
				
			||||||
#define ASN1_F_ASN1_SEQ_UNPACK				 127
 | 
					#define ASN1_F_ASN1_SEQ_UNPACK				 127
 | 
				
			||||||
#define ASN1_F_ASN1_SIGN				 128
 | 
					#define ASN1_F_ASN1_SIGN				 128
 | 
				
			||||||
#define ASN1_F_ASN1_STR2TYPE				 179
 | 
					 | 
				
			||||||
#define ASN1_F_ASN1_STRING_TABLE_ADD			 129
 | 
					#define ASN1_F_ASN1_STRING_TABLE_ADD			 129
 | 
				
			||||||
#define ASN1_F_ASN1_STRING_TYPE_NEW			 130
 | 
					#define ASN1_F_ASN1_STRING_TYPE_NEW			 130
 | 
				
			||||||
#define ASN1_F_ASN1_TEMPLATE_D2I			 131
 | 
					#define ASN1_F_ASN1_TEMPLATE_D2I			 131
 | 
				
			||||||
#define ASN1_F_ASN1_TEMPLATE_EX_D2I			 132
 | 
					#define ASN1_F_ASN1_TEMPLATE_EX_D2I			 132
 | 
				
			||||||
#define ASN1_F_ASN1_TEMPLATE_NEW			 133
 | 
					#define ASN1_F_ASN1_TEMPLATE_NEW			 133
 | 
				
			||||||
 | 
					#define ASN1_F_ASN1_TIME_SET				 175
 | 
				
			||||||
#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING		 134
 | 
					#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING		 134
 | 
				
			||||||
#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING		 135
 | 
					#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING		 135
 | 
				
			||||||
#define ASN1_F_ASN1_UNPACK_STRING			 136
 | 
					#define ASN1_F_ASN1_UNPACK_STRING			 136
 | 
				
			||||||
#define ASN1_F_ASN1_VERIFY				 137
 | 
					#define ASN1_F_ASN1_VERIFY				 137
 | 
				
			||||||
#define ASN1_F_BITSTR_CB				 180
 | 
					 | 
				
			||||||
#define ASN1_F_BN_TO_ASN1_ENUMERATED			 138
 | 
					#define ASN1_F_BN_TO_ASN1_ENUMERATED			 138
 | 
				
			||||||
#define ASN1_F_BN_TO_ASN1_INTEGER			 139
 | 
					#define ASN1_F_BN_TO_ASN1_INTEGER			 139
 | 
				
			||||||
#define ASN1_F_COLLECT_DATA				 140
 | 
					#define ASN1_F_COLLECT_DATA				 140
 | 
				
			||||||
@@ -1028,15 +1009,12 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_F_D2I_X509_PKEY				 159
 | 
					#define ASN1_F_D2I_X509_PKEY				 159
 | 
				
			||||||
#define ASN1_F_I2D_ASN1_TIME				 160
 | 
					#define ASN1_F_I2D_ASN1_TIME				 160
 | 
				
			||||||
#define ASN1_F_I2D_DSA_PUBKEY				 161
 | 
					#define ASN1_F_I2D_DSA_PUBKEY				 161
 | 
				
			||||||
#define ASN1_F_I2D_ECDSA_PUBKEY				 174
 | 
					 | 
				
			||||||
#define ASN1_F_I2D_EC_PUBKEY				 176
 | 
					 | 
				
			||||||
#define ASN1_F_I2D_NETSCAPE_RSA				 162
 | 
					#define ASN1_F_I2D_NETSCAPE_RSA				 162
 | 
				
			||||||
#define ASN1_F_I2D_PRIVATEKEY				 163
 | 
					#define ASN1_F_I2D_PRIVATEKEY				 163
 | 
				
			||||||
#define ASN1_F_I2D_PUBLICKEY				 164
 | 
					#define ASN1_F_I2D_PUBLICKEY				 164
 | 
				
			||||||
#define ASN1_F_I2D_RSA_PUBKEY				 165
 | 
					#define ASN1_F_I2D_RSA_PUBKEY				 165
 | 
				
			||||||
#define ASN1_F_LONG_C2I					 166
 | 
					#define ASN1_F_LONG_C2I					 166
 | 
				
			||||||
#define ASN1_F_OID_MODULE_INIT				 175
 | 
					#define ASN1_F_OID_MODULE_INIT				 174
 | 
				
			||||||
#define ASN1_F_PARSE_TAGGING				 181
 | 
					 | 
				
			||||||
#define ASN1_F_PKCS5_PBE2_SET				 167
 | 
					#define ASN1_F_PKCS5_PBE2_SET				 167
 | 
				
			||||||
#define ASN1_F_X509_CINF_NEW				 168
 | 
					#define ASN1_F_X509_CINF_NEW				 168
 | 
				
			||||||
#define ASN1_F_X509_CRL_ADD0_REVOKED			 169
 | 
					#define ASN1_F_X509_CRL_ADD0_REVOKED			 169
 | 
				
			||||||
@@ -1059,8 +1037,8 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_R_DATA_IS_WRONG				 109
 | 
					#define ASN1_R_DATA_IS_WRONG				 109
 | 
				
			||||||
#define ASN1_R_DECODE_ERROR				 110
 | 
					#define ASN1_R_DECODE_ERROR				 110
 | 
				
			||||||
#define ASN1_R_DECODING_ERROR				 111
 | 
					#define ASN1_R_DECODING_ERROR				 111
 | 
				
			||||||
#define ASN1_R_DEPTH_EXCEEDED				 173
 | 
					 | 
				
			||||||
#define ASN1_R_ENCODE_ERROR				 112
 | 
					#define ASN1_R_ENCODE_ERROR				 112
 | 
				
			||||||
 | 
					#define ASN1_R_ERROR_GETTING_TIME			 173
 | 
				
			||||||
#define ASN1_R_ERROR_LOADING_SECTION			 172
 | 
					#define ASN1_R_ERROR_LOADING_SECTION			 172
 | 
				
			||||||
#define ASN1_R_ERROR_PARSING_SET_ELEMENT		 113
 | 
					#define ASN1_R_ERROR_PARSING_SET_ELEMENT		 113
 | 
				
			||||||
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS		 114
 | 
					#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS		 114
 | 
				
			||||||
@@ -1073,57 +1051,38 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_R_FIELD_MISSING				 121
 | 
					#define ASN1_R_FIELD_MISSING				 121
 | 
				
			||||||
#define ASN1_R_FIRST_NUM_TOO_LARGE			 122
 | 
					#define ASN1_R_FIRST_NUM_TOO_LARGE			 122
 | 
				
			||||||
#define ASN1_R_HEADER_TOO_LONG				 123
 | 
					#define ASN1_R_HEADER_TOO_LONG				 123
 | 
				
			||||||
#define ASN1_R_ILLEGAL_BITSTRING_FORMAT			 174
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_BOOLEAN				 175
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_CHARACTERS			 124
 | 
					#define ASN1_R_ILLEGAL_CHARACTERS			 124
 | 
				
			||||||
#define ASN1_R_ILLEGAL_FORMAT				 176
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_HEX				 177
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_IMPLICIT_TAG			 178
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_INTEGER				 179
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_NESTED_TAGGING			 180
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_NULL				 125
 | 
					#define ASN1_R_ILLEGAL_NULL				 125
 | 
				
			||||||
#define ASN1_R_ILLEGAL_NULL_VALUE			 181
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_OBJECT				 182
 | 
					 | 
				
			||||||
#define ASN1_R_ILLEGAL_OPTIONAL_ANY			 126
 | 
					#define ASN1_R_ILLEGAL_OPTIONAL_ANY			 126
 | 
				
			||||||
#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE		 170
 | 
					#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE		 170
 | 
				
			||||||
#define ASN1_R_ILLEGAL_TAGGED_ANY			 127
 | 
					#define ASN1_R_ILLEGAL_TAGGED_ANY			 127
 | 
				
			||||||
#define ASN1_R_ILLEGAL_TIME_VALUE			 183
 | 
					 | 
				
			||||||
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT			 184
 | 
					 | 
				
			||||||
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG		 128
 | 
					#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG		 128
 | 
				
			||||||
#define ASN1_R_INVALID_BMPSTRING_LENGTH			 129
 | 
					#define ASN1_R_INVALID_BMPSTRING_LENGTH			 129
 | 
				
			||||||
#define ASN1_R_INVALID_DIGIT				 130
 | 
					#define ASN1_R_INVALID_DIGIT				 130
 | 
				
			||||||
#define ASN1_R_INVALID_MODIFIER				 185
 | 
					 | 
				
			||||||
#define ASN1_R_INVALID_NUMBER				 186
 | 
					 | 
				
			||||||
#define ASN1_R_INVALID_SEPARATOR			 131
 | 
					#define ASN1_R_INVALID_SEPARATOR			 131
 | 
				
			||||||
#define ASN1_R_INVALID_TIME_FORMAT			 132
 | 
					#define ASN1_R_INVALID_TIME_FORMAT			 132
 | 
				
			||||||
#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH		 133
 | 
					#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH		 133
 | 
				
			||||||
#define ASN1_R_INVALID_UTF8STRING			 134
 | 
					#define ASN1_R_INVALID_UTF8STRING			 134
 | 
				
			||||||
#define ASN1_R_IV_TOO_LARGE				 135
 | 
					#define ASN1_R_IV_TOO_LARGE				 135
 | 
				
			||||||
#define ASN1_R_LENGTH_ERROR				 136
 | 
					#define ASN1_R_LENGTH_ERROR				 136
 | 
				
			||||||
#define ASN1_R_LIST_ERROR				 187
 | 
					 | 
				
			||||||
#define ASN1_R_MISSING_EOC				 137
 | 
					#define ASN1_R_MISSING_EOC				 137
 | 
				
			||||||
#define ASN1_R_MISSING_SECOND_NUMBER			 138
 | 
					#define ASN1_R_MISSING_SECOND_NUMBER			 138
 | 
				
			||||||
#define ASN1_R_MISSING_VALUE				 188
 | 
					 | 
				
			||||||
#define ASN1_R_MSTRING_NOT_UNIVERSAL			 139
 | 
					#define ASN1_R_MSTRING_NOT_UNIVERSAL			 139
 | 
				
			||||||
#define ASN1_R_MSTRING_WRONG_TAG			 140
 | 
					#define ASN1_R_MSTRING_WRONG_TAG			 140
 | 
				
			||||||
#define ASN1_R_NON_HEX_CHARACTERS			 141
 | 
					#define ASN1_R_NON_HEX_CHARACTERS			 141
 | 
				
			||||||
#define ASN1_R_NOT_ASCII_FORMAT				 189
 | 
					 | 
				
			||||||
#define ASN1_R_NOT_ENOUGH_DATA				 142
 | 
					#define ASN1_R_NOT_ENOUGH_DATA				 142
 | 
				
			||||||
#define ASN1_R_NO_MATCHING_CHOICE_TYPE			 143
 | 
					#define ASN1_R_NO_MATCHING_CHOICE_TYPE			 143
 | 
				
			||||||
#define ASN1_R_NULL_IS_WRONG_LENGTH			 144
 | 
					#define ASN1_R_NULL_IS_WRONG_LENGTH			 144
 | 
				
			||||||
#define ASN1_R_OBJECT_NOT_ASCII_FORMAT			 190
 | 
					 | 
				
			||||||
#define ASN1_R_ODD_NUMBER_OF_CHARS			 145
 | 
					#define ASN1_R_ODD_NUMBER_OF_CHARS			 145
 | 
				
			||||||
#define ASN1_R_PRIVATE_KEY_HEADER_MISSING		 146
 | 
					#define ASN1_R_PRIVATE_KEY_HEADER_MISSING		 146
 | 
				
			||||||
#define ASN1_R_SECOND_NUMBER_TOO_LARGE			 147
 | 
					#define ASN1_R_SECOND_NUMBER_TOO_LARGE			 147
 | 
				
			||||||
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH			 148
 | 
					#define ASN1_R_SEQUENCE_LENGTH_MISMATCH			 148
 | 
				
			||||||
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED			 149
 | 
					#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED			 149
 | 
				
			||||||
#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG		 195
 | 
					 | 
				
			||||||
#define ASN1_R_SHORT_LINE				 150
 | 
					#define ASN1_R_SHORT_LINE				 150
 | 
				
			||||||
#define ASN1_R_STRING_TOO_LONG				 151
 | 
					#define ASN1_R_STRING_TOO_LONG				 151
 | 
				
			||||||
#define ASN1_R_STRING_TOO_SHORT				 152
 | 
					#define ASN1_R_STRING_TOO_SHORT				 152
 | 
				
			||||||
#define ASN1_R_TAG_VALUE_TOO_HIGH			 153
 | 
					#define ASN1_R_TAG_VALUE_TOO_HIGH			 153
 | 
				
			||||||
#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
 | 
					#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
 | 
				
			||||||
#define ASN1_R_TIME_NOT_ASCII_FORMAT			 191
 | 
					 | 
				
			||||||
#define ASN1_R_TOO_LONG					 155
 | 
					#define ASN1_R_TOO_LONG					 155
 | 
				
			||||||
#define ASN1_R_TYPE_NOT_CONSTRUCTED			 156
 | 
					#define ASN1_R_TYPE_NOT_CONSTRUCTED			 156
 | 
				
			||||||
#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY			 157
 | 
					#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY			 157
 | 
				
			||||||
@@ -1133,13 +1092,10 @@ void ERR_load_ASN1_strings(void);
 | 
				
			|||||||
#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM		 161
 | 
					#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM		 161
 | 
				
			||||||
#define ASN1_R_UNKNOWN_OBJECT_TYPE			 162
 | 
					#define ASN1_R_UNKNOWN_OBJECT_TYPE			 162
 | 
				
			||||||
#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE			 163
 | 
					#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE			 163
 | 
				
			||||||
#define ASN1_R_UNKNOWN_TAG				 192
 | 
					 | 
				
			||||||
#define ASN1_R_UNKOWN_FORMAT				 193
 | 
					 | 
				
			||||||
#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE		 164
 | 
					#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE		 164
 | 
				
			||||||
#define ASN1_R_UNSUPPORTED_CIPHER			 165
 | 
					#define ASN1_R_UNSUPPORTED_CIPHER			 165
 | 
				
			||||||
#define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM		 166
 | 
					#define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM		 166
 | 
				
			||||||
#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE		 167
 | 
					#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE		 167
 | 
				
			||||||
#define ASN1_R_UNSUPPORTED_TYPE				 194
 | 
					 | 
				
			||||||
#define ASN1_R_WRONG_TAG				 168
 | 
					#define ASN1_R_WRONG_TAG				 168
 | 
				
			||||||
#define ASN1_R_WRONG_TYPE				 169
 | 
					#define ASN1_R_WRONG_TYPE				 169
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -70,8 +70,6 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 | 
				
			|||||||
{ERR_PACK(0,ASN1_F_A2I_ASN1_ENUMERATED,0),	"a2i_ASN1_ENUMERATED"},
 | 
					{ERR_PACK(0,ASN1_F_A2I_ASN1_ENUMERATED,0),	"a2i_ASN1_ENUMERATED"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_A2I_ASN1_INTEGER,0),	"a2i_ASN1_INTEGER"},
 | 
					{ERR_PACK(0,ASN1_F_A2I_ASN1_INTEGER,0),	"a2i_ASN1_INTEGER"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_A2I_ASN1_STRING,0),	"a2i_ASN1_STRING"},
 | 
					{ERR_PACK(0,ASN1_F_A2I_ASN1_STRING,0),	"a2i_ASN1_STRING"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_APPEND_TAG,0),	"APPEND_TAG"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_CB,0),	"ASN1_CB"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_CHECK_TLEN,0),	"ASN1_CHECK_TLEN"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_CHECK_TLEN,0),	"ASN1_CHECK_TLEN"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_COLLATE_PRIMITIVE,0),	"ASN1_COLLATE_PRIMITIVE"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_COLLATE_PRIMITIVE,0),	"ASN1_COLLATE_PRIMITIVE"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_COLLECT,0),	"ASN1_COLLECT"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_COLLECT,0),	"ASN1_COLLECT"},
 | 
				
			||||||
@@ -82,7 +80,6 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 | 
				
			|||||||
{ERR_PACK(0,ASN1_F_ASN1_DUP,0),	"ASN1_dup"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_DUP,0),	"ASN1_dup"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_SET,0),	"ASN1_ENUMERATED_set"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_SET,0),	"ASN1_ENUMERATED_set"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_TO_BN,0),	"ASN1_ENUMERATED_to_BN"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_TO_BN,0),	"ASN1_ENUMERATED_to_BN"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_GENERATE_V3,0),	"ASN1_generate_v3"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_GET_OBJECT,0),	"ASN1_get_object"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_GET_OBJECT,0),	"ASN1_get_object"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_HEADER_NEW,0),	"ASN1_HEADER_new"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_HEADER_NEW,0),	"ASN1_HEADER_new"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_I2D_BIO,0),	"ASN1_i2d_bio"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_I2D_BIO,0),	"ASN1_i2d_bio"},
 | 
				
			||||||
@@ -98,17 +95,16 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 | 
				
			|||||||
{ERR_PACK(0,ASN1_F_ASN1_SEQ_PACK,0),	"ASN1_seq_pack"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_SEQ_PACK,0),	"ASN1_seq_pack"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_SEQ_UNPACK,0),	"ASN1_seq_unpack"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_SEQ_UNPACK,0),	"ASN1_seq_unpack"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_SIGN,0),	"ASN1_sign"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_SIGN,0),	"ASN1_sign"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_STR2TYPE,0),	"ASN1_STR2TYPE"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_STRING_TABLE_ADD,0),	"ASN1_STRING_TABLE_add"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_STRING_TABLE_ADD,0),	"ASN1_STRING_TABLE_add"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_STRING_TYPE_NEW,0),	"ASN1_STRING_type_new"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_STRING_TYPE_NEW,0),	"ASN1_STRING_type_new"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_D2I,0),	"ASN1_TEMPLATE_D2I"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_D2I,0),	"ASN1_TEMPLATE_D2I"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_EX_D2I,0),	"ASN1_TEMPLATE_EX_D2I"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_EX_D2I,0),	"ASN1_TEMPLATE_EX_D2I"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_NEW,0),	"ASN1_TEMPLATE_NEW"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_NEW,0),	"ASN1_TEMPLATE_NEW"},
 | 
				
			||||||
 | 
					{ERR_PACK(0,ASN1_F_ASN1_TIME_SET,0),	"ASN1_TIME_set"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,0),	"ASN1_TYPE_get_int_octetstring"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,0),	"ASN1_TYPE_get_int_octetstring"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_OCTETSTRING,0),	"ASN1_TYPE_get_octetstring"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_OCTETSTRING,0),	"ASN1_TYPE_get_octetstring"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_UNPACK_STRING,0),	"ASN1_unpack_string"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_UNPACK_STRING,0),	"ASN1_unpack_string"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_ASN1_VERIFY,0),	"ASN1_verify"},
 | 
					{ERR_PACK(0,ASN1_F_ASN1_VERIFY,0),	"ASN1_verify"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_BITSTR_CB,0),	"BITSTR_CB"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_BN_TO_ASN1_ENUMERATED,0),	"BN_to_ASN1_ENUMERATED"},
 | 
					{ERR_PACK(0,ASN1_F_BN_TO_ASN1_ENUMERATED,0),	"BN_to_ASN1_ENUMERATED"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_BN_TO_ASN1_INTEGER,0),	"BN_to_ASN1_INTEGER"},
 | 
					{ERR_PACK(0,ASN1_F_BN_TO_ASN1_INTEGER,0),	"BN_to_ASN1_INTEGER"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_COLLECT_DATA,0),	"COLLECT_DATA"},
 | 
					{ERR_PACK(0,ASN1_F_COLLECT_DATA,0),	"COLLECT_DATA"},
 | 
				
			||||||
@@ -133,15 +129,12 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 | 
				
			|||||||
{ERR_PACK(0,ASN1_F_D2I_X509_PKEY,0),	"d2i_X509_PKEY"},
 | 
					{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_ASN1_TIME,0),	"I2D_ASN1_TIME"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_I2D_DSA_PUBKEY,0),	"i2d_DSA_PUBKEY"},
 | 
					{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_EC_PUBKEY,0),	"i2d_EC_PUBKEY"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_I2D_NETSCAPE_RSA,0),	"i2d_Netscape_RSA"},
 | 
					{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_PRIVATEKEY,0),	"i2d_PrivateKey"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_I2D_PUBLICKEY,0),	"i2d_PublicKey"},
 | 
					{ERR_PACK(0,ASN1_F_I2D_PUBLICKEY,0),	"i2d_PublicKey"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_I2D_RSA_PUBKEY,0),	"i2d_RSA_PUBKEY"},
 | 
					{ERR_PACK(0,ASN1_F_I2D_RSA_PUBKEY,0),	"i2d_RSA_PUBKEY"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_LONG_C2I,0),	"LONG_C2I"},
 | 
					{ERR_PACK(0,ASN1_F_LONG_C2I,0),	"LONG_C2I"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_OID_MODULE_INIT,0),	"OID_MODULE_INIT"},
 | 
					{ERR_PACK(0,ASN1_F_OID_MODULE_INIT,0),	"OID_MODULE_INIT"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_PARSE_TAGGING,0),	"PARSE_TAGGING"},
 | 
					 | 
				
			||||||
{ERR_PACK(0,ASN1_F_PKCS5_PBE2_SET,0),	"PKCS5_pbe2_set"},
 | 
					{ERR_PACK(0,ASN1_F_PKCS5_PBE2_SET,0),	"PKCS5_pbe2_set"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_X509_CINF_NEW,0),	"X509_CINF_NEW"},
 | 
					{ERR_PACK(0,ASN1_F_X509_CINF_NEW,0),	"X509_CINF_NEW"},
 | 
				
			||||||
{ERR_PACK(0,ASN1_F_X509_CRL_ADD0_REVOKED,0),	"X509_CRL_add0_revoked"},
 | 
					{ERR_PACK(0,ASN1_F_X509_CRL_ADD0_REVOKED,0),	"X509_CRL_add0_revoked"},
 | 
				
			||||||
@@ -167,8 +160,8 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
 | 
				
			|||||||
{ASN1_R_DATA_IS_WRONG                    ,"data is wrong"},
 | 
					{ASN1_R_DATA_IS_WRONG                    ,"data is wrong"},
 | 
				
			||||||
{ASN1_R_DECODE_ERROR                     ,"decode error"},
 | 
					{ASN1_R_DECODE_ERROR                     ,"decode error"},
 | 
				
			||||||
{ASN1_R_DECODING_ERROR                   ,"decoding error"},
 | 
					{ASN1_R_DECODING_ERROR                   ,"decoding error"},
 | 
				
			||||||
{ASN1_R_DEPTH_EXCEEDED                   ,"depth exceeded"},
 | 
					 | 
				
			||||||
{ASN1_R_ENCODE_ERROR                     ,"encode error"},
 | 
					{ASN1_R_ENCODE_ERROR                     ,"encode error"},
 | 
				
			||||||
 | 
					{ASN1_R_ERROR_GETTING_TIME               ,"error getting time"},
 | 
				
			||||||
{ASN1_R_ERROR_LOADING_SECTION            ,"error loading section"},
 | 
					{ASN1_R_ERROR_LOADING_SECTION            ,"error loading section"},
 | 
				
			||||||
{ASN1_R_ERROR_PARSING_SET_ELEMENT        ,"error parsing set element"},
 | 
					{ASN1_R_ERROR_PARSING_SET_ELEMENT        ,"error parsing set element"},
 | 
				
			||||||
{ASN1_R_ERROR_SETTING_CIPHER_PARAMS      ,"error setting cipher params"},
 | 
					{ASN1_R_ERROR_SETTING_CIPHER_PARAMS      ,"error setting cipher params"},
 | 
				
			||||||
@@ -181,57 +174,38 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
 | 
				
			|||||||
{ASN1_R_FIELD_MISSING                    ,"field missing"},
 | 
					{ASN1_R_FIELD_MISSING                    ,"field missing"},
 | 
				
			||||||
{ASN1_R_FIRST_NUM_TOO_LARGE              ,"first num too large"},
 | 
					{ASN1_R_FIRST_NUM_TOO_LARGE              ,"first num too large"},
 | 
				
			||||||
{ASN1_R_HEADER_TOO_LONG                  ,"header too long"},
 | 
					{ASN1_R_HEADER_TOO_LONG                  ,"header too long"},
 | 
				
			||||||
{ASN1_R_ILLEGAL_BITSTRING_FORMAT         ,"illegal bitstring format"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_BOOLEAN                  ,"illegal boolean"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_CHARACTERS               ,"illegal characters"},
 | 
					{ASN1_R_ILLEGAL_CHARACTERS               ,"illegal characters"},
 | 
				
			||||||
{ASN1_R_ILLEGAL_FORMAT                   ,"illegal format"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_HEX                      ,"illegal hex"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_IMPLICIT_TAG             ,"illegal implicit tag"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_INTEGER                  ,"illegal integer"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_NESTED_TAGGING           ,"illegal nested tagging"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_NULL                     ,"illegal null"},
 | 
					{ASN1_R_ILLEGAL_NULL                     ,"illegal null"},
 | 
				
			||||||
{ASN1_R_ILLEGAL_NULL_VALUE               ,"illegal null value"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_OBJECT                   ,"illegal object"},
 | 
					 | 
				
			||||||
{ASN1_R_ILLEGAL_OPTIONAL_ANY             ,"illegal optional any"},
 | 
					{ASN1_R_ILLEGAL_OPTIONAL_ANY             ,"illegal optional any"},
 | 
				
			||||||
{ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE ,"illegal options on item template"},
 | 
					{ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE ,"illegal options on item template"},
 | 
				
			||||||
{ASN1_R_ILLEGAL_TAGGED_ANY               ,"illegal tagged any"},
 | 
					{ASN1_R_ILLEGAL_TAGGED_ANY               ,"illegal tagged any"},
 | 
				
			||||||
{ASN1_R_ILLEGAL_TIME_VALUE               ,"illegal time value"},
 | 
					 | 
				
			||||||
{ASN1_R_INTEGER_NOT_ASCII_FORMAT         ,"integer not ascii format"},
 | 
					 | 
				
			||||||
{ASN1_R_INTEGER_TOO_LARGE_FOR_LONG       ,"integer too large for long"},
 | 
					{ASN1_R_INTEGER_TOO_LARGE_FOR_LONG       ,"integer too large for long"},
 | 
				
			||||||
{ASN1_R_INVALID_BMPSTRING_LENGTH         ,"invalid bmpstring length"},
 | 
					{ASN1_R_INVALID_BMPSTRING_LENGTH         ,"invalid bmpstring length"},
 | 
				
			||||||
{ASN1_R_INVALID_DIGIT                    ,"invalid digit"},
 | 
					{ASN1_R_INVALID_DIGIT                    ,"invalid digit"},
 | 
				
			||||||
{ASN1_R_INVALID_MODIFIER                 ,"invalid modifier"},
 | 
					 | 
				
			||||||
{ASN1_R_INVALID_NUMBER                   ,"invalid number"},
 | 
					 | 
				
			||||||
{ASN1_R_INVALID_SEPARATOR                ,"invalid separator"},
 | 
					{ASN1_R_INVALID_SEPARATOR                ,"invalid separator"},
 | 
				
			||||||
{ASN1_R_INVALID_TIME_FORMAT              ,"invalid time format"},
 | 
					{ASN1_R_INVALID_TIME_FORMAT              ,"invalid time format"},
 | 
				
			||||||
{ASN1_R_INVALID_UNIVERSALSTRING_LENGTH   ,"invalid universalstring length"},
 | 
					{ASN1_R_INVALID_UNIVERSALSTRING_LENGTH   ,"invalid universalstring length"},
 | 
				
			||||||
{ASN1_R_INVALID_UTF8STRING               ,"invalid utf8string"},
 | 
					{ASN1_R_INVALID_UTF8STRING               ,"invalid utf8string"},
 | 
				
			||||||
{ASN1_R_IV_TOO_LARGE                     ,"iv too large"},
 | 
					{ASN1_R_IV_TOO_LARGE                     ,"iv too large"},
 | 
				
			||||||
{ASN1_R_LENGTH_ERROR                     ,"length error"},
 | 
					{ASN1_R_LENGTH_ERROR                     ,"length error"},
 | 
				
			||||||
{ASN1_R_LIST_ERROR                       ,"list error"},
 | 
					 | 
				
			||||||
{ASN1_R_MISSING_EOC                      ,"missing eoc"},
 | 
					{ASN1_R_MISSING_EOC                      ,"missing eoc"},
 | 
				
			||||||
{ASN1_R_MISSING_SECOND_NUMBER            ,"missing second number"},
 | 
					{ASN1_R_MISSING_SECOND_NUMBER            ,"missing second number"},
 | 
				
			||||||
{ASN1_R_MISSING_VALUE                    ,"missing value"},
 | 
					 | 
				
			||||||
{ASN1_R_MSTRING_NOT_UNIVERSAL            ,"mstring not universal"},
 | 
					{ASN1_R_MSTRING_NOT_UNIVERSAL            ,"mstring not universal"},
 | 
				
			||||||
{ASN1_R_MSTRING_WRONG_TAG                ,"mstring wrong tag"},
 | 
					{ASN1_R_MSTRING_WRONG_TAG                ,"mstring wrong tag"},
 | 
				
			||||||
{ASN1_R_NON_HEX_CHARACTERS               ,"non hex characters"},
 | 
					{ASN1_R_NON_HEX_CHARACTERS               ,"non hex characters"},
 | 
				
			||||||
{ASN1_R_NOT_ASCII_FORMAT                 ,"not ascii format"},
 | 
					 | 
				
			||||||
{ASN1_R_NOT_ENOUGH_DATA                  ,"not enough data"},
 | 
					{ASN1_R_NOT_ENOUGH_DATA                  ,"not enough data"},
 | 
				
			||||||
{ASN1_R_NO_MATCHING_CHOICE_TYPE          ,"no matching choice type"},
 | 
					{ASN1_R_NO_MATCHING_CHOICE_TYPE          ,"no matching choice type"},
 | 
				
			||||||
{ASN1_R_NULL_IS_WRONG_LENGTH             ,"null is wrong length"},
 | 
					{ASN1_R_NULL_IS_WRONG_LENGTH             ,"null is wrong length"},
 | 
				
			||||||
{ASN1_R_OBJECT_NOT_ASCII_FORMAT          ,"object not ascii format"},
 | 
					 | 
				
			||||||
{ASN1_R_ODD_NUMBER_OF_CHARS              ,"odd number of chars"},
 | 
					{ASN1_R_ODD_NUMBER_OF_CHARS              ,"odd number of chars"},
 | 
				
			||||||
{ASN1_R_PRIVATE_KEY_HEADER_MISSING       ,"private key header missing"},
 | 
					{ASN1_R_PRIVATE_KEY_HEADER_MISSING       ,"private key header missing"},
 | 
				
			||||||
{ASN1_R_SECOND_NUMBER_TOO_LARGE          ,"second number too large"},
 | 
					{ASN1_R_SECOND_NUMBER_TOO_LARGE          ,"second number too large"},
 | 
				
			||||||
{ASN1_R_SEQUENCE_LENGTH_MISMATCH         ,"sequence length mismatch"},
 | 
					{ASN1_R_SEQUENCE_LENGTH_MISMATCH         ,"sequence length mismatch"},
 | 
				
			||||||
{ASN1_R_SEQUENCE_NOT_CONSTRUCTED         ,"sequence not constructed"},
 | 
					{ASN1_R_SEQUENCE_NOT_CONSTRUCTED         ,"sequence not constructed"},
 | 
				
			||||||
{ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG     ,"sequence or set needs config"},
 | 
					 | 
				
			||||||
{ASN1_R_SHORT_LINE                       ,"short line"},
 | 
					{ASN1_R_SHORT_LINE                       ,"short line"},
 | 
				
			||||||
{ASN1_R_STRING_TOO_LONG                  ,"string too long"},
 | 
					{ASN1_R_STRING_TOO_LONG                  ,"string too long"},
 | 
				
			||||||
{ASN1_R_STRING_TOO_SHORT                 ,"string too short"},
 | 
					{ASN1_R_STRING_TOO_SHORT                 ,"string too short"},
 | 
				
			||||||
{ASN1_R_TAG_VALUE_TOO_HIGH               ,"tag value too high"},
 | 
					{ASN1_R_TAG_VALUE_TOO_HIGH               ,"tag value too high"},
 | 
				
			||||||
{ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD,"the asn1 object identifier is not known for this md"},
 | 
					{ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD,"the asn1 object identifier is not known for this md"},
 | 
				
			||||||
{ASN1_R_TIME_NOT_ASCII_FORMAT            ,"time not ascii format"},
 | 
					 | 
				
			||||||
{ASN1_R_TOO_LONG                         ,"too long"},
 | 
					{ASN1_R_TOO_LONG                         ,"too long"},
 | 
				
			||||||
{ASN1_R_TYPE_NOT_CONSTRUCTED             ,"type not constructed"},
 | 
					{ASN1_R_TYPE_NOT_CONSTRUCTED             ,"type not constructed"},
 | 
				
			||||||
{ASN1_R_UNABLE_TO_DECODE_RSA_KEY         ,"unable to decode rsa key"},
 | 
					{ASN1_R_UNABLE_TO_DECODE_RSA_KEY         ,"unable to decode rsa key"},
 | 
				
			||||||
@@ -241,13 +215,10 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
 | 
				
			|||||||
{ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM ,"unknown message digest algorithm"},
 | 
					{ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM ,"unknown message digest algorithm"},
 | 
				
			||||||
{ASN1_R_UNKNOWN_OBJECT_TYPE              ,"unknown object type"},
 | 
					{ASN1_R_UNKNOWN_OBJECT_TYPE              ,"unknown object type"},
 | 
				
			||||||
{ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE          ,"unknown public key type"},
 | 
					{ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE          ,"unknown public key type"},
 | 
				
			||||||
{ASN1_R_UNKNOWN_TAG                      ,"unknown tag"},
 | 
					 | 
				
			||||||
{ASN1_R_UNKOWN_FORMAT                    ,"unkown format"},
 | 
					 | 
				
			||||||
{ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE  ,"unsupported any defined by type"},
 | 
					{ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE  ,"unsupported any defined by type"},
 | 
				
			||||||
{ASN1_R_UNSUPPORTED_CIPHER               ,"unsupported cipher"},
 | 
					{ASN1_R_UNSUPPORTED_CIPHER               ,"unsupported cipher"},
 | 
				
			||||||
{ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM ,"unsupported encryption algorithm"},
 | 
					{ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM ,"unsupported encryption algorithm"},
 | 
				
			||||||
{ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE      ,"unsupported public key type"},
 | 
					{ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE      ,"unsupported public key type"},
 | 
				
			||||||
{ASN1_R_UNSUPPORTED_TYPE                 ,"unsupported type"},
 | 
					 | 
				
			||||||
{ASN1_R_WRONG_TAG                        ,"wrong tag"},
 | 
					{ASN1_R_WRONG_TAG                        ,"wrong tag"},
 | 
				
			||||||
{ASN1_R_WRONG_TYPE                       ,"wrong type"},
 | 
					{ASN1_R_WRONG_TYPE                       ,"wrong type"},
 | 
				
			||||||
{0,NULL}
 | 
					{0,NULL}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,839 +0,0 @@
 | 
				
			|||||||
/* asn1_gen.c */
 | 
					 | 
				
			||||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
 | 
					 | 
				
			||||||
 * project 2002.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
/* ====================================================================
 | 
					 | 
				
			||||||
 * Copyright (c) 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
 | 
					 | 
				
			||||||
 *    licensing@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).
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "cryptlib.h"
 | 
					 | 
				
			||||||
#include <openssl/asn1.h>
 | 
					 | 
				
			||||||
#include <openssl/x509v3.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG		0x10000
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_IMP	(ASN1_GEN_FLAG|1)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_EXP	(ASN1_GEN_FLAG|2)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_TAG	(ASN1_GEN_FLAG|3)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_BITWRAP	(ASN1_GEN_FLAG|4)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_OCTWRAP	(ASN1_GEN_FLAG|5)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_SEQWRAP	(ASN1_GEN_FLAG|6)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_SETWRAP	(ASN1_GEN_FLAG|7)
 | 
					 | 
				
			||||||
#define ASN1_GEN_FLAG_FORMAT	(ASN1_GEN_FLAG|8)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define ASN1_GEN_STR(str,val)	{str, sizeof(str) - 1, val}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define ASN1_FLAG_EXP_MAX	20
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Input formats */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* ASCII: default */
 | 
					 | 
				
			||||||
#define ASN1_GEN_FORMAT_ASCII	1
 | 
					 | 
				
			||||||
/* UTF8 */
 | 
					 | 
				
			||||||
#define ASN1_GEN_FORMAT_UTF8	2
 | 
					 | 
				
			||||||
/* Hex */
 | 
					 | 
				
			||||||
#define ASN1_GEN_FORMAT_HEX	3
 | 
					 | 
				
			||||||
/* List of bits */
 | 
					 | 
				
			||||||
#define ASN1_GEN_FORMAT_BITLIST	4
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct tag_name_st
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	char *strnam;
 | 
					 | 
				
			||||||
	int len;
 | 
					 | 
				
			||||||
	int tag;
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
typedef struct
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	int exp_tag;
 | 
					 | 
				
			||||||
	int exp_class;
 | 
					 | 
				
			||||||
	int exp_constructed;
 | 
					 | 
				
			||||||
	int exp_pad;
 | 
					 | 
				
			||||||
	long exp_len;
 | 
					 | 
				
			||||||
	} tag_exp_type;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
typedef struct
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	int imp_tag;
 | 
					 | 
				
			||||||
	int imp_class;
 | 
					 | 
				
			||||||
	int utype;
 | 
					 | 
				
			||||||
	int format;
 | 
					 | 
				
			||||||
	const char *str;
 | 
					 | 
				
			||||||
	tag_exp_type exp_list[ASN1_FLAG_EXP_MAX];
 | 
					 | 
				
			||||||
	int exp_count;
 | 
					 | 
				
			||||||
	} tag_exp_arg;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int bitstr_cb(const char *elem, int len, void *bitstr);
 | 
					 | 
				
			||||||
static int asn1_cb(const char *elem, int len, void *bitstr);
 | 
					 | 
				
			||||||
static int append_exp(tag_exp_arg *arg, int exp_tag, int exp_class, int exp_constructed, int exp_pad, int imp_ok);
 | 
					 | 
				
			||||||
static int parse_tagging(const char *vstart, int vlen, int *ptag, int *pclass);
 | 
					 | 
				
			||||||
static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf);
 | 
					 | 
				
			||||||
static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype);
 | 
					 | 
				
			||||||
static int asn1_str2tag(const char *tagstr, int len);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	X509V3_CTX cnf;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!nconf)
 | 
					 | 
				
			||||||
		return ASN1_generate_v3(str, NULL);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	X509V3_set_nconf(&cnf, nconf);
 | 
					 | 
				
			||||||
	return ASN1_generate_v3(str, &cnf);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	ASN1_TYPE *ret;
 | 
					 | 
				
			||||||
	tag_exp_arg asn1_tags;
 | 
					 | 
				
			||||||
	tag_exp_type *etmp;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	int i, len;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	unsigned char *orig_der = NULL, *new_der = NULL;
 | 
					 | 
				
			||||||
	unsigned char *cpy_start, *p;
 | 
					 | 
				
			||||||
	int cpy_len;
 | 
					 | 
				
			||||||
	long hdr_len;
 | 
					 | 
				
			||||||
	int hdr_constructed = 0, hdr_tag, hdr_class;
 | 
					 | 
				
			||||||
	int r;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	asn1_tags.imp_tag = -1;
 | 
					 | 
				
			||||||
	asn1_tags.imp_class = -1;
 | 
					 | 
				
			||||||
	asn1_tags.format = ASN1_GEN_FORMAT_ASCII;
 | 
					 | 
				
			||||||
	asn1_tags.exp_count = 0;
 | 
					 | 
				
			||||||
	if (CONF_parse_list(str, ',', 1, asn1_cb, &asn1_tags) != 0)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if ((asn1_tags.utype == V_ASN1_SEQUENCE) || (asn1_tags.utype == V_ASN1_SET))
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (!cnf)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_GENERATE_V3, ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG);
 | 
					 | 
				
			||||||
			return NULL;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		ret = asn1_multi(asn1_tags.utype, asn1_tags.str, cnf);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		ret = asn1_str2type(asn1_tags.str, asn1_tags.format, asn1_tags.utype);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!ret)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* If no tagging return base type */
 | 
					 | 
				
			||||||
	if ((asn1_tags.imp_tag == -1) && (asn1_tags.exp_count == 0))
 | 
					 | 
				
			||||||
		return ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Generate the encoding */
 | 
					 | 
				
			||||||
	cpy_len = i2d_ASN1_TYPE(ret, &orig_der);
 | 
					 | 
				
			||||||
	ASN1_TYPE_free(ret);
 | 
					 | 
				
			||||||
	ret = NULL;
 | 
					 | 
				
			||||||
	/* Set point to start copying for modified encoding */
 | 
					 | 
				
			||||||
	cpy_start = orig_der;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Do we need IMPLICIT tagging? */
 | 
					 | 
				
			||||||
	if (asn1_tags.imp_tag != -1)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		/* If IMPLICIT we will replace the underlying tag */
 | 
					 | 
				
			||||||
		/* Skip existing tag+len */
 | 
					 | 
				
			||||||
		r = ASN1_get_object(&cpy_start, &hdr_len, &hdr_tag, &hdr_class, cpy_len);
 | 
					 | 
				
			||||||
		if (r & 0x80)
 | 
					 | 
				
			||||||
			goto err;
 | 
					 | 
				
			||||||
		/* Update copy length */
 | 
					 | 
				
			||||||
		cpy_len -= cpy_start - orig_der;
 | 
					 | 
				
			||||||
		/* For IMPLICIT tagging the length should match the
 | 
					 | 
				
			||||||
		 * original length and constructed flag should be
 | 
					 | 
				
			||||||
		 * consistent.
 | 
					 | 
				
			||||||
		 */
 | 
					 | 
				
			||||||
		if (r & 0x1)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			/* Indefinite length constructed */
 | 
					 | 
				
			||||||
			hdr_constructed = 2;
 | 
					 | 
				
			||||||
			hdr_len = 0;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			/* Just retain constructed flag */
 | 
					 | 
				
			||||||
			hdr_constructed = r & V_ASN1_CONSTRUCTED;
 | 
					 | 
				
			||||||
		/* Work out new length with IMPLICIT tag: ignore constructed
 | 
					 | 
				
			||||||
		 * because it will mess up if indefinite length
 | 
					 | 
				
			||||||
		 */
 | 
					 | 
				
			||||||
		len = ASN1_object_size(0, hdr_len, asn1_tags.imp_tag);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		len = cpy_len;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Work out length in any EXPLICIT, starting from end */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	for(i = 0, etmp = asn1_tags.exp_list + asn1_tags.exp_count - 1; i < asn1_tags.exp_count; i++, etmp--)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		/* Content length: number of content octets + any padding */
 | 
					 | 
				
			||||||
		len += etmp->exp_pad;
 | 
					 | 
				
			||||||
		etmp->exp_len = len;
 | 
					 | 
				
			||||||
		/* Total object length: length including new header */
 | 
					 | 
				
			||||||
		len = ASN1_object_size(0, len, etmp->exp_tag);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Allocate buffer for new encoding */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	new_der = OPENSSL_malloc(len);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Generate tagged encoding */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p = new_der;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Output explicit tags first */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	for (i = 0, etmp = asn1_tags.exp_list; i < asn1_tags.exp_count; i++, etmp++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1_put_object(&p, etmp->exp_constructed, etmp->exp_len,
 | 
					 | 
				
			||||||
					etmp->exp_tag, etmp->exp_class);
 | 
					 | 
				
			||||||
		if (etmp->exp_pad)
 | 
					 | 
				
			||||||
			*p++ = 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* If IMPLICIT, output tag */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (asn1_tags.imp_tag != -1)
 | 
					 | 
				
			||||||
		ASN1_put_object(&p, hdr_constructed, hdr_len,
 | 
					 | 
				
			||||||
					asn1_tags.imp_tag, asn1_tags.imp_class);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Copy across original encoding */
 | 
					 | 
				
			||||||
	memcpy(p, cpy_start, cpy_len);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p = new_der;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Obtain new ASN1_TYPE structure */
 | 
					 | 
				
			||||||
	ret = d2i_ASN1_TYPE(NULL, &p, len);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err:
 | 
					 | 
				
			||||||
	if (orig_der)
 | 
					 | 
				
			||||||
		OPENSSL_free(orig_der);
 | 
					 | 
				
			||||||
	if (new_der)
 | 
					 | 
				
			||||||
		OPENSSL_free(new_der);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int asn1_cb(const char *elem, int len, void *bitstr)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	tag_exp_arg *arg = bitstr;
 | 
					 | 
				
			||||||
	int i;
 | 
					 | 
				
			||||||
	int utype;
 | 
					 | 
				
			||||||
	int vlen = 0;
 | 
					 | 
				
			||||||
	const char *p, *vstart = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	int tmp_tag, tmp_class;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	for(i = 0, p = elem; i < len; p++, i++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		/* Look for the ':' in name value pairs */
 | 
					 | 
				
			||||||
		if (*p == ':')
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			vstart = p + 1;
 | 
					 | 
				
			||||||
			vlen = len - (vstart - elem);
 | 
					 | 
				
			||||||
			len = p - elem;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	utype = asn1_str2tag(elem, len);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (utype == -1)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKNOWN_TAG);
 | 
					 | 
				
			||||||
		ERR_add_error_data(2, "tag=", elem);
 | 
					 | 
				
			||||||
		return -1;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* If this is not a modifier mark end of string and exit */
 | 
					 | 
				
			||||||
	if (!(utype & ASN1_GEN_FLAG))
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		arg->utype = utype;
 | 
					 | 
				
			||||||
		arg->str = vstart;
 | 
					 | 
				
			||||||
		/* If no value and not end of string, error */
 | 
					 | 
				
			||||||
		if (!vstart && elem[len])
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_CB, ASN1_R_MISSING_VALUE);
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	switch(utype)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_IMP:
 | 
					 | 
				
			||||||
		/* Check for illegal multiple IMPLICIT tagging */
 | 
					 | 
				
			||||||
		if (arg->imp_tag != -1)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_CB, ASN1_R_ILLEGAL_NESTED_TAGGING);
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (!parse_tagging(vstart, vlen, &arg->imp_tag, &arg->imp_class))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_EXP:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (!parse_tagging(vstart, vlen, &tmp_tag, &tmp_class))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		if (!append_exp(arg, tmp_tag, tmp_class, 1, 0, 0))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_SEQWRAP:
 | 
					 | 
				
			||||||
		if (!append_exp(arg, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, 1, 0, 1))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_SETWRAP:
 | 
					 | 
				
			||||||
		if (!append_exp(arg, V_ASN1_SET, V_ASN1_UNIVERSAL, 1, 0, 1))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_BITWRAP:
 | 
					 | 
				
			||||||
		if (!append_exp(arg, V_ASN1_BIT_STRING, V_ASN1_UNIVERSAL, 0, 1, 1))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_OCTWRAP:
 | 
					 | 
				
			||||||
		if (!append_exp(arg, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL, 0, 0, 1))
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case ASN1_GEN_FLAG_FORMAT:
 | 
					 | 
				
			||||||
		if (!strncmp(vstart, "ASCII", 5))
 | 
					 | 
				
			||||||
			arg->format = ASN1_GEN_FORMAT_ASCII;
 | 
					 | 
				
			||||||
		else if (!strncmp(vstart, "UTF8", 4))
 | 
					 | 
				
			||||||
			arg->format = ASN1_GEN_FORMAT_UTF8;
 | 
					 | 
				
			||||||
		else if (!strncmp(vstart, "HEX", 3))
 | 
					 | 
				
			||||||
			arg->format = ASN1_GEN_FORMAT_HEX;
 | 
					 | 
				
			||||||
		else if (!strncmp(vstart, "BITLIST", 3))
 | 
					 | 
				
			||||||
			arg->format = ASN1_GEN_FORMAT_BITLIST;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKOWN_FORMAT);
 | 
					 | 
				
			||||||
			return -1;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int parse_tagging(const char *vstart, int vlen, int *ptag, int *pclass)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	char erch[2];
 | 
					 | 
				
			||||||
	long tag_num;
 | 
					 | 
				
			||||||
	char *eptr;
 | 
					 | 
				
			||||||
	if (!vstart)
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
	tag_num = strtoul(vstart, &eptr, 10);
 | 
					 | 
				
			||||||
	/* Check we haven't gone past max length: should be impossible */
 | 
					 | 
				
			||||||
	if (eptr && *eptr && (eptr > vstart + vlen))
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
	if (tag_num < 0)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_PARSE_TAGGING, ASN1_R_INVALID_NUMBER);
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	*ptag = tag_num;
 | 
					 | 
				
			||||||
	/* If we have non numeric characters, parse them */
 | 
					 | 
				
			||||||
	if (eptr)
 | 
					 | 
				
			||||||
		vlen -= eptr - vstart;
 | 
					 | 
				
			||||||
	else 
 | 
					 | 
				
			||||||
		vlen = 0;
 | 
					 | 
				
			||||||
	if (vlen)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		switch (*eptr)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			case 'U':
 | 
					 | 
				
			||||||
			*pclass = V_ASN1_UNIVERSAL;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			case 'A':
 | 
					 | 
				
			||||||
			*pclass = V_ASN1_APPLICATION;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			case 'P':
 | 
					 | 
				
			||||||
			*pclass = V_ASN1_PRIVATE;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			case 'C':
 | 
					 | 
				
			||||||
			*pclass = V_ASN1_CONTEXT_SPECIFIC;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			default:
 | 
					 | 
				
			||||||
			erch[0] = *eptr;
 | 
					 | 
				
			||||||
			erch[1] = 0;
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_PARSE_TAGGING, ASN1_R_INVALID_MODIFIER);
 | 
					 | 
				
			||||||
			ERR_add_error_data(2, "Char=", erch);
 | 
					 | 
				
			||||||
			return 0;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		*pclass = V_ASN1_CONTEXT_SPECIFIC;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Handle multiple types: SET and SEQUENCE */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	ASN1_TYPE *ret = NULL, *typ = NULL;
 | 
					 | 
				
			||||||
	STACK_OF(ASN1_TYPE) *sk = NULL;
 | 
					 | 
				
			||||||
	STACK_OF(CONF_VALUE) *sect = NULL;
 | 
					 | 
				
			||||||
	unsigned char *der = NULL, *p;
 | 
					 | 
				
			||||||
	int derlen;
 | 
					 | 
				
			||||||
	int i, is_set;
 | 
					 | 
				
			||||||
	sk = sk_ASN1_TYPE_new_null();
 | 
					 | 
				
			||||||
	if (section)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if (!cnf)
 | 
					 | 
				
			||||||
			goto bad;
 | 
					 | 
				
			||||||
		sect = X509V3_get_section(cnf, (char *)section);
 | 
					 | 
				
			||||||
		if (!sect)
 | 
					 | 
				
			||||||
			goto bad;
 | 
					 | 
				
			||||||
		for (i = 0; i < sk_CONF_VALUE_num(sect); i++)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			typ = ASN1_generate_v3(sk_CONF_VALUE_value(sect, i)->value, cnf);
 | 
					 | 
				
			||||||
			if (!typ)
 | 
					 | 
				
			||||||
				goto bad;
 | 
					 | 
				
			||||||
			sk_ASN1_TYPE_push(sk, typ);
 | 
					 | 
				
			||||||
			typ = NULL;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Now we has a STACK of the components, convert to the correct form */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (utype == V_ASN1_SET)
 | 
					 | 
				
			||||||
		is_set = 1;
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		is_set = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	derlen = i2d_ASN1_SET((STACK *)sk, NULL, i2d_ASN1_TYPE, utype, V_ASN1_UNIVERSAL, is_set);
 | 
					 | 
				
			||||||
	der = OPENSSL_malloc(derlen);
 | 
					 | 
				
			||||||
	p = der;
 | 
					 | 
				
			||||||
	i2d_ASN1_SET((STACK *)sk, &p, i2d_ASN1_TYPE, utype, V_ASN1_UNIVERSAL, is_set);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!(ret = ASN1_TYPE_new()))
 | 
					 | 
				
			||||||
		goto bad;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!(ret->value.asn1_string = ASN1_STRING_type_new(utype)))
 | 
					 | 
				
			||||||
		goto bad;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ret->type = utype;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ret->value.asn1_string->data = der;
 | 
					 | 
				
			||||||
	ret->value.asn1_string->length = derlen;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	der = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	bad:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (der)
 | 
					 | 
				
			||||||
		OPENSSL_free(der);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (sk)
 | 
					 | 
				
			||||||
		sk_ASN1_TYPE_pop_free(sk, ASN1_TYPE_free);
 | 
					 | 
				
			||||||
	if (typ)
 | 
					 | 
				
			||||||
		ASN1_TYPE_free(typ);
 | 
					 | 
				
			||||||
	if (sect)
 | 
					 | 
				
			||||||
		X509V3_section_free(cnf, sect);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return ret;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int append_exp(tag_exp_arg *arg, int exp_tag, int exp_class, int exp_constructed, int exp_pad, int imp_ok)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	tag_exp_type *exp_tmp;
 | 
					 | 
				
			||||||
	/* Can only have IMPLICIT if permitted */
 | 
					 | 
				
			||||||
	if ((arg->imp_tag != -1) && !imp_ok)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_APPEND_TAG, ASN1_R_ILLEGAL_IMPLICIT_TAG);
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (arg->exp_count == ASN1_FLAG_EXP_MAX)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_APPEND_TAG, ASN1_R_DEPTH_EXCEEDED);
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	exp_tmp = &arg->exp_list[arg->exp_count++];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* If IMPLICIT set tag to implicit value then
 | 
					 | 
				
			||||||
	 * reset implicit tag since it has been used.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if (arg->imp_tag != -1)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		exp_tmp->exp_tag = arg->imp_tag;
 | 
					 | 
				
			||||||
		exp_tmp->exp_class = arg->imp_class;
 | 
					 | 
				
			||||||
		arg->imp_tag = -1;
 | 
					 | 
				
			||||||
		arg->imp_class = -1;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		exp_tmp->exp_tag = exp_tag;
 | 
					 | 
				
			||||||
		exp_tmp->exp_class = exp_class;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	exp_tmp->exp_constructed = exp_constructed;
 | 
					 | 
				
			||||||
	exp_tmp->exp_pad = exp_pad;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int asn1_str2tag(const char *tagstr, int len)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	int i;
 | 
					 | 
				
			||||||
	static struct tag_name_st *tntmp, tnst [] = {
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BOOL", V_ASN1_BOOLEAN),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BOOLEAN", V_ASN1_BOOLEAN),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("NULL", V_ASN1_NULL),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("INT", V_ASN1_INTEGER),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("INTEGER", V_ASN1_INTEGER),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("ENUM", V_ASN1_ENUMERATED),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("ENUMERATED", V_ASN1_ENUMERATED),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("OID", V_ASN1_OBJECT),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("OBJECT", V_ASN1_OBJECT),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("UTCTIME", V_ASN1_UTCTIME),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("UTC", V_ASN1_UTCTIME),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("GENERALIZEDTIME", V_ASN1_GENERALIZEDTIME),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("GENTIME", V_ASN1_GENERALIZEDTIME),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("OCT", V_ASN1_OCTET_STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("OCTETSTRING", V_ASN1_OCTET_STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BITSTR", V_ASN1_BIT_STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BITSTRING", V_ASN1_BIT_STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("UNIVERSALSTRING", V_ASN1_UNIVERSALSTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("UNIV", V_ASN1_UNIVERSALSTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("IA5", V_ASN1_IA5STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("IA5STRING", V_ASN1_IA5STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("UTF8", V_ASN1_UTF8STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("UTF8String", V_ASN1_UTF8STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BMP", V_ASN1_BMPSTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BMPSTRING", V_ASN1_BMPSTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("VISIBLESTRING", V_ASN1_VISIBLESTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("VISIBLE", V_ASN1_VISIBLESTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("PRINTABLESTRING", V_ASN1_PRINTABLESTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("PRINTABLE", V_ASN1_PRINTABLESTRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("T61", V_ASN1_T61STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("T61STRING", V_ASN1_T61STRING),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("TELETEXSTRING", V_ASN1_T61STRING),
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		/* Special cases */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("SEQUENCE", V_ASN1_SEQUENCE),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("SEQ", V_ASN1_SEQUENCE),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("SET", V_ASN1_SET),
 | 
					 | 
				
			||||||
		/* type modifiers */
 | 
					 | 
				
			||||||
		/* Explicit tag */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("EXP", ASN1_GEN_FLAG_EXP),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("EXPLICIT", ASN1_GEN_FLAG_EXP),
 | 
					 | 
				
			||||||
		/* Implicit tag */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("IMP", ASN1_GEN_FLAG_IMP),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("IMPLICIT", ASN1_GEN_FLAG_IMP),
 | 
					 | 
				
			||||||
		/* OCTET STRING wrapper */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("OCTWRAP", ASN1_GEN_FLAG_OCTWRAP),
 | 
					 | 
				
			||||||
		/* SEQUENCE wrapper */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("SEQWRAP", ASN1_GEN_FLAG_SEQWRAP),
 | 
					 | 
				
			||||||
		/* SET wrapper */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("SETWRAP", ASN1_GEN_FLAG_SEQWRAP),
 | 
					 | 
				
			||||||
		/* BIT STRING wrapper */
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("BITWRAP", ASN1_GEN_FLAG_BITWRAP),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("FORM", ASN1_GEN_FLAG_FORMAT),
 | 
					 | 
				
			||||||
		ASN1_GEN_STR("FORMAT", ASN1_GEN_FLAG_FORMAT),
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (len == -1)
 | 
					 | 
				
			||||||
		len = strlen(tagstr);
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	tntmp = tnst;	
 | 
					 | 
				
			||||||
	for (i = 0; i < sizeof(tnst) / sizeof(struct tag_name_st); i++, tntmp++)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		if ((len == tntmp->len) && !strncmp(tntmp->strnam, tagstr, len))
 | 
					 | 
				
			||||||
			return tntmp->tag;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	return -1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	ASN1_TYPE *atmp = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	CONF_VALUE vtmp;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	unsigned char *rdata;
 | 
					 | 
				
			||||||
	long rdlen;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	int no_unused = 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!(atmp = ASN1_TYPE_new()))
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_STR2TYPE, ERR_R_MALLOC_FAILURE);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!str)
 | 
					 | 
				
			||||||
		str = "";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	switch(utype)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_NULL:
 | 
					 | 
				
			||||||
		if (str && *str)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_NULL_VALUE);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		case V_ASN1_BOOLEAN:
 | 
					 | 
				
			||||||
		if (format != ASN1_GEN_FORMAT_ASCII)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_NOT_ASCII_FORMAT);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		vtmp.value = (char *)str;
 | 
					 | 
				
			||||||
		if (!X509V3_get_value_bool(&vtmp, &atmp->value.boolean))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_BOOLEAN);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_INTEGER:
 | 
					 | 
				
			||||||
		case V_ASN1_ENUMERATED:
 | 
					 | 
				
			||||||
		if (format != ASN1_GEN_FORMAT_ASCII)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_INTEGER_NOT_ASCII_FORMAT);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (!(atmp->value.integer = s2i_ASN1_INTEGER(NULL, (char *)str)))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_INTEGER);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_OBJECT:
 | 
					 | 
				
			||||||
		if (format != ASN1_GEN_FORMAT_ASCII)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_OBJECT_NOT_ASCII_FORMAT);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (!(atmp->value.object = OBJ_txt2obj(str, 0)))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_OBJECT);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_UTCTIME:
 | 
					 | 
				
			||||||
		case V_ASN1_GENERALIZEDTIME:
 | 
					 | 
				
			||||||
		if (format != ASN1_GEN_FORMAT_ASCII)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_TIME_NOT_ASCII_FORMAT);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (!(atmp->value.asn1_string = ASN1_STRING_new()))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ERR_R_MALLOC_FAILURE);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		if (!ASN1_STRING_set(atmp->value.asn1_string, str, -1))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ERR_R_MALLOC_FAILURE);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		atmp->value.asn1_string->type = utype;
 | 
					 | 
				
			||||||
		if (!ASN1_TIME_check(atmp->value.asn1_string))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_TIME_VALUE);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_BMPSTRING:
 | 
					 | 
				
			||||||
		case V_ASN1_PRINTABLESTRING:
 | 
					 | 
				
			||||||
		case V_ASN1_IA5STRING:
 | 
					 | 
				
			||||||
		case V_ASN1_T61STRING:
 | 
					 | 
				
			||||||
		case V_ASN1_UTF8STRING:
 | 
					 | 
				
			||||||
		case V_ASN1_VISIBLESTRING:
 | 
					 | 
				
			||||||
		case V_ASN1_UNIVERSALSTRING:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (format == ASN1_GEN_FORMAT_ASCII)
 | 
					 | 
				
			||||||
			format = MBSTRING_ASC;
 | 
					 | 
				
			||||||
		else if (format == ASN1_GEN_FORMAT_UTF8)
 | 
					 | 
				
			||||||
			format = MBSTRING_UTF8;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_FORMAT);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (ASN1_mbstring_copy(&atmp->value.asn1_string, (unsigned char *)str,
 | 
					 | 
				
			||||||
						-1, format, ASN1_tag2bit(utype)) <= 0)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ERR_R_MALLOC_FAILURE);
 | 
					 | 
				
			||||||
			goto bad_str;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_BIT_STRING:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case V_ASN1_OCTET_STRING:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (!(atmp->value.asn1_string = ASN1_STRING_new()))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ERR_R_MALLOC_FAILURE);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (format == ASN1_GEN_FORMAT_HEX)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			if (!(rdata = string_to_hex((char *)str, &rdlen)))
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_HEX);
 | 
					 | 
				
			||||||
				goto bad_str;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			atmp->value.asn1_string->data = rdata;
 | 
					 | 
				
			||||||
			atmp->value.asn1_string->length = rdlen;
 | 
					 | 
				
			||||||
			atmp->value.asn1_string->type = utype;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else if (format == ASN1_GEN_FORMAT_ASCII)
 | 
					 | 
				
			||||||
			ASN1_STRING_set(atmp->value.asn1_string, str, -1);
 | 
					 | 
				
			||||||
		else if ((format == ASN1_GEN_FORMAT_BITLIST) && (utype == V_ASN1_BIT_STRING))
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			if (!CONF_parse_list(str, ',', 1, bitstr_cb, atmp->value.bit_string))
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_LIST_ERROR);
 | 
					 | 
				
			||||||
				goto bad_str;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			no_unused = 0;
 | 
					 | 
				
			||||||
			
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		else 
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_BITSTRING_FORMAT);
 | 
					 | 
				
			||||||
			goto bad_form;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if ((utype == V_ASN1_BIT_STRING) && no_unused)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			atmp->value.asn1_string->flags
 | 
					 | 
				
			||||||
				&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
 | 
					 | 
				
			||||||
        		atmp->value.asn1_string->flags
 | 
					 | 
				
			||||||
				|= ASN1_STRING_FLAG_BITS_LEFT;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_UNSUPPORTED_TYPE);
 | 
					 | 
				
			||||||
		goto bad_str;
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	atmp->type = utype;
 | 
					 | 
				
			||||||
	return atmp;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	bad_str:
 | 
					 | 
				
			||||||
	ERR_add_error_data(2, "string=", str);
 | 
					 | 
				
			||||||
	bad_form:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ASN1_TYPE_free(atmp);
 | 
					 | 
				
			||||||
	return NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int bitstr_cb(const char *elem, int len, void *bitstr)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	long bitnum;
 | 
					 | 
				
			||||||
	char *eptr;
 | 
					 | 
				
			||||||
	if (!elem)
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
	bitnum = strtoul(elem, &eptr, 10);
 | 
					 | 
				
			||||||
	if (eptr && *eptr && (eptr != elem + len))
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
	if (bitnum < 0)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_BITSTR_CB, ASN1_R_INVALID_NUMBER);
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	if (!ASN1_BIT_STRING_set_bit(bitstr, bitnum, 1))
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		ASN1err(ASN1_F_BITSTR_CB, ERR_R_MALLOC_FAILURE);
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	return 1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user