Compare commits
	
		
			2781 Commits
		
	
	
		
			AFTER_COMP
			...
			OpenSSL_0_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					bfb7bac83b | ||
| 
						 | 
					ac4fb4a138 | ||
| 
						 | 
					75f7141ab4 | ||
| 
						 | 
					23a6dd83b5 | ||
| 
						 | 
					450b38c05b | ||
| 
						 | 
					0286cccbc1 | ||
| 
						 | 
					dc26d1193a | ||
| 
						 | 
					64892df03e | ||
| 
						 | 
					9e57ab615c | ||
| 
						 | 
					b16fee0aa7 | ||
| 
						 | 
					70bfcc895e | ||
| 
						 | 
					8de8bcbe2c | ||
| 
						 | 
					14e21742d5 | ||
| 
						 | 
					44963e4af7 | ||
| 
						 | 
					125a86113f | ||
| 
						 | 
					d06db8ad9e | ||
| 
						 | 
					ffa8e7b74c | ||
| 
						 | 
					85e8decc16 | ||
| 
						 | 
					3216de1ee5 | ||
| 
						 | 
					8f349c58f7 | ||
| 
						 | 
					cfafb6a73d | ||
| 
						 | 
					818c0b2e42 | ||
| 
						 | 
					aef8807e76 | ||
| 
						 | 
					4157fae6fe | ||
| 
						 | 
					15902f8341 | ||
| 
						 | 
					8bcd746e84 | ||
| 
						 | 
					56fe40191d | ||
| 
						 | 
					97c802588c | ||
| 
						 | 
					8c172bce1c | ||
| 
						 | 
					4fa9664f5e | ||
| 
						 | 
					483b312391 | ||
| 
						 | 
					1033449613 | ||
| 
						 | 
					f992081682 | ||
| 
						 | 
					5ad93a12b2 | ||
| 
						 | 
					efeb352163 | ||
| 
						 | 
					44dd6865b9 | ||
| 
						 | 
					bb82123707 | ||
| 
						 | 
					eb7bb58471 | ||
| 
						 | 
					7f9c37457a | ||
| 
						 | 
					86022a79a5 | ||
| 
						 | 
					88a8ae6aee | ||
| 
						 | 
					b58e24ac57 | ||
| 
						 | 
					496c4e1033 | ||
| 
						 | 
					0b948f3677 | ||
| 
						 | 
					7f911c668d | ||
| 
						 | 
					e81ef01a0a | ||
| 
						 | 
					d2033156c5 | ||
| 
						 | 
					e4c1c03c5b | ||
| 
						 | 
					5edd0f51e3 | ||
| 
						 | 
					1ecb88b95a | ||
| 
						 | 
					03ecfadf3d | ||
| 
						 | 
					64c6865427 | ||
| 
						 | 
					43894f9c0d | ||
| 
						 | 
					40007ad24d | ||
| 
						 | 
					c6e27dcf31 | ||
| 
						 | 
					a47e836efe | ||
| 
						 | 
					370358dfb4 | ||
| 
						 | 
					a77b16abd4 | ||
| 
						 | 
					061c8f977d | ||
| 
						 | 
					d70f5891da | ||
| 
						 | 
					901959c945 | ||
| 
						 | 
					a857495d17 | ||
| 
						 | 
					b1640e47e4 | ||
| 
						 | 
					5358bc44f4 | ||
| 
						 | 
					a7f14cb4c6 | ||
| 
						 | 
					531b538df5 | ||
| 
						 | 
					49ede900fa | ||
| 
						 | 
					7c6cf1b176 | ||
| 
						 | 
					fa5cea169a | ||
| 
						 | 
					83f22920c2 | ||
| 
						 | 
					bec15f2109 | ||
| 
						 | 
					43c0d77296 | ||
| 
						 | 
					46b7624b8e | ||
| 
						 | 
					9e356100d0 | ||
| 
						 | 
					7ca482062f | ||
| 
						 | 
					ef4c5802ec | ||
| 
						 | 
					fee38dcb9a | ||
| 
						 | 
					c116de76ad | ||
| 
						 | 
					6069bdbe27 | ||
| 
						 | 
					871fe9107d | ||
| 
						 | 
					2663f39ff9 | ||
| 
						 | 
					9f0856208b | ||
| 
						 | 
					fb4de3deed | ||
| 
						 | 
					4d4716dc03 | ||
| 
						 | 
					b5e4469150 | ||
| 
						 | 
					3e00d6c4bb | ||
| 
						 | 
					5e86220660 | ||
| 
						 | 
					4313847660 | ||
| 
						 | 
					3844adbf58 | ||
| 
						 | 
					d8e2073449 | ||
| 
						 | 
					e9f7ebd674 | ||
| 
						 | 
					5affe206e1 | ||
| 
						 | 
					1f4eccaaa5 | ||
| 
						 | 
					07bf82a71d | ||
| 
						 | 
					43d6233a22 | ||
| 
						 | 
					736ce650c6 | ||
| 
						 | 
					a8bb3d0e15 | ||
| 
						 | 
					f27a152f69 | ||
| 
						 | 
					63d494b22c | ||
| 
						 | 
					9ac9a29407 | ||
| 
						 | 
					bdb4a7e092 | ||
| 
						 | 
					0163602573 | ||
| 
						 | 
					bac2e26a9e | ||
| 
						 | 
					10eae14f9b | ||
| 
						 | 
					745c7356c2 | ||
| 
						 | 
					e31c121315 | ||
| 
						 | 
					dbf2ac31c9 | ||
| 
						 | 
					4108d365bf | ||
| 
						 | 
					03ef2c333c | ||
| 
						 | 
					7922ba2feb | ||
| 
						 | 
					d94b22235f | ||
| 
						 | 
					72d75ee206 | ||
| 
						 | 
					49bc4c1023 | ||
| 
						 | 
					0e92f7738a | ||
| 
						 | 
					d529f2a8f7 | ||
| 
						 | 
					141a64faff | ||
| 
						 | 
					035dcd3724 | ||
| 
						 | 
					3e9c37a386 | ||
| 
						 | 
					00a59641ee | ||
| 
						 | 
					90cce79346 | ||
| 
						 | 
					4eeaf52ed9 | ||
| 
						 | 
					3642f632d3 | ||
| 
						 | 
					aaa16d0001 | ||
| 
						 | 
					3b8ba6b610 | ||
| 
						 | 
					535aef9def | ||
| 
						 | 
					6e308baf5a | ||
| 
						 | 
					5a9d2d9081 | ||
| 
						 | 
					688791b22b | ||
| 
						 | 
					8e94e99ccb | ||
| 
						 | 
					e20db94948 | ||
| 
						 | 
					462a286eeb | ||
| 
						 | 
					28722cf212 | ||
| 
						 | 
					a110d01771 | ||
| 
						 | 
					7ef7a1b3de | ||
| 
						 | 
					2749276b95 | ||
| 
						 | 
					b6a5fdb8a7 | ||
| 
						 | 
					bf5773fa2d | ||
| 
						 | 
					ecf139917d | ||
| 
						 | 
					ab23d5ffda | ||
| 
						 | 
					1a979201d5 | ||
| 
						 | 
					216659eb87 | ||
| 
						 | 
					5d6383c83f | ||
| 
						 | 
					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 | ||
| 
						 | 
					a0cac0ff75 | ||
| 
						 | 
					817089b66d | ||
| 
						 | 
					e703b46598 | ||
| 
						 | 
					0fa793bc7b | ||
| 
						 | 
					ba5477eb1a | ||
| 
						 | 
					5c42f62e48 | ||
| 
						 | 
					a08e05d1be | ||
| 
						 | 
					d342ec3335 | ||
| 
						 | 
					3d8b8860cf | ||
| 
						 | 
					a0b5ebeac6 | ||
| 
						 | 
					8ee18dd520 | ||
| 
						 | 
					50f482374d | ||
| 
						 | 
					f46e76ef50 | ||
| 
						 | 
					ff60944b28 | ||
| 
						 | 
					e725a9660b | ||
| 
						 | 
					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 | ||
| 
						 | 
					30fbcaa213 | ||
| 
						 | 
					86f941c936 | ||
| 
						 | 
					387fd00c47 | ||
| 
						 | 
					93825dddad | ||
| 
						 | 
					a8aa764d3c | ||
| 
						 | 
					e7716b7a19 | ||
| 
						 | 
					a4e3150f00 | ||
| 
						 | 
					edec614efd | ||
| 
						 | 
					00b9c1be7d | ||
| 
						 | 
					051bb5c457 | ||
| 
						 | 
					2457c19df1 | ||
| 
						 | 
					5fa5eb71a4 | ||
| 
						 | 
					931a031916 | ||
| 
						 | 
					3f39976da3 | ||
| 
						 | 
					be21fe59aa | ||
| 
						 | 
					216ad9ef58 | ||
| 
						 | 
					ef3565aed2 | ||
| 
						 | 
					bc50157010 | ||
| 
						 | 
					01fc051e8a | ||
| 
						 | 
					ae43f344af | ||
| 
						 | 
					91180d45f9 | ||
| 
						 | 
					0902c559fb | ||
| 
						 | 
					58b6a165a5 | ||
| 
						 | 
					d9f40bbe55 | ||
| 
						 | 
					ec7c9ee8b8 | ||
| 
						 | 
					f82bb9cb9c | ||
| 
						 | 
					641c55342b | ||
| 
						 | 
					5a8922aed5 | ||
| 
						 | 
					e390f5d684 | ||
| 
						 | 
					078a97791d | ||
| 
						 | 
					f2c1812560 | ||
| 
						 | 
					4d6b383680 | ||
| 
						 | 
					4cfa4ae820 | ||
| 
						 | 
					489885cf84 | ||
| 
						 | 
					850be8f18d | ||
| 
						 | 
					a30af36c77 | ||
| 
						 | 
					5075521e75 | ||
| 
						 | 
					a22d40dde2 | ||
| 
						 | 
					ee3a47a994 | ||
| 
						 | 
					ee121033dc | ||
| 
						 | 
					f727266ae8 | ||
| 
						 | 
					4090b56b4d | ||
| 
						 | 
					8bb0c8522a | ||
| 
						 | 
					c6700d2746 | ||
| 
						 | 
					1b06804491 | ||
| 
						 | 
					33ad6eca7a | ||
| 
						 | 
					dc90f64d56 | ||
| 
						 | 
					6c43032121 | ||
| 
						 | 
					dd10343e75 | ||
| 
						 | 
					37ead9be0b | ||
| 
						 | 
					1751034669 | ||
| 
						 | 
					ad55502092 | ||
| 
						 | 
					d4575825f1 | ||
| 
						 | 
					31edde3edc | ||
| 
						 | 
					d04b1b4656 | ||
| 
						 | 
					1247092776 | ||
| 
						 | 
					7e22a1df55 | ||
| 
						 | 
					bb5810d21d | ||
| 
						 | 
					381a693c39 | ||
| 
						 | 
					86cb571e28 | ||
| 
						 | 
					319a2c5f65 | ||
| 
						 | 
					61a88c31c0 | ||
| 
						 | 
					9d0e895120 | ||
| 
						 | 
					b86ed8d18f | ||
| 
						 | 
					44ee32ed30 | ||
| 
						 | 
					5922128732 | ||
| 
						 | 
					e5886a2388 | ||
| 
						 | 
					8d1ebe0bd1 | ||
| 
						 | 
					1fb724449d | ||
| 
						 | 
					cb37947a71 | ||
| 
						 | 
					721a5e83f9 | ||
| 
						 | 
					6df617a59d | ||
| 
						 | 
					8c6336b0aa | ||
| 
						 | 
					4668056fc9 | ||
| 
						 | 
					87203dc99a | ||
| 
						 | 
					de23af982a | ||
| 
						 | 
					3a5a176ea0 | ||
| 
						 | 
					4de65cbc06 | ||
| 
						 | 
					27b2b78f90 | ||
| 
						 | 
					3a160f1dc6 | ||
| 
						 | 
					7f24b1c3e9 | ||
| 
						 | 
					a5e8bcfb7b | ||
| 
						 | 
					a1d37a96df | ||
| 
						 | 
					9d5c3c1939 | ||
| 
						 | 
					815d7057be | ||
| 
						 | 
					6bff79629e | ||
| 
						 | 
					db452cdba0 | ||
| 
						 | 
					d435752b0a | ||
| 
						 | 
					c8b14ca177 | ||
| 
						 | 
					30cb9ec715 | ||
| 
						 | 
					af6dab9b00 | ||
| 
						 | 
					8ba5c63de9 | ||
| 
						 | 
					cdb42bcf0c | ||
| 
						 | 
					3a0ede0ffd | ||
| 
						 | 
					9cde81c2dd | ||
| 
						 | 
					fc56b52924 | ||
| 
						 | 
					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 | ||
| 
						 | 
					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 | ||
| 
						 | 
					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 | ||
| 
						 | 
					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 | ||
| 
						 | 
					8ad7e3ad2a | ||
| 
						 | 
					fa5846e58b | ||
| 
						 | 
					0b6956b474 | ||
| 
						 | 
					0bb6187e71 | ||
| 
						 | 
					c5a5546389 | ||
| 
						 | 
					79e4022a33 | ||
| 
						 | 
					77fe058c10 | ||
| 
						 | 
					8d9086dfa2 | ||
| 
						 | 
					0602abf5bd | ||
| 
						 | 
					caf044cb3e | ||
| 
						 | 
					80986c9ced | ||
| 
						 | 
					a08ced78c8 | ||
| 
						 | 
					ede7c28eb7 | ||
| 
						 | 
					83eb412da8 | ||
| 
						 | 
					4d1c443123 | ||
| 
						 | 
					f44e184ec6 | ||
| 
						 | 
					377dcdba44 | ||
| 
						 | 
					8242354952 | ||
| 
						 | 
					c40b9bdefb | ||
| 
						 | 
					6895cca89d | ||
| 
						 | 
					c9d3957986 | ||
| 
						 | 
					f82ab534c6 | ||
| 
						 | 
					05e962ddf8 | ||
| 
						 | 
					f6e8c19ed1 | ||
| 
						 | 
					cf89b40584 | ||
| 
						 | 
					d680c13060 | ||
| 
						 | 
					c076599c18 | ||
| 
						 | 
					a510e9e4fc | ||
| 
						 | 
					4d8148fa98 | ||
| 
						 | 
					1a9e663b20 | ||
| 
						 | 
					aed29ce5ea | ||
| 
						 | 
					0dd675509c | ||
| 
						 | 
					9ad82c123a | ||
| 
						 | 
					144aa3c56e | ||
| 
						 | 
					eeff6bb6b3 | ||
| 
						 | 
					202892dfd6 | ||
| 
						 | 
					d90e74c50c | ||
| 
						 | 
					2990244980 | ||
| 
						 | 
					0c6fa13fee | ||
| 
						 | 
					68f0bcfbc3 | ||
| 
						 | 
					662ede2370 | ||
| 
						 | 
					d0edf6e593 | ||
| 
						 | 
					c93f908f7f | ||
| 
						 | 
					16d2a7caef | ||
| 
						 | 
					c798868d96 | ||
| 
						 | 
					057a04398d | ||
| 
						 | 
					b7b5cd6132 | ||
| 
						 | 
					71583fb0d7 | ||
| 
						 | 
					7f3ba9428f | ||
| 
						 | 
					058f86e9e0 | ||
| 
						 | 
					3c02e24bb3 | ||
| 
						 | 
					4509102cb9 | ||
| 
						 | 
					1be02dd842 | ||
| 
						 | 
					87c99c59bd | ||
| 
						 | 
					3d7c4a5a6d | ||
| 
						 | 
					732d1bf43a | ||
| 
						 | 
					11171f3c74 | ||
| 
						 | 
					88fd7424f6 | ||
| 
						 | 
					ba9f80c5d5 | ||
| 
						 | 
					30a452ab32 | ||
| 
						 | 
					e59659dc41 | ||
| 
						 | 
					9c90f27dac | ||
| 
						 | 
					ec4e600da6 | ||
| 
						 | 
					253e893c2b | ||
| 
						 | 
					4097dce455 | ||
| 
						 | 
					0ad2c4f85b | ||
| 
						 | 
					0e6c20da46 | ||
| 
						 | 
					f6b659cba4 | ||
| 
						 | 
					c9b552534e | ||
| 
						 | 
					f0ad5fc2ab | ||
| 
						 | 
					6bd27f8644 | ||
| 
						 | 
					dfe399e7d9 | ||
| 
						 | 
					7068c8b1a6 | ||
| 
						 | 
					5f444c8fcd | ||
| 
						 | 
					82384690e2 | ||
| 
						 | 
					e6fa67fa93 | ||
| 
						 | 
					62afa8bd58 | ||
| 
						 | 
					9ea72d3705 | ||
| 
						 | 
					a907751350 | ||
| 
						 | 
					2689b8f326 | ||
| 
						 | 
					560dfd2a02 | ||
| 
						 | 
					bd69ac5c93 | ||
| 
						 | 
					14f3d7c5cc | ||
| 
						 | 
					33ed371ec9 | ||
| 
						 | 
					510dc1ecd0 | ||
| 
						 | 
					3b07c32fe7 | ||
| 
						 | 
					563c05e2dc | ||
| 
						 | 
					9cc513a000 | ||
| 
						 | 
					cac32e5acd | ||
| 
						 | 
					643ecd2ed6 | ||
| 
						 | 
					0e9edc98d4 | ||
| 
						 | 
					27bd937cc0 | ||
| 
						 | 
					f56c451143 | ||
| 
						 | 
					05a1f76093 | ||
| 
						 | 
					4ed9388e5d | ||
| 
						 | 
					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 | ||
| 
						 | 
					df29cc8f77 | ||
| 
						 | 
					ec7164133d | ||
| 
						 | 
					8826087a97 | ||
| 
						 | 
					8aa09a245c | ||
| 
						 | 
					ba8ad07490 | ||
| 
						 | 
					17582ccf21 | ||
| 
						 | 
					a5fd84de41 | ||
| 
						 | 
					31be2daa06 | ||
| 
						 | 
					dc199cfaa2 | ||
| 
						 | 
					de868e0b94 | ||
| 
						 | 
					b81ef84227 | ||
| 
						 | 
					15994b034a | ||
| 
						 | 
					922fa76e26 | ||
| 
						 | 
					19aa370573 | ||
| 
						 | 
					d020e701bb | ||
| 
						 | 
					91203a9482 | ||
| 
						 | 
					364ff369d1 | ||
| 
						 | 
					134fea9d0f | ||
| 
						 | 
					8a09b3866a | ||
| 
						 | 
					137445140b | ||
| 
						 | 
					6a8afe2201 | ||
| 
						 | 
					a153c46d7f | ||
| 
						 | 
					1e3a9b650f | ||
| 
						 | 
					8faad520ae | ||
| 
						 | 
					229dc0ee31 | ||
| 
						 | 
					fcc764639d | ||
| 
						 | 
					8f89ae928b | ||
| 
						 | 
					821385ad00 | ||
| 
						 | 
					782ded56e5 | ||
| 
						 | 
					25ff76d565 | ||
| 
						 | 
					8e458d52b5 | ||
| 
						 | 
					1f475c1f6f | ||
| 
						 | 
					bc9867e672 | ||
| 
						 | 
					9801fb61d0 | ||
| 
						 | 
					20199ca809 | ||
| 
						 | 
					711f1a3c26 | ||
| 
						 | 
					412fd4708d | ||
| 
						 | 
					a1d85309ee | ||
| 
						 | 
					273c624442 | ||
| 
						 | 
					450cee5c3a | ||
| 
						 | 
					a2dbcf3644 | ||
| 
						 | 
					4663355496 | ||
| 
						 | 
					8b591c2f8e | ||
| 
						 | 
					9dc610495c | ||
| 
						 | 
					8f4a23e3b7 | ||
| 
						 | 
					055076cd4f | ||
| 
						 | 
					c83d8e2ba6 | ||
| 
						 | 
					527497a722 | ||
| 
						 | 
					32d21c1ef6 | ||
| 
						 | 
					6afc70be84 | ||
| 
						 | 
					f503c2c9e6 | ||
| 
						 | 
					629b58b7fb | ||
| 
						 | 
					7656893d51 | ||
| 
						 | 
					7fa2a81d34 | ||
| 
						 | 
					ff38d68237 | ||
| 
						 | 
					7f66ab4783 | ||
| 
						 | 
					95189389b0 | ||
| 
						 | 
					aff3e60754 | ||
| 
						 | 
					8196d87371 | ||
| 
						 | 
					b4b82ab465 | ||
| 
						 | 
					61b1ad197a | ||
| 
						 | 
					89618e7a0d | ||
| 
						 | 
					293bb4b1b8 | ||
| 
						 | 
					b87e2576b5 | ||
| 
						 | 
					29ca164513 | ||
| 
						 | 
					97d58eadbf | ||
| 
						 | 
					0bf23d9b20 | ||
| 
						 | 
					813f256783 | ||
| 
						 | 
					8cdeec9f54 | ||
| 
						 | 
					bfa96bc20e | ||
| 
						 | 
					082cd4e564 | ||
| 
						 | 
					6f17f16fd5 | ||
| 
						 | 
					2115a89212 | ||
| 
						 | 
					84034f7aec | ||
| 
						 | 
					acce40c585 | ||
| 
						 | 
					af3ec1e24e | ||
| 
						 | 
					6dc78bf7e8 | ||
| 
						 | 
					f275683ae8 | ||
| 
						 | 
					ce4f169ff9 | ||
| 
						 | 
					c566205319 | ||
| 
						 | 
					da91e37d37 | ||
| 
						 | 
					2758c44398 | ||
| 
						 | 
					eaf6c61c9f | ||
| 
						 | 
					4e056a2894 | ||
| 
						 | 
					4c53d11d7f | ||
| 
						 | 
					f60b017da8 | ||
| 
						 | 
					1d647444e3 | ||
| 
						 | 
					08634f1156 | ||
| 
						 | 
					c1eeb6078f | ||
| 
						 | 
					a50d6a801f | ||
| 
						 | 
					953db08416 | ||
| 
						 | 
					0439a5a8a7 | ||
| 
						 | 
					0a5942093e | ||
| 
						 | 
					d78254aa28 | ||
| 
						 | 
					af67804bef | ||
| 
						 | 
					8ffe66b4ce | ||
| 
						 | 
					d62ec8362a | ||
| 
						 | 
					35a6db8640 | ||
| 
						 | 
					56dc24d483 | ||
| 
						 | 
					84d828ab70 | ||
| 
						 | 
					259b33d5a3 | ||
| 
						 | 
					cfae3d94e9 | ||
| 
						 | 
					6393c09cda | ||
| 
						 | 
					9421f1ab9c | ||
| 
						 | 
					b9c23cca01 | ||
| 
						 | 
					5bf0d0ea1e | ||
| 
						 | 
					c863201780 | ||
| 
						 | 
					cb21d001c9 | ||
| 
						 | 
					769f74b818 | ||
| 
						 | 
					c7faede37b | ||
| 
						 | 
					64051a3a71 | ||
| 
						 | 
					d4e573f305 | ||
| 
						 | 
					8260eded07 | ||
| 
						 | 
					e20afbb340 | ||
| 
						 | 
					2b2ab52354 | ||
| 
						 | 
					402b4a784d | ||
| 
						 | 
					651e7ddf7e | ||
| 
						 | 
					40bace2da6 | ||
| 
						 | 
					8d6e60486f | ||
| 
						 | 
					1f30946481 | ||
| 
						 | 
					e89c82f549 | ||
| 
						 | 
					b1697f189b | ||
| 
						 | 
					812d100d06 | ||
| 
						 | 
					17a202add7 | ||
| 
						 | 
					b759742352 | ||
| 
						 | 
					3bd16a8902 | ||
| 
						 | 
					555d75252a | ||
| 
						 | 
					eaad02a747 | ||
| 
						 | 
					475e4d23bd | ||
| 
						 | 
					bf4ae6dcfa | ||
| 
						 | 
					97101fafd5 | ||
| 
						 | 
					17d4f07658 | ||
| 
						 | 
					403f1bdc70 | ||
| 
						 | 
					5ec797f263 | ||
| 
						 | 
					d574d83993 | ||
| 
						 | 
					83411793b6 | ||
| 
						 | 
					5b1aea7afe | ||
| 
						 | 
					65caee44ff | ||
| 
						 | 
					327e113775 | ||
| 
						 | 
					58f3009aba | ||
| 
						 | 
					738554331b | ||
| 
						 | 
					b193f29a9b | ||
| 
						 | 
					3f083ef0eb | ||
| 
						 | 
					17ed6c06a7 | ||
| 
						 | 
					c112323dd5 | ||
| 
						 | 
					0709385d3c | ||
| 
						 | 
					7ab58bf012 | ||
| 
						 | 
					54a656ef08 | ||
| 
						 | 
					8f797f14b8 | ||
| 
						 | 
					cd10ba9c39 | ||
| 
						 | 
					c0d64de660 | ||
| 
						 | 
					96a3369c4a | ||
| 
						 | 
					c1ce8cf3b8 | ||
| 
						 | 
					e8ad570e3f | ||
| 
						 | 
					ad1ddf413c | ||
| 
						 | 
					2d780dfd81 | ||
| 
						 | 
					b6fee5c2fb | ||
| 
						 | 
					e2c2152be9 | ||
| 
						 | 
					10fa047622 | ||
| 
						 | 
					919b2a9673 | ||
| 
						 | 
					024a20905d | ||
| 
						 | 
					04f0a6ba39 | ||
| 
						 | 
					eb43641dd3 | ||
| 
						 | 
					69ba8a00ad | ||
| 
						 | 
					f6a0c4f853 | ||
| 
						 | 
					040ade9bee | ||
| 
						 | 
					d479dc1d02 | ||
| 
						 | 
					7fb8d254fe | ||
| 
						 | 
					c99935e32c | ||
| 
						 | 
					2232e262bf | ||
| 
						 | 
					137e7e3aa1 | ||
| 
						 | 
					ba36b61d3d | ||
| 
						 | 
					ccb13ded84 | ||
| 
						 | 
					46ce790727 | ||
| 
						 | 
					9ea1b87862 | ||
| 
						 | 
					9831d941ca | ||
| 
						 | 
					707ceb29e0 | ||
| 
						 | 
					688cf84d1f | ||
| 
						 | 
					3d470fc7b7 | ||
| 
						 | 
					69ce48c307 | ||
| 
						 | 
					edb7b28a00 | ||
| 
						 | 
					06b7c8d5ba | ||
| 
						 | 
					c4efde7403 | ||
| 
						 | 
					a1edc87664 | ||
| 
						 | 
					6722b62b36 | ||
| 
						 | 
					7d80b27949 | ||
| 
						 | 
					9cbc3356e7 | ||
| 
						 | 
					d742bd882e | ||
| 
						 | 
					97a06ad9ef | ||
| 
						 | 
					756b9a0046 | ||
| 
						 | 
					9161c2ff51 | ||
| 
						 | 
					96c930dd2f | ||
| 
						 | 
					21f8cf65e6 | ||
| 
						 | 
					8bcc049399 | ||
| 
						 | 
					95900b8592 | ||
| 
						 | 
					c81a15099a | ||
| 
						 | 
					20a50cb517 | ||
| 
						 | 
					a8c125550c | ||
| 
						 | 
					3782350c14 | ||
| 
						 | 
					a71a482250 | ||
| 
						 | 
					d6257073aa | ||
| 
						 | 
					8b6ee018c2 | ||
| 
						 | 
					ddff68bee7 | ||
| 
						 | 
					ddab3c9327 | ||
| 
						 | 
					491659c436 | ||
| 
						 | 
					6a9a7ff259 | ||
| 
						 | 
					8d6fc30bc7 | ||
| 
						 | 
					56824b9658 | ||
| 
						 | 
					f7cd5462c9 | ||
| 
						 | 
					892e9625d3 | ||
| 
						 | 
					e2916b2540 | ||
| 
						 | 
					d268511c84 | ||
| 
						 | 
					1810d2088e | ||
| 
						 | 
					d618f703ec | ||
| 
						 | 
					190467767e | ||
| 
						 | 
					896e4fef30 | ||
| 
						 | 
					8d699c8c93 | ||
| 
						 | 
					38c7271a39 | ||
| 
						 | 
					e2a93e38d6 | ||
| 
						 | 
					5e3247d8bc | ||
| 
						 | 
					41c2fb962c | ||
| 
						 | 
					b53e44e572 | ||
| 
						 | 
					e5f4d8279d | ||
| 
						 | 
					455bacd4d3 | ||
| 
						 | 
					86e8b56ac4 | ||
| 
						 | 
					e85cbdad7a | ||
| 
						 | 
					bff1567623 | ||
| 
						 | 
					db199abd9e | ||
| 
						 | 
					b6d0defb98 | ||
| 
						 | 
					c752563e43 | ||
| 
						 | 
					ad22b914d6 | ||
| 
						 | 
					f216fae545 | ||
| 
						 | 
					242823c9bc | ||
| 
						 | 
					0eae6cd5f2 | ||
| 
						 | 
					40efa67248 | ||
| 
						 | 
					0bf707e346 | ||
| 
						 | 
					769fedc3ad | ||
| 
						 | 
					9c3db400dc | ||
| 
						 | 
					96a2c35d91 | ||
| 
						 | 
					d9ec9d990f | ||
| 
						 | 
					f9fde13590 | ||
| 
						 | 
					74174b9d05 | ||
| 
						 | 
					b5148cf1f7 | ||
| 
						 | 
					90a617e050 | ||
| 
						 | 
					259cdf2af9 | ||
| 
						 | 
					6c950e0dc9 | ||
| 
						 | 
					62dd6f161a | ||
| 
						 | 
					6aba658cd8 | ||
| 
						 | 
					89eda1fc01 | ||
| 
						 | 
					accb0c6edb | ||
| 
						 | 
					bbec79a0c1 | ||
| 
						 | 
					e0db2eed8d | ||
| 
						 | 
					6f7ba4be1f | ||
| 
						 | 
					2ccb522c5b | ||
| 
						 | 
					00a357ab20 | ||
| 
						 | 
					8ee4845b65 | ||
| 
						 | 
					19b8d06a79 | ||
| 
						 | 
					5c6bf03117 | ||
| 
						 | 
					f72ed6153b | ||
| 
						 | 
					0bf76767b0 | ||
| 
						 | 
					d652a0957f | ||
| 
						 | 
					fbcd27907b | ||
| 
						 | 
					a551bea52e | ||
| 
						 | 
					6cb686208e | ||
| 
						 | 
					732c9fe179 | ||
| 
						 | 
					bd1fb77245 | ||
| 
						 | 
					d610d27f30 | ||
| 
						 | 
					4f99ab58f7 | ||
| 
						 | 
					339abc9bd9 | ||
| 
						 | 
					4407fbc2d4 | ||
| 
						 | 
					96b35c9e26 | ||
| 
						 | 
					27f08d6d48 | ||
| 
						 | 
					907a8f1e6e | ||
| 
						 | 
					e1c191fe44 | ||
| 
						 | 
					a9e0953900 | ||
| 
						 | 
					9597027693 | ||
| 
						 | 
					5aa3429c5d | ||
| 
						 | 
					ffd418f217 | ||
| 
						 | 
					78f41a4e89 | ||
| 
						 | 
					76dcae8020 | ||
| 
						 | 
					0711be1696 | ||
| 
						 | 
					190ef122b2 | ||
| 
						 | 
					7521ab3d0b | ||
| 
						 | 
					0587ec2645 | ||
| 
						 | 
					b76d66fbf6 | ||
| 
						 | 
					06f851f721 | ||
| 
						 | 
					f6661d391c | ||
| 
						 | 
					284b216b3a | ||
| 
						 | 
					dc74e7d5d7 | ||
| 
						 | 
					3d76ceddff | ||
| 
						 | 
					05dbe6ee1f | ||
| 
						 | 
					871d0f5126 | ||
| 
						 | 
					5be1264b7e | ||
| 
						 | 
					b963f807be | ||
| 
						 | 
					314c667050 | ||
| 
						 | 
					005bbb52ff | ||
| 
						 | 
					28c8a911bd | ||
| 
						 | 
					a690102da2 | ||
| 
						 | 
					437d1ed49f | ||
| 
						 | 
					12fd8be2c4 | ||
| 
						 | 
					8258f7b361 | ||
| 
						 | 
					e15ea3d9e1 | ||
| 
						 | 
					09db11783d | ||
| 
						 | 
					677532629d | ||
| 
						 | 
					f6733ae577 | ||
| 
						 | 
					57d8ff79b2 | ||
| 
						 | 
					2d2ca3aab1 | ||
| 
						 | 
					cfc7620572 | ||
| 
						 | 
					4b14ed760d | ||
| 
						 | 
					79a6260a11 | ||
| 
						 | 
					a0bf8f2008 | ||
| 
						 | 
					408bf2f0c4 | ||
| 
						 | 
					874fee478c | ||
| 
						 | 
					90d9a69bb1 | ||
| 
						 | 
					9a01bc0732 | ||
| 
						 | 
					4006c56036 | ||
| 
						 | 
					dbcc560717 | ||
| 
						 | 
					1729588435 | ||
| 
						 | 
					6f7c2cb31e | ||
| 
						 | 
					a4629f4136 | ||
| 
						 | 
					449d39f41c | ||
| 
						 | 
					56b5f687e4 | ||
| 
						 | 
					caa4f47f61 | ||
| 
						 | 
					36757b4438 | ||
| 
						 | 
					75871dda4b | ||
| 
						 | 
					506fec1a95 | ||
| 
						 | 
					aae329c447 | ||
| 
						 | 
					02acf1409e | ||
| 
						 | 
					6ac3309c74 | ||
| 
						 | 
					1b15cfa11d | ||
| 
						 | 
					76dfca879f | ||
| 
						 | 
					7cdc7bacea | ||
| 
						 | 
					fbd78b5c08 | ||
| 
						 | 
					fbcd0da597 | ||
| 
						 | 
					665dc3924d | ||
| 
						 | 
					4bdacff25b | ||
| 
						 | 
					ecd45314b8 | ||
| 
						 | 
					3e06fb754e | ||
| 
						 | 
					84236041c1 | ||
| 
						 | 
					b2e20a31ea | ||
| 
						 | 
					38e19a4220 | ||
| 
						 | 
					f28164fefd | ||
| 
						 | 
					8d44d96ec3 | ||
| 
						 | 
					2eaabb718b | ||
| 
						 | 
					5572f482e7 | ||
| 
						 | 
					707e098687 | ||
| 
						 | 
					729f0a277e | ||
| 
						 | 
					88de74ad83 | ||
| 
						 | 
					c55d759168 | ||
| 
						 | 
					97b8718f15 | ||
| 
						 | 
					b7910992d8 | ||
| 
						 | 
					cf3b8b52f1 | ||
| 
						 | 
					388a6f937f | ||
| 
						 | 
					42b06fbaca | ||
| 
						 | 
					a61050ad96 | ||
| 
						 | 
					2245cd87d4 | ||
| 
						 | 
					c199837c54 | ||
| 
						 | 
					83699c4784 | ||
| 
						 | 
					30afcc072a | ||
| 
						 | 
					baaeac3036 | ||
| 
						 | 
					832f9304fd | ||
| 
						 | 
					fa4bde98d2 | ||
| 
						 | 
					d19370b617 | ||
| 
						 | 
					ca80756c70 | ||
| 
						 | 
					8376acbf7f | ||
| 
						 | 
					ef0baf60aa | ||
| 
						 | 
					12a2ff9625 | ||
| 
						 | 
					7ba3a4c3d2 | ||
| 
						 | 
					29e48c18b7 | ||
| 
						 | 
					292a217b51 | ||
| 
						 | 
					982dfb7d10 | ||
| 
						 | 
					104117c5e7 | ||
| 
						 | 
					7ab3c662e3 | ||
| 
						 | 
					8c4b69d3ab | ||
| 
						 | 
					4fd5e85a18 | ||
| 
						 | 
					0e2cc42cfb | ||
| 
						 | 
					e9a9211e75 | ||
| 
						 | 
					1e5c205ccb | ||
| 
						 | 
					4c82171a8e | ||
| 
						 | 
					88c80b3e75 | ||
| 
						 | 
					d438845ac8 | ||
| 
						 | 
					b1d495b2c4 | ||
| 
						 | 
					27bad5ad3d | ||
| 
						 | 
					6b7a46b721 | ||
| 
						 | 
					6a89a25c27 | ||
| 
						 | 
					001ab3abad | ||
| 
						 | 
					ff90d659e6 | ||
| 
						 | 
					ec8ad2bb96 | ||
| 
						 | 
					8f841c70c4 | ||
| 
						 | 
					5fbb02fcb1 | ||
| 
						 | 
					4e1b50e219 | ||
| 
						 | 
					052c0f276e | ||
| 
						 | 
					d7b2342a6a | ||
| 
						 | 
					7e9db7cefc | ||
| 
						 | 
					d30e4c5b0b | ||
| 
						 | 
					9de6bb8abc | ||
| 
						 | 
					72e04bd13f | ||
| 
						 | 
					4ec0448122 | ||
| 
						 | 
					842d8e209b | ||
| 
						 | 
					292fcd5c7b | ||
| 
						 | 
					74e3931f84 | ||
| 
						 | 
					12dadc555f | ||
| 
						 | 
					1e7e392419 | ||
| 
						 | 
					b75b2225e5 | ||
| 
						 | 
					12f27bd414 | ||
| 
						 | 
					e11b82c337 | ||
| 
						 | 
					69deec58fb | ||
| 
						 | 
					1e976bdc46 | ||
| 
						 | 
					9946fceb9d | ||
| 
						 | 
					6fed88113b | ||
| 
						 | 
					04ad43af9e | ||
| 
						 | 
					97ebe047d0 | ||
| 
						 | 
					fc6a6a1030 | ||
| 
						 | 
					3d840c827f | ||
| 
						 | 
					a2a1a04e53 | ||
| 
						 | 
					f86abc2e80 | ||
| 
						 | 
					227aec9a0f | ||
| 
						 | 
					7104c376ae | ||
| 
						 | 
					b0165ce439 | ||
| 
						 | 
					0638ced5cc | ||
| 
						 | 
					3c8756f024 | ||
| 
						 | 
					e984b2af64 | ||
| 
						 | 
					70e96dcf59 | ||
| 
						 | 
					2c696b2ddc | ||
| 
						 | 
					1801bc0658 | ||
| 
						 | 
					ebbad107bf | ||
| 
						 | 
					9a48b07ee4 | ||
| 
						 | 
					230fd6b7b6 | ||
| 
						 | 
					20b33a015f | ||
| 
						 | 
					293d5082c7 | ||
| 
						 | 
					fc0ab2eac2 | ||
| 
						 | 
					64cb996206 | ||
| 
						 | 
					929f116733 | ||
| 
						 | 
					ba5ba5490d | ||
| 
						 | 
					413f2b2247 | ||
| 
						 | 
					b8565a9af9 | ||
| 
						 | 
					fbf4c7b4f1 | ||
| 
						 | 
					99542d8763 | ||
| 
						 | 
					94960c8421 | ||
| 
						 | 
					b3c1d18d03 | ||
| 
						 | 
					6859cf7459 | ||
| 
						 | 
					6c8aec60ca | ||
| 
						 | 
					2018681b33 | ||
| 
						 | 
					c0ca52952e | ||
| 
						 | 
					e204516178 | ||
| 
						 | 
					39d727d0c3 | ||
| 
						 | 
					153aecf91a | ||
| 
						 | 
					6319853811 | ||
| 
						 | 
					cd98ab6491 | ||
| 
						 | 
					6b3a385f85 | ||
| 
						 | 
					b3823ac64b | ||
| 
						 | 
					27a80b7906 | ||
| 
						 | 
					5d9470ff8e | ||
| 
						 | 
					4e33db9a3f | ||
| 
						 | 
					e78f137899 | ||
| 
						 | 
					ca9a114f7a | ||
| 
						 | 
					40e66398db | ||
| 
						 | 
					ce1dc2e9b2 | ||
| 
						 | 
					b4b62004a6 | ||
| 
						 | 
					6e32d0a74b | ||
| 
						 | 
					f7eb95852c | ||
| 
						 | 
					a4f53a1c73 | ||
| 
						 | 
					a90ae02454 | ||
| 
						 | 
					4c8f79a33e | ||
| 
						 | 
					7cc6ec7af7 | ||
| 
						 | 
					c2bbf275b2 | ||
| 
						 | 
					9226e2187c | ||
| 
						 | 
					12a296edfc | ||
| 
						 | 
					48921e00fc | ||
| 
						 | 
					e696a05791 | ||
| 
						 | 
					f804930150 | ||
| 
						 | 
					3403caf3da | ||
| 
						 | 
					4a13e4b36c | ||
| 
						 | 
					b7fb041f31 | ||
| 
						 | 
					ba11121731 | ||
| 
						 | 
					ed5e37c309 | ||
| 
						 | 
					65b1d31df5 | ||
| 
						 | 
					a98beb3a2d | ||
| 
						 | 
					b499ed06d2 | ||
| 
						 | 
					f627c159b1 | ||
| 
						 | 
					6ff7c95843 | ||
| 
						 | 
					535cedf136 | ||
| 
						 | 
					3a00964dd3 | ||
| 
						 | 
					41cc7096b8 | ||
| 
						 | 
					c237de058f | ||
| 
						 | 
					e2aeb8174b | ||
| 
						 | 
					34f1f2a81c | ||
| 
						 | 
					c96f0fd2d1 | ||
| 
						 | 
					8aefe253a7 | ||
| 
						 | 
					7e31164ae0 | ||
| 
						 | 
					ad55f581f9 | ||
| 
						 | 
					d4a8f90cab | ||
| 
						 | 
					41ab00bedf | ||
| 
						 | 
					a69d50b02d | ||
| 
						 | 
					fc85ac20c7 | ||
| 
						 | 
					e88479243c | ||
| 
						 | 
					c787525ac8 | ||
| 
						 | 
					ed7443661c | ||
| 
						 | 
					9a2601033d | ||
| 
						 | 
					3d2aa62cb6 | ||
| 
						 | 
					9925249ba5 | ||
| 
						 | 
					fbb311a7d2 | ||
| 
						 | 
					d7041ea5de | ||
| 
						 | 
					f309c1ae50 | ||
| 
						 | 
					82a20fb0f0 | ||
| 
						 | 
					68a9ee13e8 | ||
| 
						 | 
					a64f08f3dd | ||
| 
						 | 
					428112ef10 | ||
| 
						 | 
					64376cd8ff | ||
| 
						 | 
					384897f46b | ||
| 
						 | 
					cc8aa08b02 | ||
| 
						 | 
					08e60fc0ff | ||
| 
						 | 
					1c4e4e4f56 | ||
| 
						 | 
					3f6db7f518 | ||
| 
						 | 
					ea050a6eb3 | ||
| 
						 | 
					bde63f803a | ||
| 
						 | 
					8435a755fd | ||
| 
						 | 
					52c29b7b99 | ||
| 
						 | 
					e73308638a | ||
| 
						 | 
					1ac3419ef6 | ||
| 
						 | 
					c6bf63da7c | ||
| 
						 | 
					0fd05a2f0f | ||
| 
						 | 
					1e9858a28b | ||
| 
						 | 
					1fd0338b49 | ||
| 
						 | 
					8f4a09e531 | ||
| 
						 | 
					b2be73e4e8 | ||
| 
						 | 
					3b2f77d88e | ||
| 
						 | 
					52ccf9e1c1 | ||
| 
						 | 
					37f5fcf85c | ||
| 
						 | 
					5e947727a9 | ||
| 
						 | 
					f742e497dd | ||
| 
						 | 
					d7bd58cf36 | ||
| 
						 | 
					dcc426fcfe | ||
| 
						 | 
					7eb18f1237 | ||
| 
						 | 
					b84e473d63 | ||
| 
						 | 
					265e892fed | ||
| 
						 | 
					4aecd67d04 | ||
| 
						 | 
					623e9e66c0 | ||
| 
						 | 
					74a25e9cd9 | ||
| 
						 | 
					90f5a2b6fe | ||
| 
						 | 
					bf625abe29 | ||
| 
						 | 
					d020139db7 | ||
| 
						 | 
					b44069730b | ||
| 
						 | 
					749d055eba | ||
| 
						 | 
					49a0f77867 | ||
| 
						 | 
					f84acec8ea | ||
| 
						 | 
					2af52de7b5 | ||
| 
						 | 
					d3b282e01f | ||
| 
						 | 
					85d9e2f2f0 | ||
| 
						 | 
					629d860cbc | ||
| 
						 | 
					056cc163f5 | ||
| 
						 | 
					04ed3994e2 | ||
| 
						 | 
					6100502726 | ||
| 
						 | 
					e09efcf71a | ||
| 
						 | 
					763b4dcc66 | ||
| 
						 | 
					a1f09ea8f8 | ||
| 
						 | 
					83348e0b80 | ||
| 
						 | 
					bce625987d | ||
| 
						 | 
					f13ddd5d0a | ||
| 
						 | 
					18a31aa861 | ||
| 
						 | 
					b2a4e959c9 | ||
| 
						 | 
					f17ef241d1 | ||
| 
						 | 
					aa1e56b0b9 | ||
| 
						 | 
					7ef524ea1c | ||
| 
						 | 
					0c7141a343 | ||
| 
						 | 
					5488bb6197 | ||
| 
						 | 
					8e28c67155 | ||
| 
						 | 
					3c1a6f441b | ||
| 
						 | 
					97d640e1f0 | ||
| 
						 | 
					36969082bb | ||
| 
						 | 
					ddf7602425 | ||
| 
						 | 
					4fde69b066 | ||
| 
						 | 
					fd9a4dbe94 | ||
| 
						 | 
					f0db0ed35d | ||
| 
						 | 
					6d24cbf452 | ||
| 
						 | 
					5454829ae6 | ||
| 
						 | 
					da0bca6466 | ||
| 
						 | 
					4705bd9b37 | ||
| 
						 | 
					5bd90983bc | ||
| 
						 | 
					329f981582 | ||
| 
						 | 
					cece7adcee | ||
| 
						 | 
					74cc4903ef | ||
| 
						 | 
					41fdcfa71e | ||
| 
						 | 
					60cc56b1a9 | ||
| 
						 | 
					f912e9293f | ||
| 
						 | 
					56939728b7 | ||
| 
						 | 
					ea26226046 | ||
| 
						 | 
					17f6279317 | ||
| 
						 | 
					d3c32ffbcc | ||
| 
						 | 
					e172d60ddb | ||
| 
						 | 
					1d2a3fe246 | ||
| 
						 | 
					f8fe7fa491 | ||
| 
						 | 
					00c8546d21 | ||
| 
						 | 
					fbe792f0ac | ||
| 
						 | 
					14a7cfb32a | ||
| 
						 | 
					7a8645d171 | ||
| 
						 | 
					31e441a805 | ||
| 
						 | 
					5bf738737d | ||
| 
						 | 
					c4a28caa32 | ||
| 
						 | 
					415e03aa6f | ||
| 
						 | 
					c3eb0c1e7f | ||
| 
						 | 
					ac120e20e3 | ||
| 
						 | 
					d18f681310 | ||
| 
						 | 
					ea5214328b | ||
| 
						 | 
					3f90e45079 | ||
| 
						 | 
					9dcc441a5f | ||
| 
						 | 
					0833a40d13 | ||
| 
						 | 
					ab1a01e9b2 | ||
| 
						 | 
					db4f691f9f | ||
| 
						 | 
					d28735a05b | ||
| 
						 | 
					183847747a | ||
| 
						 | 
					bac6012308 | ||
| 
						 | 
					f1e1d6d6af | ||
| 
						 | 
					aaa384ca1a | ||
| 
						 | 
					f908226898 | ||
| 
						 | 
					b012127a99 | ||
| 
						 | 
					909abce800 | ||
| 
						 | 
					33d4e690cc | ||
| 
						 | 
					848c849584 | ||
| 
						 | 
					102c8f47bf | ||
| 
						 | 
					d3bcbba45c | ||
| 
						 | 
					0903e56196 | ||
| 
						 | 
					95ecacf8a2 | ||
| 
						 | 
					be8a280e0b | ||
| 
						 | 
					6fb60a84dd | ||
| 
						 | 
					5af7d1a3b8 | ||
| 
						 | 
					35b73a1f20 | ||
| 
						 | 
					9e4f9b36fc | ||
| 
						 | 
					84d7e365a0 | ||
| 
						 | 
					64c3da230f | ||
| 
						 | 
					7793f30e09 | ||
| 
						 | 
					714df32e33 | ||
| 
						 | 
					1dc920c8de | ||
| 
						 | 
					16dc1cfb5c | ||
| 
						 | 
					819ff32dc4 | ||
| 
						 | 
					5574e0ed41 | ||
| 
						 | 
					265a9e2c5d | ||
| 
						 | 
					b0b3b11dbf | ||
| 
						 | 
					042e57d562 | ||
| 
						 | 
					c578208d63 | ||
| 
						 | 
					ba8fb52183 | ||
| 
						 | 
					038461a61b | ||
| 
						 | 
					f6f9961819 | ||
| 
						 | 
					716c94492a | ||
| 
						 | 
					e74e9c48de | ||
| 
						 | 
					a4f335ba3e | ||
| 
						 | 
					179add2b07 | ||
| 
						 | 
					456bc309d8 | ||
| 
						 | 
					90832c891e | ||
| 
						 | 
					dc2ab9f4fa | ||
| 
						 | 
					a7535a2727 | ||
| 
						 | 
					162d858a90 | ||
| 
						 | 
					44c09667ff | ||
| 
						 | 
					da9b972466 | ||
| 
						 | 
					13ac37d01a | ||
| 
						 | 
					c2decc56b0 | ||
| 
						 | 
					bd45950f4a | ||
| 
						 | 
					1649d5fee1 | ||
| 
						 | 
					f70cf11819 | ||
| 
						 | 
					f8279b8ea3 | ||
| 
						 | 
					5575f781ad | ||
| 
						 | 
					76b8f839c2 | ||
| 
						 | 
					0472883cc2 | ||
| 
						 | 
					8d37f07e09 | ||
| 
						 | 
					87e8feca95 | ||
| 
						 | 
					450c73d98b | ||
| 
						 | 
					e70a39830c | ||
| 
						 | 
					2ead4a5df6 | ||
| 
						 | 
					ba25198517 | ||
| 
						 | 
					6297bcd74c | ||
| 
						 | 
					dd7ab82e75 | ||
| 
						 | 
					addafc08a5 | ||
| 
						 | 
					c046fffa16 | ||
| 
						 | 
					3aecef7697 | ||
| 
						 | 
					b218af2b27 | ||
| 
						 | 
					e970fa0022 | ||
| 
						 | 
					458bb156bf | ||
| 
						 | 
					bca9dc2a51 | ||
| 
						 | 
					3720ea24f0 | ||
| 
						 | 
					77c46bbf29 | ||
| 
						 | 
					72a37c03be | ||
| 
						 | 
					02750ff56f | ||
| 
						 | 
					93d1969c78 | ||
| 
						 | 
					0bee0e6294 | ||
| 
						 | 
					6178bb8fe9 | ||
| 
						 | 
					12593e6f45 | ||
| 
						 | 
					819a040f44 | ||
| 
						 | 
					5b195b5a0e | ||
| 
						 | 
					546405bece | ||
| 
						 | 
					4289131ae6 | ||
| 
						 | 
					b721e1e239 | ||
| 
						 | 
					f013c7f2a6 | ||
| 
						 | 
					6cf2012a4d | ||
| 
						 | 
					e459ebaed1 | ||
| 
						 | 
					1cc67fa80c | ||
| 
						 | 
					eefa6e4e2b | ||
| 
						 | 
					6d9116f83d | ||
| 
						 | 
					e9e3ce40c5 | ||
| 
						 | 
					56d84db1d4 | ||
| 
						 | 
					8be4e173e8 | ||
| 
						 | 
					648765ba2f | ||
| 
						 | 
					16758de0a2 | ||
| 
						 | 
					c6ccf055ba | ||
| 
						 | 
					f19b6474fe | ||
| 
						 | 
					1649d85d10 | ||
| 
						 | 
					2f6f2970c4 | ||
| 
						 | 
					f227a1af7d | ||
| 
						 | 
					cd72dcd925 | ||
| 
						 | 
					7a5ed919ad | ||
| 
						 | 
					799d7a34cf | ||
| 
						 | 
					20adcfa058 | ||
| 
						 | 
					4408572079 | ||
| 
						 | 
					31b5b999c7 | ||
| 
						 | 
					f8bcfb5d5a | ||
| 
						 | 
					02b7ec88bb | ||
| 
						 | 
					0af9a89cef | ||
| 
						 | 
					44e9c2617a | ||
| 
						 | 
					b61739874e | ||
| 
						 | 
					db802c60e3 | ||
| 
						 | 
					73957bd323 | ||
| 
						 | 
					503f3b1a21 | ||
| 
						 | 
					81f1338613 | ||
| 
						 | 
					402bcde847 | ||
| 
						 | 
					90baf2a92d | ||
| 
						 | 
					ec9ea6a3c8 | ||
| 
						 | 
					7e6617611f | ||
| 
						 | 
					13793a0ddf | ||
| 
						 | 
					b334853d72 | ||
| 
						 | 
					ca6dde5d3d | ||
| 
						 | 
					4b5d50e26b | ||
| 
						 | 
					8e6cbcd7c0 | ||
| 
						 | 
					6d454e6ab2 | ||
| 
						 | 
					9335a5f7c0 | ||
| 
						 | 
					4f0e09aa67 | ||
| 
						 | 
					32bf74e30e | ||
| 
						 | 
					e921bbf9f6 | ||
| 
						 | 
					6643f275e2 | ||
| 
						 | 
					205a4a9571 | ||
| 
						 | 
					cd4c36adb8 | ||
| 
						 | 
					44279d4638 | ||
| 
						 | 
					311e209931 | ||
| 
						 | 
					9f1c3d7392 | ||
| 
						 | 
					fe5eb6707f | ||
| 
						 | 
					362be34a2f | ||
| 
						 | 
					f5db08e57a | ||
| 
						 | 
					ec7f13d375 | ||
| 
						 | 
					8cfdb960f0 | ||
| 
						 | 
					ec27c2ac97 | ||
| 
						 | 
					ebccb429de | ||
| 
						 | 
					b97c854e15 | ||
| 
						 | 
					7dbed652fc | ||
| 
						 | 
					bdbbf930aa | ||
| 
						 | 
					6789b41d86 | ||
| 
						 | 
					5254b53e97 | ||
| 
						 | 
					8adc3e5db7 | ||
| 
						 | 
					0487cb234c | ||
| 
						 | 
					80e1495b99 | ||
| 
						 | 
					041843e47e | ||
| 
						 | 
					4810644f65 | ||
| 
						 | 
					c2aa4f2081 | ||
| 
						 | 
					d24d873e17 | ||
| 
						 | 
					b23f50e67e | ||
| 
						 | 
					7fe03ed3a3 | ||
| 
						 | 
					7728770623 | ||
| 
						 | 
					9466fa6750 | ||
| 
						 | 
					279c36564f | ||
| 
						 | 
					cead7f36da | ||
| 
						 | 
					50d1c3fd85 | ||
| 
						 | 
					cbecb3ac37 | ||
| 
						 | 
					5dbd3efce7 | ||
| 
						 | 
					ed712101ea | ||
| 
						 | 
					876811e2af | ||
| 
						 | 
					015eb65963 | ||
| 
						 | 
					b57c98df7b | ||
| 
						 | 
					c4da6dd38a | ||
| 
						 | 
					afafa3e15c | ||
| 
						 | 
					2edcb4ac71 | ||
| 
						 | 
					150f2d8d24 | ||
| 
						 | 
					0c4d9b2fbc | ||
| 
						 | 
					a6545f0566 | ||
| 
						 | 
					5012158adf | ||
| 
						 | 
					5fc041cca0 | ||
| 
						 | 
					5c9396e37c | ||
| 
						 | 
					089cd046af | ||
| 
						 | 
					7b63c0fa8c | ||
| 
						 | 
					7e8852c549 | ||
| 
						 | 
					063a8905bf | ||
| 
						 | 
					4064a85205 | ||
| 
						 | 
					3a9fef60a1 | ||
| 
						 | 
					cd7562091d | ||
| 
						 | 
					d1d0be3cd2 | ||
| 
						 | 
					be9419edf4 | ||
| 
						 | 
					2c8ad4f1af | ||
| 
						 | 
					a729d47d41 | ||
| 
						 | 
					121dea3f85 | ||
| 
						 | 
					6abf827f25 | ||
| 
						 | 
					ea4f109c99 | ||
| 
						 | 
					5af9fcaf35 | ||
| 
						 | 
					7650934f21 | ||
| 
						 | 
					5736d40dad | ||
| 
						 | 
					0dfd83b9f4 | ||
| 
						 | 
					40c5cae24a | ||
| 
						 | 
					8e10dea8ec | ||
| 
						 | 
					cce9396dc9 | ||
| 
						 | 
					a69e8ea1a1 | ||
| 
						 | 
					47f3eafb8d | ||
| 
						 | 
					1f656724f6 | ||
| 
						 | 
					53fc93dda6 | ||
| 
						 | 
					ca55c617e5 | ||
| 
						 | 
					17085b022c | ||
| 
						 | 
					9063e375e8 | ||
| 
						 | 
					4367eb8706 | ||
| 
						 | 
					97c9760f61 | ||
| 
						 | 
					0a8a99785b | ||
| 
						 | 
					df60710ea8 | ||
| 
						 | 
					a9d96b98cb | ||
| 
						 | 
					5d2edd2659 | ||
| 
						 | 
					ae689b6b27 | ||
| 
						 | 
					a558ae9496 | ||
| 
						 | 
					60d160da2d | ||
| 
						 | 
					d58a949aae | ||
| 
						 | 
					05086644c4 | ||
| 
						 | 
					00e608c89d | ||
| 
						 | 
					fb96d9d90d | ||
| 
						 | 
					b4dfd76a4c | ||
| 
						 | 
					e1a32c1807 | ||
| 
						 | 
					ea9a52d124 | ||
| 
						 | 
					5585f4eca4 | ||
| 
						 | 
					75cc5e05ad | ||
| 
						 | 
					e8b4d05f61 | ||
| 
						 | 
					84ae14d754 | ||
| 
						 | 
					0df748e7e2 | ||
| 
						 | 
					1fbcfbe693 | ||
| 
						 | 
					a9e897adc3 | ||
| 
						 | 
					34ab17b669 | ||
| 
						 | 
					fc0f3ad254 | ||
| 
						 | 
					a1fbe27123 | ||
| 
						 | 
					4942ef6f0e | ||
| 
						 | 
					1c45b1fef3 | ||
| 
						 | 
					9ae08a9c04 | ||
| 
						 | 
					e003386793 | ||
| 
						 | 
					76f8a1f51d | ||
| 
						 | 
					a533b89c9f | ||
| 
						 | 
					9d358821e5 | ||
| 
						 | 
					a2ffad81c8 | ||
| 
						 | 
					a6c6874a1a | ||
| 
						 | 
					a947f2d2b6 | ||
| 
						 | 
					081cdf3f63 | ||
| 
						 | 
					94e19e7111 | ||
| 
						 | 
					dbf5b18a99 | ||
| 
						 | 
					04677ce024 | ||
| 
						 | 
					0b3f7afaed | ||
| 
						 | 
					407adb5b17 | ||
| 
						 | 
					da0616cd13 | ||
| 
						 | 
					d6e8f6ae2b | ||
| 
						 | 
					af629a19d7 | ||
| 
						 | 
					1c02ca537a | ||
| 
						 | 
					9a3eaa1117 | ||
| 
						 | 
					3f2f3d4264 | ||
| 
						 | 
					c4c2c61e8c | ||
| 
						 | 
					7a68e6aad1 | ||
| 
						 | 
					5f3d6f70f6 | ||
| 
						 | 
					f27fa54388 | ||
| 
						 | 
					ece0bdf1fd | ||
| 
						 | 
					97e4b1883e | ||
| 
						 | 
					a2b38b3022 | ||
| 
						 | 
					48acb9e08a | ||
| 
						 | 
					d51092f42b | ||
| 
						 | 
					e5706ccbde | ||
| 
						 | 
					bdb6171334 | ||
| 
						 | 
					9a82ef5255 | ||
| 
						 | 
					4a1dcb2d03 | ||
| 
						 | 
					1d4547a43d | ||
| 
						 | 
					ef92312b41 | ||
| 
						 | 
					65ee74fbc7 | ||
| 
						 | 
					4673461789 | ||
| 
						 | 
					c21506ba02 | ||
| 
						 | 
					2f8275c52d | ||
| 
						 | 
					39ebb51bba | ||
| 
						 | 
					d7227da9a8 | ||
| 
						 | 
					00f1628eac | ||
| 
						 | 
					c69d103956 | ||
| 
						 | 
					ab805194a6 | ||
| 
						 | 
					4fac53a757 | ||
| 
						 | 
					d56f92ee78 | ||
| 
						 | 
					d5492d9b47 | ||
| 
						 | 
					11198b78a2 | ||
| 
						 | 
					451dc18f10 | ||
| 
						 | 
					573a568dd0 | ||
| 
						 | 
					127dca46a0 | ||
| 
						 | 
					ff3dd00370 | ||
| 
						 | 
					e888074bb4 | ||
| 
						 | 
					2028c2800a | ||
| 
						 | 
					1ef5026ef9 | ||
| 
						 | 
					fd8766b67e | ||
| 
						 | 
					40889b9cd3 | ||
| 
						 | 
					7d210e5194 | ||
| 
						 | 
					99889b46c9 | ||
| 
						 | 
					2e674fc611 | ||
| 
						 | 
					82869b3c8d | ||
| 
						 | 
					5cfd3419c6 | ||
| 
						 | 
					e8233e699b | ||
| 
						 | 
					9efd4fb891 | ||
| 
						 | 
					b2e85f9d93 | ||
| 
						 | 
					04cc76660a | ||
| 
						 | 
					e1f7ea25d2 | ||
| 
						 | 
					f10581829d | ||
| 
						 | 
					8586df1efb | ||
| 
						 | 
					78af3b274f | ||
| 
						 | 
					b8e0e12399 | ||
| 
						 | 
					254ef80db1 | ||
| 
						 | 
					f9de8446a0 | ||
| 
						 | 
					facd9a2024 | ||
| 
						 | 
					d15711efc6 | ||
| 
						 | 
					25ace3ed25 | ||
| 
						 | 
					461f00dd53 | ||
| 
						 | 
					012c86ab74 | ||
| 
						 | 
					458c29175e | ||
| 
						 | 
					8a5dbb0a2e | ||
| 
						 | 
					22f03eaedf | ||
| 
						 | 
					532203cdb0 | ||
| 
						 | 
					d467c74954 | ||
| 
						 | 
					870d3d5595 | ||
| 
						 | 
					c6c0e4cb32 | ||
| 
						 | 
					8f6f347848 | ||
| 
						 | 
					c4c745ccb8 | ||
| 
						 | 
					0f7b63c834 | ||
| 
						 | 
					3b66e34e74 | ||
| 
						 | 
					345731731a | ||
| 
						 | 
					2250f475fc | ||
| 
						 | 
					b2c04539a1 | ||
| 
						 | 
					d13363af60 | ||
| 
						 | 
					ed703912b2 | ||
| 
						 | 
					b6fc2386f0 | ||
| 
						 | 
					2cddcd1dbb | ||
| 
						 | 
					9f353dd662 | ||
| 
						 | 
					231360a3b7 | ||
| 
						 | 
					b49053cae2 | ||
| 
						 | 
					65ac3faff6 | ||
| 
						 | 
					778252741e | ||
| 
						 | 
					c8062c3a5e | ||
| 
						 | 
					05c08fc708 | ||
| 
						 | 
					96e40d97cc | ||
| 
						 | 
					0990a0851a | ||
| 
						 | 
					4b3743c85a | ||
| 
						 | 
					bb0db9c491 | ||
| 
						 | 
					5795665a7d | ||
| 
						 | 
					88f1be140c | ||
| 
						 | 
					966a753997 | ||
| 
						 | 
					fc16b228fd | ||
| 
						 | 
					0f829bd111 | ||
| 
						 | 
					a5b2ccaaad | ||
| 
						 | 
					5dd352c916 | ||
| 
						 | 
					a5200a1b8f | ||
| 
						 | 
					3c204aaf50 | ||
| 
						 | 
					6631a7e7f1 | ||
| 
						 | 
					010da5c015 | ||
| 
						 | 
					3ae184d31f | ||
| 
						 | 
					3e975124f3 | ||
| 
						 | 
					74c467f9f2 | ||
| 
						 | 
					1b97c938e9 | ||
| 
						 | 
					fbb56e5b1d | ||
| 
						 | 
					b3e2acac4e | ||
| 
						 | 
					78055aa6a5 | ||
| 
						 | 
					403fa0dc53 | ||
| 
						 | 
					e6bd5e8a6d | ||
| 
						 | 
					f918c330a9 | ||
| 
						 | 
					94f1b50c0f | ||
| 
						 | 
					7f52f77efe | ||
| 
						 | 
					bd54d55c1d | ||
| 
						 | 
					90b480f2af | ||
| 
						 | 
					09c70c3261 | ||
| 
						 | 
					578c33c010 | ||
| 
						 | 
					1ed0c6621b | ||
| 
						 | 
					d6a821b9d7 | ||
| 
						 | 
					5f8453587e | ||
| 
						 | 
					7d8b5c530f | ||
| 
						 | 
					d6e2d12c74 | ||
| 
						 | 
					2033da0b23 | ||
| 
						 | 
					305a1afcf7 | ||
| 
						 | 
					c4ac954c59 | ||
| 
						 | 
					9cdf87f194 | ||
| 
						 | 
					2640aec227 | ||
| 
						 | 
					a81e9d3dc4 | ||
| 
						 | 
					a1037ce3bc | ||
| 
						 | 
					6b7e0a9987 | ||
| 
						 | 
					249737e53d | ||
| 
						 | 
					8b57fb1208 | ||
| 
						 | 
					2962243d19 | ||
| 
						 | 
					c70573dee1 | ||
| 
						 | 
					6c98ed520d | ||
| 
						 | 
					dbdc5d14d3 | ||
| 
						 | 
					6cbe638294 | ||
| 
						 | 
					37ceea7333 | ||
| 
						 | 
					07c08ed42c | ||
| 
						 | 
					17b226a672 | ||
| 
						 | 
					374b227226 | ||
| 
						 | 
					8c4a5016ce | ||
| 
						 | 
					f33ca23e2f | ||
| 
						 | 
					6d79659dd7 | ||
| 
						 | 
					1056275825 | ||
| 
						 | 
					9634acedaf | ||
| 
						 | 
					c56fb0f1a3 | ||
| 
						 | 
					08241a5814 | ||
| 
						 | 
					3a4b0bed49 | ||
| 
						 | 
					84f4e33ea3 | ||
| 
						 | 
					3d27b1fa85 | ||
| 
						 | 
					b093ef7445 | ||
| 
						 | 
					6298bf9073 | ||
| 
						 | 
					9a26adf598 | ||
| 
						 | 
					405ac901c9 | ||
| 
						 | 
					721ccb6cf5 | ||
| 
						 | 
					64ad04eb2d | ||
| 
						 | 
					ba05727773 | ||
| 
						 | 
					349b293353 | ||
| 
						 | 
					fd91256316 | ||
| 
						 | 
					f9332da521 | ||
| 
						 | 
					a9a025d08c | ||
| 
						 | 
					156516ce44 | ||
| 
						 | 
					157e44a799 | ||
| 
						 | 
					b605e3ada3 | ||
| 
						 | 
					02cbedc387 | ||
| 
						 | 
					e5d814d040 | ||
| 
						 | 
					b09f4fb271 | ||
| 
						 | 
					1f4eada3b4 | ||
| 
						 | 
					b935754cb0 | ||
| 
						 | 
					7d2ff3f081 | ||
| 
						 | 
					396bc53593 | ||
| 
						 | 
					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,4 +1,5 @@
 | 
			
		||||
Makefile.ssl
 | 
			
		||||
openssl.pc
 | 
			
		||||
Makefile
 | 
			
		||||
MINFO
 | 
			
		||||
makefile.one
 | 
			
		||||
tmp
 | 
			
		||||
@@ -13,3 +14,4 @@ cctest.c
 | 
			
		||||
cctest.a
 | 
			
		||||
libcrypto.so.*
 | 
			
		||||
libssl.so.*
 | 
			
		||||
libcrypto.sha1
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										725
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										725
									
								
								CHANGES
									
									
									
									
									
								
							@@ -2,58 +2,442 @@
 | 
			
		||||
 OpenSSL CHANGES
 | 
			
		||||
 _______________
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7 and 0.9.8  [xx XXX 2002]
 | 
			
		||||
 Changes between 0.9.7d and 0.9.7e  [25 Oct 2004]
 | 
			
		||||
 | 
			
		||||
  *) 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 with input by Bodo Moeller]
 | 
			
		||||
  *) Avoid a race condition when CRLs are checked in a multi threaded 
 | 
			
		||||
     environment. This would happen due to the reordering of the revoked
 | 
			
		||||
     entries during signature checking and serial number lookup. Now the
 | 
			
		||||
     encoding is cached and the serial number sort performed under a lock.
 | 
			
		||||
     Add new STACK function sk_is_sorted().
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) 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).
 | 
			
		||||
  *) Add Delta CRL to the extension code.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Various fixes to s3_pkt.c so alerts are sent properly.
 | 
			
		||||
     [David Holmes <d.holmes@f5.com>]
 | 
			
		||||
 | 
			
		||||
  *) Reduce the chances of duplicate issuer name and serial numbers (in
 | 
			
		||||
     violation of RFC3280) using the OpenSSL certificate creation utilities.
 | 
			
		||||
     This is done by creating a random 64 bit value for the initial serial
 | 
			
		||||
     number when a serial number file is created or when a self signed
 | 
			
		||||
     certificate is created using 'openssl req -x509'. The initial serial
 | 
			
		||||
     number file is created using 'openssl x509 -next_serial' in CA.pl
 | 
			
		||||
     rather than being initialized to 1.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.7c and 0.9.7d  [17 Mar 2004]
 | 
			
		||||
 | 
			
		||||
  *) Fix null-pointer assignment in do_change_cipher_spec() revealed           
 | 
			
		||||
     by using the Codenomicon TLS Test Tool (CAN-2004-0079)                    
 | 
			
		||||
     [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]
 | 
			
		||||
 | 
			
		||||
  *) When creating an OCSP nonce use an OCTET STRING inside the extnValue.
 | 
			
		||||
     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]
 | 
			
		||||
 | 
			
		||||
  *) Add a function EC_GROUP_check_discriminant() (defined via
 | 
			
		||||
     EC_METHOD) that verifies that the curve discriminant is non-zero.
 | 
			
		||||
  *) 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]
 | 
			
		||||
 | 
			
		||||
     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>]
 | 
			
		||||
  *) 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]
 | 
			
		||||
 | 
			
		||||
  *) Add ECDSA in new directory crypto/ecdsa/.
 | 
			
		||||
  *) Fixed a typo bug that would cause ENGINE_set_default() to set an
 | 
			
		||||
     ENGINE as defaults for all supported algorithms irrespective of
 | 
			
		||||
     the 'flags' parameter. 'flags' is now honoured, so applications
 | 
			
		||||
     should make sure they are passing it correctly.
 | 
			
		||||
     [Geoff Thorpe]
 | 
			
		||||
 | 
			
		||||
     Add applications 'openssl ecdsaparam' and 'openssl ecdsa'
 | 
			
		||||
     (these are variants of 'openssl dsaparam' and 'openssl dsa').
 | 
			
		||||
  *) Target "mingw" now allows native Windows code to be generated in
 | 
			
		||||
     the Cygwin environment as well as with the MinGW compiler.
 | 
			
		||||
     [Ulf Moeller] 
 | 
			
		||||
 | 
			
		||||
     ECDSA support is also included in various other files across the
 | 
			
		||||
     library.  Most notably,
 | 
			
		||||
     - 'openssl req' now has a '-newkey ecdsa:file' option;
 | 
			
		||||
     - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
 | 
			
		||||
     - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
 | 
			
		||||
       d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
 | 
			
		||||
       them suitable for ECDSA where domain parameters must be
 | 
			
		||||
       extracted before the specific public key.
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de>]
 | 
			
		||||
 Changes between 0.9.7 and 0.9.7a  [19 Feb 2003]
 | 
			
		||||
 | 
			
		||||
  *) Include some named elliptic curves, and add OIDs from X9.62,
 | 
			
		||||
     SECG, and WAP/WTLS.  The curves can be obtained from the new
 | 
			
		||||
     functions
 | 
			
		||||
          EC_GROUP_new_by_nid()
 | 
			
		||||
          EC_GROUP_new_by_name()
 | 
			
		||||
     Also add a 'nid' field to EC_GROUP objects, which can be accessed
 | 
			
		||||
     via
 | 
			
		||||
         EC_GROUP_set_nid()
 | 
			
		||||
         EC_GROUP_get_nid()
 | 
			
		||||
     [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
 | 
			
		||||
  *) 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)
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6d and 0.9.7  [XX xxx 2002]
 | 
			
		||||
     [Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
 | 
			
		||||
     Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
 | 
			
		||||
     Martin Vuagnoux (EPFL, Ilion)]
 | 
			
		||||
 | 
			
		||||
  *) 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.
 | 
			
		||||
 | 
			
		||||
     NOTE: it's still possible for any application or module to have it's
 | 
			
		||||
     own set of error texts inserted.  The routines are there, just not
 | 
			
		||||
     used by default when no-err is given.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add support for FreeBSD on IA64.
 | 
			
		||||
     [dirk.meyer@dinoex.sub.org via Richard Levitte, resolves #454]
 | 
			
		||||
 | 
			
		||||
  *) Adjust DES_cbc_cksum() so it returns the same value as the MIT
 | 
			
		||||
     Kerberos function mit_des_cbc_cksum().  Before this change,
 | 
			
		||||
     the value returned by DES_cbc_cksum() was like the one from
 | 
			
		||||
     mit_des_cbc_cksum(), except the bytes were swapped.
 | 
			
		||||
     [Kevin Greaney <Kevin.Greaney@hp.com> and Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Allow an application to disable the automatic SSL chain building.
 | 
			
		||||
     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.
 | 
			
		||||
 | 
			
		||||
     Now the chain builder is disabled if either:
 | 
			
		||||
 | 
			
		||||
     1. Extra certificates are added via SSL_CTX_add_extra_chain_cert().
 | 
			
		||||
 | 
			
		||||
     2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set.
 | 
			
		||||
 | 
			
		||||
     The reasoning behind this is that an application would not want the
 | 
			
		||||
     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]
 | 
			
		||||
 | 
			
		||||
  *) Add the possibility to build without the ENGINE framework.
 | 
			
		||||
     [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Under Win32 gmtime() can return NULL: check return value in
 | 
			
		||||
     OPENSSL_gmtime(). Add error code for case where gmtime() fails.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) DSA routines: under certain error conditions uninitialized BN objects
 | 
			
		||||
     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]
 | 
			
		||||
 | 
			
		||||
  *) Another fix for SSLv2 session ID handling: the session ID was incorrectly
 | 
			
		||||
     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]
 | 
			
		||||
 | 
			
		||||
  *) IA-32 assembler support enhancements: unified ELF targets, support
 | 
			
		||||
     for SCO/Caldera platforms, fix for Cygwin shared build.
 | 
			
		||||
     [Andy Polyakov]
 | 
			
		||||
 | 
			
		||||
  *) Add support for FreeBSD on sparc64.  As a consequence, support for
 | 
			
		||||
     FreeBSD on non-x86 processors is separate from x86 processors on
 | 
			
		||||
     the config script, much like the NetBSD support.
 | 
			
		||||
     [Richard Levitte & Kris Kennaway <kris@obsecurity.org>]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6h and 0.9.7  [31 Dec 2002]
 | 
			
		||||
 | 
			
		||||
  [NB: OpenSSL 0.9.6i and later 0.9.6 patch levels were released after
 | 
			
		||||
  OpenSSL 0.9.7.]
 | 
			
		||||
 | 
			
		||||
  *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
 | 
			
		||||
     code (06) was taken as the first octet of the session ID and the last
 | 
			
		||||
     octet was ignored consequently. As a result SSLv2 client side session
 | 
			
		||||
     caching could not have worked due to the session ID mismatch between
 | 
			
		||||
     client and server.
 | 
			
		||||
     Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
 | 
			
		||||
     PR #377.
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) 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]
 | 
			
		||||
 | 
			
		||||
  *) The hw_ncipher.c engine requires dynamic locks.  Unfortunately, it
 | 
			
		||||
     seems that in spite of existing for more than a year, many application
 | 
			
		||||
     author have done nothing to provide the necessary callbacks, which
 | 
			
		||||
     means that this particular engine will not work properly anywhere.
 | 
			
		||||
     This is a very unfortunate situation which forces us, in the name
 | 
			
		||||
     of usability, to give the hw_ncipher.c a static lock, which is part
 | 
			
		||||
     of libcrypto.
 | 
			
		||||
     NOTE: This is for the 0.9.7 series ONLY.  This hack will never
 | 
			
		||||
     appear in 0.9.8 or later.  We EXPECT application authors to have
 | 
			
		||||
     dealt properly with this when 0.9.8 is released (unless we actually
 | 
			
		||||
     make such changes in the libcrypto locking code that changes will
 | 
			
		||||
     have to be made anyway).
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content
 | 
			
		||||
     octets have been read, EOF or an error occurs. Without this change
 | 
			
		||||
     some truncated ASN1 structures will not produce an error.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Disable Heimdal support, since it hasn't been fully implemented.
 | 
			
		||||
     Still give the possibility to force the use of Heimdal, but with
 | 
			
		||||
     warnings and a request that patches get sent to openssl-dev.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add the VC-CE target, introduce the WINCE sysname, and add
 | 
			
		||||
     INSTALL.WCE and appropriate conditionals to make it build.
 | 
			
		||||
     [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and
 | 
			
		||||
     cygssl-x.y.z.dll, where x, y and z are the major, minor and
 | 
			
		||||
     edit numbers of the version.
 | 
			
		||||
     [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Introduce safe string copy and catenation functions
 | 
			
		||||
     (BUF_strlcpy() and BUF_strlcat()).
 | 
			
		||||
     [Ben Laurie (CHATS) and Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Avoid using fixed-size buffers for one-line DNs.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add BUF_MEM_grow_clean() to avoid information leakage when
 | 
			
		||||
     resizing buffers containing secrets, and use where appropriate.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Avoid using fixed size buffers for configuration file location.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Avoid filename truncation for various CA files.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Use sizeof in preference to magic numbers.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Avoid filename truncation in cert requests.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add assertions to check for (supposedly impossible) buffer
 | 
			
		||||
     overflows.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Don't cache truncated DNS entries in the local cache (this could
 | 
			
		||||
     potentially lead to a spoofing attack).
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Fix various buffers to be large enough for hex/decimal
 | 
			
		||||
     representations in a platform independent manner.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add CRYPTO_realloc_clean() to avoid information leakage when
 | 
			
		||||
     resizing buffers containing secrets, and use where appropriate.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add BIO_indent() to avoid much slightly worrying code to do
 | 
			
		||||
     indents.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Convert sprintf()/BIO_puts() to BIO_printf().
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) buffer_gets() could terminate with the buffer only half
 | 
			
		||||
     full. Fixed.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Add assertions to prevent user-supplied crypto functions from
 | 
			
		||||
     overflowing internal buffers by having large block sizes, etc.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) New OPENSSL_assert() macro (similar to assert(), but enabled
 | 
			
		||||
     unconditionally).
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused copy of key in RC4.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Fix off-by-one error in EGD path.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) If RANDFILE path is too long, ignore instead of truncating.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and incorrectly sized X.509 structure
 | 
			
		||||
     CBCParameter.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and dangerous function knumber().
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Eliminate unused and dangerous structure, KSSL_ERR.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Protect against overlong session ID context length in an encoded
 | 
			
		||||
     session object. Since these are local, this does not appear to be
 | 
			
		||||
     exploitable.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Change from security patch (see 0.9.6e below) that did not affect
 | 
			
		||||
     the 0.9.6 release series:
 | 
			
		||||
 | 
			
		||||
     Remote buffer overflow in SSL3 protocol - an attacker could
 | 
			
		||||
     supply an oversized master key in Kerberos-enabled versions.
 | 
			
		||||
     (CAN-2002-0657)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Change the SSL kerb5 codes to match RFC 2712.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Make -nameopt work fully for req and add -reqopt switch.
 | 
			
		||||
     [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) The "block size" for block ciphers in CFB and OFB mode should be 1.
 | 
			
		||||
     [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>]
 | 
			
		||||
 | 
			
		||||
  *) Make sure tests can be performed even if the corresponding algorithms
 | 
			
		||||
     have been removed entirely.  This was also the last step to make
 | 
			
		||||
     OpenSSL compilable with DJGPP under all reasonable conditions.
 | 
			
		||||
     [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>]
 | 
			
		||||
 | 
			
		||||
  *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT
 | 
			
		||||
     to allow version independent disabling of normally unselected ciphers,
 | 
			
		||||
     which may be activated as a side-effect of selecting a single cipher.
 | 
			
		||||
 | 
			
		||||
     (E.g., cipher list string "RSA" enables ciphersuites that are left
 | 
			
		||||
     out of "ALL" because they do not provide symmetric encryption.
 | 
			
		||||
     "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.)
 | 
			
		||||
     [Lutz Jaenicke, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Add appropriate support for separate platform-dependent build
 | 
			
		||||
     directories.  The recommended way to make a platform-dependent
 | 
			
		||||
     build directory is the following (tested on Linux), maybe with
 | 
			
		||||
     some local tweaks:
 | 
			
		||||
 | 
			
		||||
	# Place yourself outside of the OpenSSL source tree.  In
 | 
			
		||||
	# this example, the environment variable OPENSSL_SOURCE
 | 
			
		||||
	# is assumed to contain the absolute OpenSSL source directory.
 | 
			
		||||
	mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
			
		||||
	cd objtree/"`uname -s`-`uname -r`-`uname -m`"
 | 
			
		||||
	(cd $OPENSSL_SOURCE; find . -type f) | while read F; do
 | 
			
		||||
		mkdir -p `dirname $F`
 | 
			
		||||
		ln -s $OPENSSL_SOURCE/$F $F
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
     To be absolutely sure not to disturb the source tree, a "make clean"
 | 
			
		||||
     is a good thing.  If it isn't successfull, don't worry about it,
 | 
			
		||||
     it probably means the source directory is very clean.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Make sure any ENGINE control commands make local copies of string
 | 
			
		||||
     pointers passed to them whenever necessary. Otherwise it is possible
 | 
			
		||||
     the caller may have overwritten (or deallocated) the original string
 | 
			
		||||
     data when a later ENGINE operation tries to use the stored values.
 | 
			
		||||
     [G<>tz Babin-Ebell <babinebell@trustcenter.de>]
 | 
			
		||||
 | 
			
		||||
  *) Improve diagnostics in file reading and command-line digests.
 | 
			
		||||
     [Ben Laurie aided and abetted by Solar Designer <solar@openwall.com>]
 | 
			
		||||
 | 
			
		||||
  *) Add AES modes CFB and OFB to the object database.  Correct an
 | 
			
		||||
     error in AES-CFB decryption.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Remove most calls to EVP_CIPHER_CTX_cleanup() in evp_enc.c, this 
 | 
			
		||||
     allows existing EVP_CIPHER_CTX structures to be reused after
 | 
			
		||||
@@ -76,6 +460,8 @@
 | 
			
		||||
     form for "surname", serialNumber has no short form.
 | 
			
		||||
     Use "mail" as the short name for "rfc822Mailbox" according to RFC2798;
 | 
			
		||||
     therefore remove "mail" short name for "internet 7".
 | 
			
		||||
     The OID for unique identifiers in X509 certificates is
 | 
			
		||||
     x500UniqueIdentifier, not uniqueIdentifier.
 | 
			
		||||
     Some more OID additions. (Michael Bell <michael.bell@rz.hu-berlin.de>)
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
@@ -382,6 +768,10 @@
 | 
			
		||||
     By default, clients may request session resumption even during
 | 
			
		||||
     renegotiation (if session ID contexts permit); with this option,
 | 
			
		||||
     session resumption is possible only in the first handshake.
 | 
			
		||||
 | 
			
		||||
     SSL_OP_ALL is now 0x00000FFFL instead of 0x000FFFFFL.  This makes
 | 
			
		||||
     more bits available for options that should not be part of
 | 
			
		||||
     SSL_OP_ALL (such as SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION).
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Add some demos for certificate and certificate request creation.
 | 
			
		||||
@@ -502,8 +892,8 @@
 | 
			
		||||
     [Bodo Moeller, Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Rationalise EVP so it can be extended: don't include a union of
 | 
			
		||||
     cipher/digest structures, add init/cleanup functions. This also reduces
 | 
			
		||||
     the number of header dependencies.
 | 
			
		||||
     cipher/digest structures, add init/cleanup functions for EVP_MD_CTX
 | 
			
		||||
     (similar to those existing for EVP_CIPHER_CTX).
 | 
			
		||||
     Usage example:
 | 
			
		||||
 | 
			
		||||
         EVP_MD_CTX md;
 | 
			
		||||
@@ -1087,13 +1477,14 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     handle the new API. Currently only ECB, CBC modes supported. Add new
 | 
			
		||||
     AES OIDs.
 | 
			
		||||
 | 
			
		||||
     Add TLS AES ciphersuites as described in the "AES Ciphersuites
 | 
			
		||||
     for TLS" draft-ietf-tls-ciphersuite-06.txt. As these are not yet
 | 
			
		||||
     official, they are not enabled by default and are not even part
 | 
			
		||||
     of the "ALL" ciphersuite alias; for now, they must be explicitly
 | 
			
		||||
     requested by specifying the new "AESdraft" ciphersuite alias. If
 | 
			
		||||
     you want the default ciphersuite list plus the new ciphersuites,
 | 
			
		||||
     use "DEFAULT:AESdraft:@STRENGTH".
 | 
			
		||||
     Add TLS AES ciphersuites as described in RFC3268, "Advanced
 | 
			
		||||
     Encryption Standard (AES) Ciphersuites for Transport Layer
 | 
			
		||||
     Security (TLS)".  (In beta versions of OpenSSL 0.9.7, these were
 | 
			
		||||
     not enabled by default and were not part of the "ALL" ciphersuite
 | 
			
		||||
     alias because they were not yet official; they could be
 | 
			
		||||
     explicitly requested by specifying the "AESdraft" ciphersuite
 | 
			
		||||
     group alias.  In the final release of OpenSSL 0.9.7, the group
 | 
			
		||||
     alias is called "AES" and is part of "ALL".)
 | 
			
		||||
     [Ben Laurie, Steve  Henson, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) New function OCSP_copy_nonce() to copy nonce value (if present) from
 | 
			
		||||
@@ -1525,6 +1916,11 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     be reduced modulo  m.
 | 
			
		||||
     [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
 | 
			
		||||
     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
 | 
			
		||||
@@ -1533,6 +1929,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
 | 
			
		||||
     differing sizes.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  *) In 'openssl passwd', verify passwords read from the terminal
 | 
			
		||||
     unless the '-salt' option is used (which usually means that
 | 
			
		||||
@@ -1664,11 +2061,229 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
  *) Clean old EAY MD5 hack from e_os.h.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6d and 0.9.6e  [XX xxx XXXX]
 | 
			
		||||
 Changes between 0.9.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
 | 
			
		||||
     memory from it's contents.  This is done with a counter that will
 | 
			
		||||
     place alternating values in each byte.  This can be used to solve
 | 
			
		||||
     two issues: 1) the removal of calls to memset() by highly optimizing
 | 
			
		||||
     compilers, and 2) cleansing with other values than 0, since those can
 | 
			
		||||
     be read through on certain media, for example a swap space on disk.
 | 
			
		||||
     [Geoff Thorpe]
 | 
			
		||||
 | 
			
		||||
  *) Bugfix: client side session caching did not work with external caching,
 | 
			
		||||
     because the session->cipher setting was not restored when reloading
 | 
			
		||||
     from the external cache. This problem was masked, when
 | 
			
		||||
     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set.
 | 
			
		||||
     (Found by Steve Haslam <steve@araqnid.ddts.net>.)
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Fix client_certificate (ssl/s2_clnt.c): The permissible total
 | 
			
		||||
     length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33.
 | 
			
		||||
     [Zeev Lieber <zeev-l@yahoo.com>]
 | 
			
		||||
 | 
			
		||||
  *) Undo an undocumented change introduced in 0.9.6e which caused
 | 
			
		||||
     repeated calls to OpenSSL_add_all_ciphers() and 
 | 
			
		||||
     OpenSSL_add_all_digests() to be ignored, even after calling
 | 
			
		||||
     EVP_cleanup().
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change the default configuration reader to deal with last line not
 | 
			
		||||
     being properly terminated.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Change X509_NAME_cmp() so it applies the special rules on handling
 | 
			
		||||
     DN values that are of type PrintableString, as well as RDNs of type
 | 
			
		||||
     emailAddress where the value has the type ia5String.
 | 
			
		||||
     [stefank@valicert.com via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add a SSL_SESS_CACHE_NO_INTERNAL_STORE flag to take over half
 | 
			
		||||
     the job SSL_SESS_CACHE_NO_INTERNAL_LOOKUP was inconsistently
 | 
			
		||||
     doing, define a new flag (SSL_SESS_CACHE_NO_INTERNAL) to be
 | 
			
		||||
     the bitwise-OR of the two for use by the majority of applications
 | 
			
		||||
     wanting this behaviour, and update the docs. The documented
 | 
			
		||||
     behaviour and actual behaviour were inconsistent and had been
 | 
			
		||||
     changing anyway, so this is more a bug-fix than a behavioural
 | 
			
		||||
     change.
 | 
			
		||||
     [Geoff Thorpe, diagnosed by Nadav Har'El]
 | 
			
		||||
 | 
			
		||||
  *) Don't impose a 16-byte length minimum on session IDs in ssl/s3_clnt.c
 | 
			
		||||
     (the SSL 3.0 and TLS 1.0 specifications allow any length up to 32 bytes).
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Fix initialization code race conditions in
 | 
			
		||||
        SSLv23_method(),  SSLv23_client_method(),   SSLv23_server_method(),
 | 
			
		||||
        SSLv2_method(),   SSLv2_client_method(),    SSLv2_server_method(),
 | 
			
		||||
        SSLv3_method(),   SSLv3_client_method(),    SSLv3_server_method(),
 | 
			
		||||
        TLSv1_method(),   TLSv1_client_method(),    TLSv1_server_method(),
 | 
			
		||||
        ssl2_get_cipher_by_char(),
 | 
			
		||||
        ssl3_get_cipher_by_char().
 | 
			
		||||
     [Patrick McCormick <patrick@tellme.com>, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after
 | 
			
		||||
     the cached sessions are flushed, as the remove_cb() might use ex_data
 | 
			
		||||
     contents. Bug found by Sam Varshavchik <mrsam@courier-mta.com>
 | 
			
		||||
     (see [openssl.org #212]).
 | 
			
		||||
     [Geoff Thorpe, Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Fix typo in OBJ_txt2obj which incorrectly passed the content
 | 
			
		||||
     length, instead of the encoding length to d2i_ASN1_OBJECT.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6f and 0.9.6g  [9 Aug 2002]
 | 
			
		||||
 | 
			
		||||
  *) [In 0.9.6g-engine release:]
 | 
			
		||||
     Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall').
 | 
			
		||||
     [Lynn Gazis <lgazis@rainbow.com>]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6e and 0.9.6f  [8 Aug 2002]
 | 
			
		||||
 | 
			
		||||
  *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
 | 
			
		||||
     and get fix the header length calculation.
 | 
			
		||||
     [Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>,
 | 
			
		||||
	Alon Kantor <alonk@checkpoint.com> (and others),
 | 
			
		||||
	Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Use proper error handling instead of 'assertions' in buffer
 | 
			
		||||
     overflow checks added in 0.9.6e.  This prevents DoS (the
 | 
			
		||||
     assertions could call abort()).
 | 
			
		||||
     [Arne Ansper <arne@ats.cyber.ee>, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6d and 0.9.6e  [30 Jul 2002]
 | 
			
		||||
 | 
			
		||||
  *) Add various sanity checks to asn1_get_length() to reject
 | 
			
		||||
     the ASN1 length bytes if they exceed sizeof(long), will appear
 | 
			
		||||
     negative or the content length exceeds the length of the
 | 
			
		||||
     supplied buffer.
 | 
			
		||||
     [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
 | 
			
		||||
 | 
			
		||||
  *) Fix cipher selection routines: ciphers without encryption had no flags
 | 
			
		||||
     for the cipher strength set and where therefore not handled correctly
 | 
			
		||||
     by the selection routines (PR #130).
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Fix EVP_dsa_sha macro.
 | 
			
		||||
     [Nils Larsch]
 | 
			
		||||
 | 
			
		||||
  *) New option
 | 
			
		||||
          SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
 | 
			
		||||
     for disabling the SSL 3.0/TLS 1.0 CBC vulnerability countermeasure
 | 
			
		||||
     that was added in OpenSSL 0.9.6d.
 | 
			
		||||
 | 
			
		||||
     As the countermeasure turned out to be incompatible with some
 | 
			
		||||
     broken SSL implementations, the new option is part of SSL_OP_ALL.
 | 
			
		||||
     SSL_OP_ALL is usually employed when compatibility with weird SSL
 | 
			
		||||
     implementations is desired (e.g. '-bugs' option to 's_client' and
 | 
			
		||||
     's_server'), so the new option is automatically set in many
 | 
			
		||||
     applications.
 | 
			
		||||
     [Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Changes in security patch:
 | 
			
		||||
 | 
			
		||||
     Changes marked "(CHATS)" were sponsored by the Defense Advanced
 | 
			
		||||
     Research Projects Agency (DARPA) and Air Force Research Laboratory,
 | 
			
		||||
     Air Force Materiel Command, USAF, under agreement number
 | 
			
		||||
     F30602-01-2-0537.
 | 
			
		||||
 | 
			
		||||
  *) Add various sanity checks to asn1_get_length() to reject
 | 
			
		||||
     the ASN1 length bytes if they exceed sizeof(long), will appear
 | 
			
		||||
     negative or the content length exceeds the length of the
 | 
			
		||||
     supplied buffer. (CAN-2002-0659)
 | 
			
		||||
     [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
 | 
			
		||||
 | 
			
		||||
  *) Assertions for various potential buffer overflows, not known to
 | 
			
		||||
     happen in practice.
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Various temporary buffers to hold ASCII versions of integers were
 | 
			
		||||
     too small for 64 bit platforms. (CAN-2002-0655)
 | 
			
		||||
     [Matthew Byng-Maddick <mbm@aldigital.co.uk> and Ben Laurie (CHATS)>
 | 
			
		||||
 | 
			
		||||
  *) Remote buffer overflow in SSL3 protocol - an attacker could
 | 
			
		||||
     supply an oversized session ID to a client. (CAN-2002-0656)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
  *) Remote buffer overflow in SSL2 protocol - an attacker could
 | 
			
		||||
     supply an oversized client master key. (CAN-2002-0656)
 | 
			
		||||
     [Ben Laurie (CHATS)]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6c and 0.9.6d  [9 May 2002]
 | 
			
		||||
 | 
			
		||||
  *) Fix crypto/asn1/a_sign.c so that 'parameters' is omitted (not
 | 
			
		||||
@@ -1755,13 +2370,13 @@ des-cbc           3624.96k     5258.21k     5530.91k     5624.30k     5628.26k
 | 
			
		||||
     value is 0.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add the configuration target linux-s390x.
 | 
			
		||||
     [Neale Ferguson <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) [In 0.9.6d-engine release:]
 | 
			
		||||
     Fix a crashbug and a logic bug in hwcrhk_load_pubkey().
 | 
			
		||||
     [Toomas Kiisk <vix@cyber.ee> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add the configuration target linux-s390x.
 | 
			
		||||
     [Neale Ferguson <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) The earlier bugfix for the SSL3_ST_SW_HELLO_REQ_C case of
 | 
			
		||||
     ssl3_accept (ssl/s3_srvr.c) incorrectly used a local flag
 | 
			
		||||
     variable as an indication that a ClientHello message has been
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										376
									
								
								Configure
									
									
									
									
									
								
							
							
						
						
									
										376
									
								
								Configure
									
									
									
									
									
								
							@@ -10,7 +10,7 @@ use strict;
 | 
			
		||||
 | 
			
		||||
# 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:
 | 
			
		||||
#
 | 
			
		||||
@@ -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.
 | 
			
		||||
#               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.
 | 
			
		||||
#               Generic OpenSSL-style methods relating to this support
 | 
			
		||||
#               are always compiled but return NULL if the hardware
 | 
			
		||||
@@ -107,7 +108,6 @@ my $tlib="-lnsl -lsocket";
 | 
			
		||||
my $bits1="THIRTY_TWO_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_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";
 | 
			
		||||
@@ -120,7 +120,7 @@ my $alpha_asm="::::::::";
 | 
			
		||||
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
 | 
			
		||||
# So the md5_locl.h file has an undef B_ENDIAN if sun is defined
 | 
			
		||||
 | 
			
		||||
#config-string	$cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib
 | 
			
		||||
#config-string	$cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags
 | 
			
		||||
 | 
			
		||||
my %table=(
 | 
			
		||||
# File 'TABLE' (created by 'make TABLE') contains the data from this list,
 | 
			
		||||
@@ -134,49 +134,59 @@ my %table=(
 | 
			
		||||
 | 
			
		||||
# Our development configs
 | 
			
		||||
"purify",	"purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
 | 
			
		||||
"debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -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",	"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 -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-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-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-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-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 -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-steve-linux-pseudo64",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn",
 | 
			
		||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -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 -Wid-clash-31 -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -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 -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 -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 -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"dist",		"cc:-O::(unknown)::::::",
 | 
			
		||||
 | 
			
		||||
# Basic configs that should work on any (32 and less bit) box
 | 
			
		||||
"gcc",		"gcc:-O3::(unknown):::BN_LLONG:::",
 | 
			
		||||
"cc",		"cc:-O::(unknown)::::::",
 | 
			
		||||
 | 
			
		||||
####VOS Configurations
 | 
			
		||||
"vos-gcc","gcc:-b hppa1.1-stratus-vos -O3 -Wall -Wuninitialized -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:",
 | 
			
		||||
"debug-vos-gcc","gcc:-b hppa1.1-stratus-vos -O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:",
 | 
			
		||||
"vos-vcc","vcc:-b i386-stratus-vos -O3 -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map::::::::::::::.so:",
 | 
			
		||||
"debug-vos-vcc","vcc:-b i386-stratus-vos -O0 -g -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map::::::::::::::.so:",
 | 
			
		||||
 | 
			
		||||
#### Solaris x86 with GNU C setups
 | 
			
		||||
# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it
 | 
			
		||||
# here because whenever GNU C instantiates an assembler template it
 | 
			
		||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
 | 
			
		||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
 | 
			
		||||
# error message.
 | 
			
		||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### Solaris x86 with Sun C setups
 | 
			
		||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with GNU C setups
 | 
			
		||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc
 | 
			
		||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
 | 
			
		||||
# but keep the assembler modules.
 | 
			
		||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
####
 | 
			
		||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with Sun C setups
 | 
			
		||||
# DO NOT use /xO[34] on sparc with SC3.0.  It is broken, and will not pass the tests
 | 
			
		||||
@@ -196,17 +206,16 @@ my %table=(
 | 
			
		||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
 | 
			
		||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
 | 
			
		||||
# assisted with debugging of following two configs.
 | 
			
		||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::::",
 | 
			
		||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
 | 
			
		||||
# -Wa,-Av8plus should do the trick no matter what.
 | 
			
		||||
"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# !!!Folowing can't be even tested yet!!!
 | 
			
		||||
#    We have to wait till 64-bit glibc for SPARC is operational!!!
 | 
			
		||||
#"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:ULTRASPARC::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
 | 
			
		||||
"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)",
 | 
			
		||||
# GCC 3.1 is a requirement
 | 
			
		||||
"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# Sunos configs, assuming sparc for the gcc one.
 | 
			
		||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):::DES_UNROLL:::",
 | 
			
		||||
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
 | 
			
		||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:::",
 | 
			
		||||
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
 | 
			
		||||
 | 
			
		||||
#### IRIX 5.x configs
 | 
			
		||||
# -mips2 flag is added by ./config when appropriate.
 | 
			
		||||
@@ -214,13 +223,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 6.x configs
 | 
			
		||||
# 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.
 | 
			
		||||
"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-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-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 -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.
 | 
			
		||||
"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-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-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::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### Unified HP-UX ANSI C configs.
 | 
			
		||||
# Special notes:
 | 
			
		||||
@@ -255,24 +264,27 @@ my %table=(
 | 
			
		||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -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:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# 64bit PARISC for GCC without optimization, which seems to make problems.
 | 
			
		||||
# 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-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
 | 
			
		||||
# I have no idea if this one actually works, feedback needed. <appro>
 | 
			
		||||
"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)",
 | 
			
		||||
"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)",
 | 
			
		||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
 | 
			
		||||
# 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.
 | 
			
		||||
#
 | 
			
		||||
# Chris Ruemmler <ruemmler@cup.hp.com>
 | 
			
		||||
# 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-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)",
 | 
			
		||||
"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)",
 | 
			
		||||
"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 -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 -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.
 | 
			
		||||
# 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.
 | 
			
		||||
# Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or
 | 
			
		||||
@@ -376,20 +388,24 @@ my %table=(
 | 
			
		||||
"linux-k6",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"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-mips",   "gcc:-DB_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::-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-m68k",   "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
 | 
			
		||||
"linux-s390",	"gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
 | 
			
		||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-s390",	"gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-s390x",	"gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-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-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)",
 | 
			
		||||
"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}",
 | 
			
		||||
"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)",
 | 
			
		||||
@@ -397,7 +413,7 @@ my %table=(
 | 
			
		||||
"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-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
 | 
			
		||||
"qnx4",	"cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
 | 
			
		||||
@@ -406,34 +422,38 @@ my %table=(
 | 
			
		||||
"qnx6",	"cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:",
 | 
			
		||||
 | 
			
		||||
# 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::-ldl: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.0","cc:-DFILIO_H::-Kthread::-lsocket -lnsl -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"unixware-2.0-pentium","cc:-DFILIO_H -Kpentium::-Kthread::-lsocket -lnsl -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"sco3-gcc",  "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
 | 
			
		||||
# 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 2.1
 | 
			
		||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"unixware-2.1-pentium","cc:-O -DFILIO_H -Kpentium::-Kthread::-lsocket -lnsl -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
"unixware-2.1-p6","cc:-O -DFILIO_H -Kp6::-Kthread::-lsocket -lnsl -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
"aix-cc",   "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 | 
			
		||||
"aix-gcc",  "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 | 
			
		||||
"aix43-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
 | 
			
		||||
"aix43-gcc",  "gcc:-O3 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
 | 
			
		||||
"aix43-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:",
 | 
			
		||||
"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)
 | 
			
		||||
@@ -466,18 +486,9 @@ my %table=(
 | 
			
		||||
"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}",
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
# 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)",
 | 
			
		||||
"SINIX","cc:-O::(unknown):SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:RC4_INDEX RC4_CHAR:::",
 | 
			
		||||
"SINIX-N","/usr/ucb/cc:-O2 -misaligned::(unknown)::-lucb:RC4_INDEX RC4_CHAR:::",
 | 
			
		||||
 | 
			
		||||
@@ -493,6 +504,7 @@ my %table=(
 | 
			
		||||
# Windows NT, Microsoft Visual C++ 4.0
 | 
			
		||||
 | 
			
		||||
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"VC-WIN16","cl:::(unknown):WIN16::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
 | 
			
		||||
"VC-W31-16","cl:::(unknown):WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
			
		||||
@@ -500,20 +512,24 @@ my %table=(
 | 
			
		||||
"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 | 
			
		||||
 | 
			
		||||
# Borland C++ 4.5
 | 
			
		||||
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX::::::::::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:::",
 | 
			
		||||
 | 
			
		||||
# Mingw32
 | 
			
		||||
# (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl
 | 
			
		||||
# 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",
 | 
			
		||||
# MinGW
 | 
			
		||||
"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",
 | 
			
		||||
 | 
			
		||||
# UWIN 
 | 
			
		||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
 | 
			
		||||
# Cygwin
 | 
			
		||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
 | 
			
		||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
 | 
			
		||||
 | 
			
		||||
# DJGPP
 | 
			
		||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
 | 
			
		||||
 | 
			
		||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 | 
			
		||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
 | 
			
		||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
 | 
			
		||||
@@ -529,12 +545,15 @@ my %table=(
 | 
			
		||||
"OpenBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-sparc64",	"gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-vax",		"gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-hppa",		"gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-hppa",		"gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
 | 
			
		||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
"darwin-ppc-cc","cc:-O3 -nostdinc -I/System/Library/Frameworks/System.framework/Headers -I/System/Library/Frameworks/System.frameworks/Headers/bsd -I/usr/include -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin-i386-cc","cc:-O3 -nostdinc -I/System/Library/Frameworks/System.framework/Headers -I/System/Library/Frameworks/System.frameworks/Headers/bsd -I/usr/include -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::-fPIC",
 | 
			
		||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
 | 
			
		||||
##### A/UX
 | 
			
		||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
 | 
			
		||||
##### Sony NEWS-OS 4.x
 | 
			
		||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
 | 
			
		||||
@@ -547,11 +566,18 @@ my %table=(
 | 
			
		||||
 | 
			
		||||
##### VxWorks for various targets
 | 
			
		||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
 | 
			
		||||
"vxworks-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)
 | 
			
		||||
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
 | 
			
		||||
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
 | 
			
		||||
	BC-16 Mingw32 OS2-EMX);
 | 
			
		||||
my @WinTargets=qw(VC-NT VC-CE VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS
 | 
			
		||||
	BC-32 BC-16 Mingw32 OS2-EMX);
 | 
			
		||||
 | 
			
		||||
my $idx = 0;
 | 
			
		||||
my $idx_cc = $idx++;
 | 
			
		||||
@@ -576,6 +602,7 @@ my $idx_shared_cflag = $idx++;
 | 
			
		||||
my $idx_shared_ldflag = $idx++;
 | 
			
		||||
my $idx_shared_extension = $idx++;
 | 
			
		||||
my $idx_ranlib = $idx++;
 | 
			
		||||
my $idx_arflags = $idx++;
 | 
			
		||||
 | 
			
		||||
my $prefix="";
 | 
			
		||||
my $openssldir="";
 | 
			
		||||
@@ -589,7 +616,7 @@ my $threads=0;
 | 
			
		||||
my $no_asm=0;
 | 
			
		||||
my $no_dso=0;
 | 
			
		||||
my @skip=();
 | 
			
		||||
my $Makefile="Makefile.ssl";
 | 
			
		||||
my $Makefile="Makefile";
 | 
			
		||||
my $des_locl="crypto/des/des_locl.h";
 | 
			
		||||
my $des	="crypto/des/des.h";
 | 
			
		||||
my $bn	="crypto/bn/bn.h";
 | 
			
		||||
@@ -601,6 +628,7 @@ my $rc2	="crypto/rc2/rc2.h";
 | 
			
		||||
my $bf	="crypto/bf/bf_locl.h";
 | 
			
		||||
my $bn_asm	="bn_asm.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 $cast_enc="c_enc.o";
 | 
			
		||||
my $rc4_enc="rc4_enc.o";
 | 
			
		||||
@@ -611,6 +639,8 @@ my $rmd160_obj="";
 | 
			
		||||
my $processor="";
 | 
			
		||||
my $default_ranlib;
 | 
			
		||||
my $perl;
 | 
			
		||||
my $fips=0;
 | 
			
		||||
my $debug=0;
 | 
			
		||||
 | 
			
		||||
my $no_ssl2=0;
 | 
			
		||||
my $no_ssl3=0;
 | 
			
		||||
@@ -620,10 +650,6 @@ my $no_sha=0;
 | 
			
		||||
my $no_rsa=0;
 | 
			
		||||
my $no_dh=0;
 | 
			
		||||
 | 
			
		||||
$default_ranlib= &which("ranlib") or $default_ranlib="true";
 | 
			
		||||
$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
 | 
			
		||||
  or $perl="perl";
 | 
			
		||||
 | 
			
		||||
&usage if ($#ARGV < 0);
 | 
			
		||||
 | 
			
		||||
my $flags;
 | 
			
		||||
@@ -633,9 +659,11 @@ my $openssl_thread_defines;
 | 
			
		||||
my $openssl_sys_defines="";
 | 
			
		||||
my $openssl_other_defines;
 | 
			
		||||
my $libs;
 | 
			
		||||
my $libkrb5="";
 | 
			
		||||
my $target;
 | 
			
		||||
my $options;
 | 
			
		||||
my $symlink;
 | 
			
		||||
my $make_depend=0;
 | 
			
		||||
my %withargs=();
 | 
			
		||||
 | 
			
		||||
my @argvcopy=@ARGV;
 | 
			
		||||
@@ -672,6 +700,11 @@ PROCESS_ARGS:
 | 
			
		||||
			$flags .= "-DOPENSSL_NO_ASM ";
 | 
			
		||||
			$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-(.+)$/)
 | 
			
		||||
			{
 | 
			
		||||
			my $hw=$1;
 | 
			
		||||
@@ -694,7 +727,7 @@ PROCESS_ARGS:
 | 
			
		||||
			{ $threads=1; }
 | 
			
		||||
		elsif (/^no-shared$/)
 | 
			
		||||
			{ $no_shared=1; }
 | 
			
		||||
		elsif (/^shared$/)
 | 
			
		||||
		elsif (/^shared$/ || /^-shared$/ || /^--shared$/)
 | 
			
		||||
			{ $no_shared=0; }
 | 
			
		||||
		elsif (/^no-zlib$/)
 | 
			
		||||
			{ $zlib=0; }
 | 
			
		||||
@@ -712,6 +745,8 @@ PROCESS_ARGS:
 | 
			
		||||
			{ $no_ssl3 = 1; }
 | 
			
		||||
		elsif (/^no-tls1?$/)
 | 
			
		||||
			{ $no_tls1 = 1; }
 | 
			
		||||
		elsif (/^no-fips$/)
 | 
			
		||||
			{ $fips = 0; }
 | 
			
		||||
		elsif (/^no-(.+)$/)
 | 
			
		||||
			{
 | 
			
		||||
			my $algo=$1;
 | 
			
		||||
@@ -722,6 +757,7 @@ PROCESS_ARGS:
 | 
			
		||||
			$openssl_algorithm_defines .= "#define OPENSSL_NO_$algo\n";
 | 
			
		||||
			if ($algo eq "RIJNDAEL")
 | 
			
		||||
				{
 | 
			
		||||
				push @skip, "aes";
 | 
			
		||||
				$flags .= "-DOPENSSL_NO_AES ";
 | 
			
		||||
				$depflags .= "-DOPENSSL_NO_AES ";
 | 
			
		||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_AES\n";
 | 
			
		||||
@@ -734,14 +770,6 @@ PROCESS_ARGS:
 | 
			
		||||
				$depflags .= "-DOPENSSL_NO_MDC2 ";
 | 
			
		||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n";
 | 
			
		||||
				}
 | 
			
		||||
			if ($algo eq "EC" || $algo eq "SHA" || $algo eq "SHA1")
 | 
			
		||||
				{
 | 
			
		||||
				push @skip, "ecdsa";
 | 
			
		||||
				$options .= " no-ecdsa";
 | 
			
		||||
				$flags .= "-DOPENSSL_NO_ECDSA ";
 | 
			
		||||
				$depflags .= "-DOPENSSL_NO_ECDSA ";
 | 
			
		||||
				$openssl_algorithm_defines .= "#define OPENSSL_NO_ECDSA\n";
 | 
			
		||||
				}
 | 
			
		||||
			if ($algo eq "MD5")
 | 
			
		||||
				{
 | 
			
		||||
				$no_md5 = 1;
 | 
			
		||||
@@ -784,6 +812,14 @@ PROCESS_ARGS:
 | 
			
		||||
			}
 | 
			
		||||
		elsif (/^386$/)
 | 
			
		||||
			{ $processor=386; }
 | 
			
		||||
		elsif (/^fips$/)
 | 
			
		||||
			{
 | 
			
		||||
			$fips=1;
 | 
			
		||||
		        }
 | 
			
		||||
		elsif (/^debug$/)
 | 
			
		||||
			{
 | 
			
		||||
			$debug=1;
 | 
			
		||||
			}
 | 
			
		||||
		elsif (/^rsaref$/)
 | 
			
		||||
			{
 | 
			
		||||
			# No RSAref support any more since it's not needed.
 | 
			
		||||
@@ -901,14 +937,20 @@ print "Configuring for $target\n";
 | 
			
		||||
my $IsWindows=scalar grep /^$target$/,@WinTargets;
 | 
			
		||||
 | 
			
		||||
$exe_ext=".exe" if ($target eq "Cygwin");
 | 
			
		||||
$exe_ext=".exe" if ($target eq "DJGPP");
 | 
			
		||||
$exe_ext=".pm" if ($target eq "vos-gcc" or $target eq "debug-vos-gcc" or $target eq "vos-vcc" or $target eq "debug-vos-vcc");
 | 
			
		||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
 | 
			
		||||
$prefix=$openssldir if $prefix eq "";
 | 
			
		||||
 | 
			
		||||
$default_ranlib= &which("ranlib") or $default_ranlib="true";
 | 
			
		||||
$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
 | 
			
		||||
  or $perl="perl";
 | 
			
		||||
 | 
			
		||||
chop $openssldir if $openssldir =~ /\/$/;
 | 
			
		||||
chop $prefix if $prefix =~ /\/$/;
 | 
			
		||||
 | 
			
		||||
$openssldir=$prefix . "/ssl" if $openssldir eq "";
 | 
			
		||||
$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
 | 
			
		||||
$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
print "IsWindows=$IsWindows\n";
 | 
			
		||||
@@ -936,6 +978,9 @@ my $shared_cflag = $fields[$idx_shared_cflag];
 | 
			
		||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
 | 
			
		||||
my $shared_extension = $fields[$idx_shared_extension];
 | 
			
		||||
my $ranlib = $fields[$idx_ranlib];
 | 
			
		||||
my $arflags = $fields[$idx_arflags];
 | 
			
		||||
 | 
			
		||||
my $no_shared_warn=0;
 | 
			
		||||
 | 
			
		||||
$cflags="$flags$cflags" if ($flags ne "");
 | 
			
		||||
 | 
			
		||||
@@ -954,6 +999,17 @@ else
 | 
			
		||||
	my ($lresolv, $lpath, $lext);
 | 
			
		||||
	if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/)
 | 
			
		||||
		{
 | 
			
		||||
		die "Sorry, Heimdal is currently not supported\n";
 | 
			
		||||
		}
 | 
			
		||||
	##### HACK to force use of Heimdal.
 | 
			
		||||
	##### WARNING: Since we don't really have adequate support for Heimdal,
 | 
			
		||||
	#####          using this will break the build.  You'll have to make
 | 
			
		||||
	#####          changes to the source, and if you do, please send
 | 
			
		||||
	#####          patches to openssl-dev@openssl.org
 | 
			
		||||
	if ($withargs{"krb5-flavor"} =~ /^force-[Hh]eimdal$/)
 | 
			
		||||
		{
 | 
			
		||||
		warn "Heimdal isn't really supported.  Your build WILL break\n";
 | 
			
		||||
		warn "If you fix the problems, please send a patch to openssl-dev\@openssl.org\n";
 | 
			
		||||
		$withargs{"krb5-dir"} = "/usr/heimdal"
 | 
			
		||||
			if $withargs{"krb5-dir"} eq "";
 | 
			
		||||
		$withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}.
 | 
			
		||||
@@ -986,7 +1042,7 @@ else
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	$withargs{"krb5-lib"} .= " -lresolv"
 | 
			
		||||
		if ("$lresolv");
 | 
			
		||||
		if ("$lresolv" ne "");
 | 
			
		||||
	$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
 | 
			
		||||
		if $withargs{"krb5-include"} eq "" &&
 | 
			
		||||
		   $withargs{"krb5-dir"} ne "";
 | 
			
		||||
@@ -1045,7 +1101,7 @@ else
 | 
			
		||||
#		}
 | 
			
		||||
	}	
 | 
			
		||||
 | 
			
		||||
$lflags="$libs$lflags"if ($libs ne "");
 | 
			
		||||
$lflags="$libs$lflags" if ($libs ne "");
 | 
			
		||||
 | 
			
		||||
if ($no_asm)
 | 
			
		||||
	{
 | 
			
		||||
@@ -1053,6 +1109,11 @@ if ($no_asm)
 | 
			
		||||
	$sha1_obj=$md5_obj=$rmd160_obj="";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if (!$no_shared)
 | 
			
		||||
	{
 | 
			
		||||
	$cast_obj="";	# CAST assembler is not PIC
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($threads)
 | 
			
		||||
	{
 | 
			
		||||
	$cflags=$thread_cflags;
 | 
			
		||||
@@ -1063,25 +1124,22 @@ if ($zlib)
 | 
			
		||||
	{
 | 
			
		||||
	$cflags = "-DZLIB $cflags";
 | 
			
		||||
	$cflags = "-DZLIB_SHARED $cflags" if $zlib == 2;
 | 
			
		||||
	$lflags = "$lflags -lz" if $zlib == 2;
 | 
			
		||||
	$lflags = "$lflags -lz" if $zlib == 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
 | 
			
		||||
my $shared_mark = "";
 | 
			
		||||
if ($shared_target ne "")
 | 
			
		||||
if ($shared_target eq "")
 | 
			
		||||
	{
 | 
			
		||||
	$no_shared_warn = 1 if !$no_shared;
 | 
			
		||||
	$no_shared = 1;
 | 
			
		||||
	}
 | 
			
		||||
if (!$no_shared)
 | 
			
		||||
	{
 | 
			
		||||
	if ($shared_cflag ne "")
 | 
			
		||||
		{
 | 
			
		||||
		$cflags = "$shared_cflag $cflags";
 | 
			
		||||
		}
 | 
			
		||||
	if (!$no_shared)
 | 
			
		||||
		{
 | 
			
		||||
		#$shared_mark = "\$(SHARED_LIBS)";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
else
 | 
			
		||||
	{
 | 
			
		||||
	$no_shared = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if ($sys_id ne "")
 | 
			
		||||
@@ -1102,12 +1160,20 @@ if ($ranlib eq "")
 | 
			
		||||
 | 
			
		||||
$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$/);
 | 
			
		||||
$cast_obj=$cast_enc	unless ($cast_obj =~ /\.o$/);
 | 
			
		||||
$rc4_obj=$rc4_enc	unless ($rc4_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;
 | 
			
		||||
	$cflags.=" -DSHA1_ASM";
 | 
			
		||||
@@ -1123,6 +1189,16 @@ if ($rmd160_obj =~ /\.o$/)
 | 
			
		||||
	$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
 | 
			
		||||
# and works as well on command lines.
 | 
			
		||||
$cflags =~ s/([\\\"])/\\\1/g;
 | 
			
		||||
 | 
			
		||||
my $version = "unknown";
 | 
			
		||||
my $major = "unknown";
 | 
			
		||||
my $minor = "unknown";
 | 
			
		||||
@@ -1154,7 +1230,8 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
 | 
			
		||||
open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n";
 | 
			
		||||
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
 | 
			
		||||
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
 | 
			
		||||
print OUT "### Generated automatically from Makefile.org by Configure.\n\n";
 | 
			
		||||
my $sdirs=0;
 | 
			
		||||
while (<IN>)
 | 
			
		||||
@@ -1190,15 +1267,18 @@ while (<IN>)
 | 
			
		||||
	s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
 | 
			
		||||
	s/^BN_ASM=.*$/BN_ASM= $bn_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/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
 | 
			
		||||
	s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
 | 
			
		||||
	s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/;
 | 
			
		||||
	s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_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/^PROCESSOR=.*/PROCESSOR= $processor/;
 | 
			
		||||
	s/^RANLIB=.*/RANLIB= $ranlib/;
 | 
			
		||||
	s/^ARFLAGS=.*/ARFLAGS= $arflags/;
 | 
			
		||||
	s/^PERL=.*/PERL= $perl/;
 | 
			
		||||
	s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
 | 
			
		||||
	s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
 | 
			
		||||
@@ -1208,18 +1288,28 @@ while (<IN>)
 | 
			
		||||
	if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
 | 
			
		||||
		{
 | 
			
		||||
		my $sotmp = $1;
 | 
			
		||||
		s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/
 | 
			
		||||
		s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
 | 
			
		||||
		}
 | 
			
		||||
	elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.dylib$/)
 | 
			
		||||
		{
 | 
			
		||||
		s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.dylib/;
 | 
			
		||||
		}
 | 
			
		||||
	elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
 | 
			
		||||
		{
 | 
			
		||||
		my $sotmp = $1;
 | 
			
		||||
		s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
 | 
			
		||||
		}
 | 
			
		||||
	elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
 | 
			
		||||
		{
 | 
			
		||||
		s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.\$(SHLIB_MAJOR).dylib .dylib/;
 | 
			
		||||
		}
 | 
			
		||||
	s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/;
 | 
			
		||||
	print OUT $_."\n";
 | 
			
		||||
	}
 | 
			
		||||
close(IN);
 | 
			
		||||
close(OUT);
 | 
			
		||||
rename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile;
 | 
			
		||||
rename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n";
 | 
			
		||||
 | 
			
		||||
print "CC            =$cc\n";
 | 
			
		||||
print "CFLAG         =$cflags\n";
 | 
			
		||||
@@ -1235,11 +1325,10 @@ print "SHA1_OBJ_ASM  =$sha1_obj\n";
 | 
			
		||||
print "RMD160_OBJ_ASM=$rmd160_obj\n";
 | 
			
		||||
print "PROCESSOR     =$processor\n";
 | 
			
		||||
print "RANLIB        =$ranlib\n";
 | 
			
		||||
print "ARFLAGS       =$arflags\n";
 | 
			
		||||
print "PERL          =$perl\n";
 | 
			
		||||
print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n"
 | 
			
		||||
	if $withargs{"krb5-include"} ne "";
 | 
			
		||||
print "LIBKRB5       =",$withargs{"krb5-lib"},"\n"
 | 
			
		||||
	if $withargs{"krb5-lib"} ne "";
 | 
			
		||||
 | 
			
		||||
my $des_ptr=0;
 | 
			
		||||
my $des_risc1=0;
 | 
			
		||||
@@ -1290,7 +1379,8 @@ foreach (sort split(/\s+/,$bn_ops))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
open(IN,'<crypto/opensslconf.h.in') || die "unable to read crypto/opensslconf.h.in:$!\n";
 | 
			
		||||
open(OUT,'>crypto/opensslconf.h') || die "unable to create crypto/opensslconf.h:$!\n";
 | 
			
		||||
unlink("crypto/opensslconf.h.new") || die "unable to remove old crypto/opensslconf.h.new:$!\n" if -e "crypto/opensslconf.h.new";
 | 
			
		||||
open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslconf.h.new:$!\n";
 | 
			
		||||
print OUT "/* opensslconf.h */\n";
 | 
			
		||||
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";
 | 
			
		||||
 | 
			
		||||
@@ -1384,6 +1474,8 @@ while (<IN>)
 | 
			
		||||
	}
 | 
			
		||||
close(IN);
 | 
			
		||||
close(OUT);
 | 
			
		||||
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
 | 
			
		||||
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Fix the date
 | 
			
		||||
@@ -1415,7 +1507,7 @@ if($IsWindows) {
 | 
			
		||||
	printf OUT <<EOF;
 | 
			
		||||
#ifndef MK1MF_BUILD
 | 
			
		||||
  /* 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
 | 
			
		||||
   * -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
 | 
			
		||||
  #error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
 | 
			
		||||
@@ -1423,11 +1515,13 @@ if($IsWindows) {
 | 
			
		||||
EOF
 | 
			
		||||
	close(OUT);
 | 
			
		||||
} else {
 | 
			
		||||
	(system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?
 | 
			
		||||
		if $symlink;
 | 
			
		||||
	### (system 'make depend') == 0 or exit $? if $depflags ne "";
 | 
			
		||||
	# Run "make depend" manually if you want to be able to delete
 | 
			
		||||
	# the source code files of ciphers you left out.
 | 
			
		||||
	my $make_command = "make PERL=\'$perl\'";
 | 
			
		||||
	my $make_targets = "";
 | 
			
		||||
	$make_targets .= " links" if $symlink;
 | 
			
		||||
	$make_targets .= " depend" if $depflags ne "" && $make_depend;
 | 
			
		||||
	$make_targets .= " gentests" if $symlink;
 | 
			
		||||
	(system $make_command.$make_targets) == 0 or exit $?
 | 
			
		||||
		if $make_targets ne "";
 | 
			
		||||
	if ( $perl =~ m@^/@) {
 | 
			
		||||
	    &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
 | 
			
		||||
	    &dofile("apps/der_chop",$perl,'^#!/', '#!%s');
 | 
			
		||||
@@ -1438,6 +1532,15 @@ EOF
 | 
			
		||||
	    &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
 | 
			
		||||
	    &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
 | 
			
		||||
	}
 | 
			
		||||
	if ($depflags ne "" && !$make_depend) {
 | 
			
		||||
		print <<EOF;
 | 
			
		||||
 | 
			
		||||
Since you've disabled at least one algorithm, you need to do the following
 | 
			
		||||
before building:
 | 
			
		||||
 | 
			
		||||
	make depend
 | 
			
		||||
EOF
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
@@ -1452,6 +1555,16 @@ applications as the compiler options required on this system are not known.
 | 
			
		||||
See file INSTALL for details if you need multi-threading.
 | 
			
		||||
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);
 | 
			
		||||
 | 
			
		||||
sub usage
 | 
			
		||||
@@ -1493,10 +1606,10 @@ sub which
 | 
			
		||||
	my $path;
 | 
			
		||||
	foreach $path (split /:/, $ENV{PATH})
 | 
			
		||||
		{
 | 
			
		||||
		if (-f "$path/$name" and -x _)
 | 
			
		||||
		if (-f "$path/$name$exe_ext" and -x _)
 | 
			
		||||
			{
 | 
			
		||||
			return "$path/$name" unless ($name eq "perl" and
 | 
			
		||||
			 system("$path/$name -e " . '\'exit($]<5.0);\''));
 | 
			
		||||
			return "$path/$name$exe_ext" unless ($name eq "perl" and
 | 
			
		||||
			 system("$path/$name$exe_ext -e " . '\'exit($]<5.0);\''));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@@ -1528,7 +1641,7 @@ sub print_table_entry
 | 
			
		||||
	my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
 | 
			
		||||
	my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
 | 
			
		||||
	my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
 | 
			
		||||
	my $shared_ldflag,my $shared_extension,my $ranlib)=
 | 
			
		||||
	my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)=
 | 
			
		||||
	split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
 | 
			
		||||
			
 | 
			
		||||
	print <<EOF
 | 
			
		||||
@@ -1556,6 +1669,7 @@ sub print_table_entry
 | 
			
		||||
\$shared_ldflag = $shared_ldflag
 | 
			
		||||
\$shared_extension = $shared_extension
 | 
			
		||||
\$ranlib       = $ranlib
 | 
			
		||||
\$arflags      = $arflags
 | 
			
		||||
EOF
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										219
									
								
								FAQ
									
									
									
									
									
								
							
							
						
						
									
										219
									
								
								FAQ
									
									
									
									
									
								
							@@ -9,6 +9,7 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Where can I get a compiled version of OpenSSL?
 | 
			
		||||
* Why aren't tools like 'autoconf' and 'libtool' used?
 | 
			
		||||
* What is an 'engine' version?
 | 
			
		||||
* How do I check the authenticity of the OpenSSL distribution?
 | 
			
		||||
 | 
			
		||||
[LEGAL] Legal questions
 | 
			
		||||
 | 
			
		||||
@@ -36,15 +37,22 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Why does the linker complain about undefined symbols?
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: command not found"?
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: stack empty"?
 | 
			
		||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
 | 
			
		||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
 | 
			
		||||
* Why does the OpenSSL compilation fail on Win32 with VC++?
 | 
			
		||||
* What is special about OpenSSL on Redhat?
 | 
			
		||||
* Why does the OpenSSL compilation fail on MacOS X?
 | 
			
		||||
* Why does the OpenSSL test suite fail on MacOS X?
 | 
			
		||||
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
 | 
			
		||||
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
 | 
			
		||||
 | 
			
		||||
[PROG] Questions about programming with OpenSSL
 | 
			
		||||
 | 
			
		||||
* Is OpenSSL thread-safe?
 | 
			
		||||
* I've compiled a program under Windows and it crashes: why?
 | 
			
		||||
* How do I read or write a DER encoded buffer using the ASN1 functions?
 | 
			
		||||
* OpenSSL uses DER but I need BER format: does OpenSSL support BER?
 | 
			
		||||
* I've tried using <M_some_evil_pkcs12_macro> and I get errors why?
 | 
			
		||||
* I've called <some function> and it fails, why?
 | 
			
		||||
* I just get a load of numbers for the error output, what do they mean?
 | 
			
		||||
@@ -52,6 +60,8 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Why can't the OpenSSH configure script detect OpenSSL?
 | 
			
		||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
 | 
			
		||||
* Why doesn't my server application receive a client certificate?
 | 
			
		||||
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
 | 
			
		||||
* I think I've detected a memory leak, is this a bug?
 | 
			
		||||
 | 
			
		||||
===============================================================================
 | 
			
		||||
 | 
			
		||||
@@ -60,7 +70,7 @@ OpenSSL  -  Frequently Asked Questions
 | 
			
		||||
* Which is the current version of OpenSSL?
 | 
			
		||||
 | 
			
		||||
The current version is available from <URL: http://www.openssl.org>.
 | 
			
		||||
OpenSSL 0.9.6d was released on May 9, 2002.
 | 
			
		||||
OpenSSL 0.9.7e was released on October 25, 2004.
 | 
			
		||||
 | 
			
		||||
In addition to the current stable release, you can also access daily
 | 
			
		||||
snapshots of the OpenSSL development version at <URL:
 | 
			
		||||
@@ -108,11 +118,14 @@ OpenSSL.  Information on the OpenSSL mailing lists is available from
 | 
			
		||||
 | 
			
		||||
* 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.
 | 
			
		||||
When using such an application, you don't need to install OpenSSL
 | 
			
		||||
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
 | 
			
		||||
on how to obtain and install the free GNU C compiler.
 | 
			
		||||
 | 
			
		||||
@@ -131,6 +144,19 @@ hardware. This was realized in a special release '0.9.6-engine'. With
 | 
			
		||||
version 0.9.7 (not yet released) the changes were merged into the main
 | 
			
		||||
development line, so that the special release is no longer necessary.
 | 
			
		||||
 | 
			
		||||
* How do I check the authenticity of the OpenSSL distribution?
 | 
			
		||||
 | 
			
		||||
We provide MD5 digests and ASC signatures of each tarball.
 | 
			
		||||
Use MD5 to check that a tarball from a mirror site is identical:
 | 
			
		||||
 | 
			
		||||
   md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5
 | 
			
		||||
 | 
			
		||||
You can check authenticity using pgp or gpg. You need the OpenSSL team
 | 
			
		||||
member public key used to sign it (download it from a key server). Then
 | 
			
		||||
just do:
 | 
			
		||||
 | 
			
		||||
   pgp TARBALL.asc
 | 
			
		||||
 | 
			
		||||
[LEGAL] =======================================================================
 | 
			
		||||
 | 
			
		||||
* Do I need patent licenses to use OpenSSL?
 | 
			
		||||
@@ -168,18 +194,30 @@ for permission to use their software with OpenSSL.
 | 
			
		||||
 | 
			
		||||
Cryptographic software needs a source of unpredictable data to work
 | 
			
		||||
correctly.  Many open source operating systems provide a "randomness
 | 
			
		||||
device" that serves this purpose.  On other systems, applications have
 | 
			
		||||
to call the RAND_add() or RAND_seed() function with appropriate data
 | 
			
		||||
before generating keys or performing public key encryption.
 | 
			
		||||
(These functions initialize the pseudo-random number generator, PRNG.)
 | 
			
		||||
device" (/dev/urandom or /dev/random) that serves this purpose.
 | 
			
		||||
All OpenSSL versions try to use /dev/urandom by default; starting with
 | 
			
		||||
version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not
 | 
			
		||||
available.
 | 
			
		||||
 | 
			
		||||
Some broken applications do not do this.  As of version 0.9.5, the
 | 
			
		||||
OpenSSL functions that need randomness report an error if the random
 | 
			
		||||
number generator has not been seeded with at least 128 bits of
 | 
			
		||||
randomness.  If this error occurs, please contact the author of the
 | 
			
		||||
application you are using.  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.
 | 
			
		||||
On other systems, applications have to call the RAND_add() or
 | 
			
		||||
RAND_seed() function with appropriate data before generating keys or
 | 
			
		||||
performing public key encryption. (These functions initialize the
 | 
			
		||||
pseudo-random number generator, PRNG.)  Some broken applications do
 | 
			
		||||
not do this.  As of version 0.9.5, the OpenSSL functions that need
 | 
			
		||||
randomness report an error if the random number generator has not been
 | 
			
		||||
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
 | 
			
		||||
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
 | 
			
		||||
@@ -212,13 +250,6 @@ OpenSSL command line tools. Applications using the OpenSSL library
 | 
			
		||||
provide their own configuration options to specify the entropy source,
 | 
			
		||||
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.  However, be warned that /dev/random is usually a blocking
 | 
			
		||||
device, which may have some effects on OpenSSL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why do I get an "unable to write 'random state'" error message?
 | 
			
		||||
 | 
			
		||||
@@ -395,6 +426,17 @@ and compile/install it.  GNU bc (see http://www.gnu.org/software/software.html
 | 
			
		||||
for download instructions) can be safely used, for example.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL test fail with "bc: stack empty"?
 | 
			
		||||
 | 
			
		||||
On some DG/ux versions, bc seems to have a too small stack for calculations
 | 
			
		||||
that the OpenSSL bntest throws at it.  This gets triggered when you run the
 | 
			
		||||
test suite (using "make test").  The message returned is "bc: stack empty".
 | 
			
		||||
 | 
			
		||||
The best way to deal with this is to find another implementation of bc
 | 
			
		||||
and compile/install it.  GNU bc (see http://www.gnu.org/software/software.html
 | 
			
		||||
for download instructions) can be safely used, for example.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
 | 
			
		||||
 | 
			
		||||
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
 | 
			
		||||
@@ -420,7 +462,7 @@ get the best result from OpenSSL.  A bit more complicated solution is the
 | 
			
		||||
following:
 | 
			
		||||
 | 
			
		||||
----- 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 /'`"
 | 
			
		||||
  rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
 | 
			
		||||
  make
 | 
			
		||||
@@ -453,12 +495,104 @@ 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
 | 
			
		||||
can't find standard include files like stdio.h and other weirdnesses.
 | 
			
		||||
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
 | 
			
		||||
the 'bin' subdirectory of the VC++ installation directory (somewhere
 | 
			
		||||
under 'Program Files').  This needs to be done prior to running NMAKE,
 | 
			
		||||
and the changes are only valid for the current DOS session.
 | 
			
		||||
To solve that problem for VC++ versions up to 6, one should run
 | 
			
		||||
VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++
 | 
			
		||||
installation directory (somewhere under 'Program Files').  For VC++
 | 
			
		||||
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?
 | 
			
		||||
 | 
			
		||||
Red Hat Linux (release 7.0 and later) include a preinstalled limited
 | 
			
		||||
version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2
 | 
			
		||||
is disabled in this version. The same may apply to other Linux distributions.
 | 
			
		||||
Users may therefore wish to install more or all of the features left out.
 | 
			
		||||
 | 
			
		||||
To do this you MUST ensure that you do not overwrite the openssl that is in
 | 
			
		||||
/usr/bin on your Red Hat machine. Several packages depend on this file,
 | 
			
		||||
including sendmail and ssh. /usr/local/bin is a good alternative choice. The
 | 
			
		||||
libraries that come with Red Hat 7.0 onwards have different names and so are
 | 
			
		||||
not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and
 | 
			
		||||
/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and
 | 
			
		||||
/lib/libcrypto.so.2 respectively).
 | 
			
		||||
 | 
			
		||||
Please note that we have been advised by Red Hat attempting to recompile the
 | 
			
		||||
openssl rpm with all the cryptography enabled will not work. All other
 | 
			
		||||
packages depend on the original Red Hat supplied openssl package. It is also
 | 
			
		||||
worth noting that due to the way Red Hat supplies its packages, updates to
 | 
			
		||||
openssl on each distribution never change the package version, only the
 | 
			
		||||
build number. For example, on Red Hat 7.1, the latest openssl package has
 | 
			
		||||
version number 0.9.6 and build number 9 even though it contains all the
 | 
			
		||||
relevant updates in packages up to and including 0.9.6b.
 | 
			
		||||
 | 
			
		||||
A possible way around this is to persuade Red Hat to produce a non-US
 | 
			
		||||
version of Red Hat Linux.
 | 
			
		||||
 | 
			
		||||
FYI: Patent numbers and expiry dates of US patents:
 | 
			
		||||
MDC-2: 4,908,861 13/03/2007
 | 
			
		||||
IDEA:  5,214,703 25/05/2010
 | 
			
		||||
RC5:   5,724,428 03/03/2015
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL compilation fail on MacOS X?
 | 
			
		||||
 | 
			
		||||
If the failure happens when trying to build the "openssl" binary, with
 | 
			
		||||
a large number of undefined symbols, it's very probable that you have
 | 
			
		||||
OpenSSL 0.9.6b delivered with the operating system (you can find out by
 | 
			
		||||
running '/usr/bin/openssl version') and that you were trying to build
 | 
			
		||||
OpenSSL 0.9.7 or newer.  The problem is that the loader ('ld') in
 | 
			
		||||
MacOS X has a misfeature that's quite difficult to go around.
 | 
			
		||||
Look in the file PROBLEMS for a more detailed explanation and for possible
 | 
			
		||||
solutions.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL test suite fail on MacOS X?
 | 
			
		||||
 | 
			
		||||
If the failure happens when running 'make test' and the RC4 test fails,
 | 
			
		||||
it's very probable that you have OpenSSL 0.9.6b delivered with the
 | 
			
		||||
operating system (you can find out by running '/usr/bin/openssl version')
 | 
			
		||||
and that you were trying to build OpenSSL 0.9.6d.  The problem is that
 | 
			
		||||
the loader ('ld') in MacOS X has a misfeature that's quite difficult to
 | 
			
		||||
go around and has linked the programs "openssl" and the test programs
 | 
			
		||||
with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the
 | 
			
		||||
libraries you just built.
 | 
			
		||||
Look in the file PROBLEMS for a more detailed explanation and for possible
 | 
			
		||||
solutions.
 | 
			
		||||
 | 
			
		||||
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
 | 
			
		||||
 | 
			
		||||
Failure in BN_sqr test is most likely caused by a failure to configure the
 | 
			
		||||
toolkit for current platform or lack of support for the platform in question.
 | 
			
		||||
Run './config -t' and './apps/openssl version -p'. Do these platform
 | 
			
		||||
identifiers match? If they don't, then you most likely failed to run
 | 
			
		||||
./config and you're hereby advised to do so before filing a bug report.
 | 
			
		||||
If ./config itself fails to run, then it's most likely problem with your
 | 
			
		||||
local environment and you should turn to your system administrator (or
 | 
			
		||||
similar). If identifiers match (and/or no alternative identifier is
 | 
			
		||||
suggested by ./config script), then the platform is unsupported. There might
 | 
			
		||||
or might not be a workaround. Most notably on SPARC64 platforms with GNU
 | 
			
		||||
C compiler you should be able to produce a working build by running
 | 
			
		||||
'./config -m32'. I understand that -m32 might not be what you want/need,
 | 
			
		||||
but the build should be operational. For further details turn to
 | 
			
		||||
<openssl-dev@openssl.org>.
 | 
			
		||||
 | 
			
		||||
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
 | 
			
		||||
 | 
			
		||||
As of 0.9.7 assembler routines were overhauled for position independence
 | 
			
		||||
of the machine code, which is essential for shared library support. For
 | 
			
		||||
some reason OpenBSD is equipped with an out-of-date GNU assembler which
 | 
			
		||||
finds the new code offensive. To work around the problem, configure with
 | 
			
		||||
no-asm (and sacrifice a great deal of performance) or 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] ========================================================================
 | 
			
		||||
 | 
			
		||||
* Is OpenSSL thread-safe?
 | 
			
		||||
@@ -551,6 +685,20 @@ and attempts to free the buffer will have unpredictable results
 | 
			
		||||
because it no longer points to the same address.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* OpenSSL uses DER but I need BER format: does OpenSSL support BER?
 | 
			
		||||
 | 
			
		||||
The short answer is yes, because DER is a special case of BER and OpenSSL
 | 
			
		||||
ASN1 decoders can process BER.
 | 
			
		||||
 | 
			
		||||
The longer answer is that ASN1 structures can be encoded in a number of
 | 
			
		||||
different ways. One set of ways is the Basic Encoding Rules (BER) with various
 | 
			
		||||
permissible encodings. A restriction of BER is the Distinguished Encoding
 | 
			
		||||
Rules (DER): these uniquely specify how a given structure is encoded.
 | 
			
		||||
 | 
			
		||||
Therefore, because DER is a special case of BER, DER is an acceptable encoding
 | 
			
		||||
for BER.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* I've tried using <M_some_evil_pkcs12_macro> and I get errors why?
 | 
			
		||||
 | 
			
		||||
This usually happens when you try compiling something using the PKCS#12
 | 
			
		||||
@@ -603,6 +751,7 @@ The general answer is to check the config.log file generated when running
 | 
			
		||||
the OpenSSH configure script. It should contain the detailed information
 | 
			
		||||
on why the OpenSSL library was not detected or considered incompatible.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
 | 
			
		||||
 | 
			
		||||
Yes; make sure to read the SSL_get_error(3) manual page!
 | 
			
		||||
@@ -624,5 +773,25 @@ if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the
 | 
			
		||||
SSL_CTX_set_verify() function to enable the use of client certificates.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
 | 
			
		||||
 | 
			
		||||
For OpenSSL 0.9.7 the OID table was extended and corrected. In earlier
 | 
			
		||||
versions, uniqueIdentifier was incorrectly used for X.509 certificates.
 | 
			
		||||
The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier.
 | 
			
		||||
Change your code to use the new name when compiling against OpenSSL 0.9.7.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* I think I've detected a memory leak, is this a bug?
 | 
			
		||||
 | 
			
		||||
In most cases the cause of an apparent memory leak is an OpenSSL internal table
 | 
			
		||||
that is allocated when an application starts up. Since such tables do not grow
 | 
			
		||||
in size over time they are harmless.
 | 
			
		||||
 | 
			
		||||
These internal tables can be freed up when an application closes using various
 | 
			
		||||
functions.  Currently these include: EVP_cleanup(), ERR_remove_state(),
 | 
			
		||||
ERR_free_strings(), ENGINE_cleanup(), CONF_modules_unload() and
 | 
			
		||||
CRYPTO_cleanup_all_ex_data().
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===============================================================================
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										56
									
								
								INSTALL
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								INSTALL
									
									
									
									
									
								
							@@ -2,8 +2,10 @@
 | 
			
		||||
 INSTALLATION ON THE UNIX PLATFORM
 | 
			
		||||
 ---------------------------------
 | 
			
		||||
 | 
			
		||||
 [Installation on Windows, OpenVMS and MacOS (before MacOS X) is described
 | 
			
		||||
  in INSTALL.W32, INSTALL.VMS and INSTALL.MacOS.]
 | 
			
		||||
 [Installation on DOS (with djgpp), Windows, OpenVMS and MacOS (before MacOS X)
 | 
			
		||||
  is described in INSTALL.DJGPP, INSTALL.W32, INSTALL.VMS and INSTALL.MacOS.
 | 
			
		||||
  This document describes installation on operating systems in the Unix
 | 
			
		||||
  family.]
 | 
			
		||||
 | 
			
		||||
 To install OpenSSL, you will need:
 | 
			
		||||
 | 
			
		||||
@@ -121,7 +123,7 @@
 | 
			
		||||
     generic configurations "cc" or "gcc" should usually work on 32 bit
 | 
			
		||||
     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
 | 
			
		||||
     crypto/opensslconf.h.in).
 | 
			
		||||
 | 
			
		||||
@@ -137,8 +139,11 @@
 | 
			
		||||
     the failure that aren't problems in OpenSSL itself (like missing
 | 
			
		||||
     standard headers).  If it is a problem with OpenSSL itself, please
 | 
			
		||||
     report the problem to <openssl-bugs@openssl.org> (note that your
 | 
			
		||||
     message will be forwarded to a public mailing list).  Include the
 | 
			
		||||
     output of "make report" in your message.
 | 
			
		||||
     message will be recorded in the request tracker publicly readable
 | 
			
		||||
     via http://www.openssl.org/support/rt2.html and will be forwarded to a
 | 
			
		||||
     public mailing list). Include the output of "make report" in your message.
 | 
			
		||||
     Please check out the request tracker. Maybe the bug was already
 | 
			
		||||
     reported or has already been fixed.
 | 
			
		||||
 | 
			
		||||
     [If you encounter assembler error messages, try the "no-asm"
 | 
			
		||||
     configuration option as an immediate fix.]
 | 
			
		||||
@@ -153,10 +158,11 @@
 | 
			
		||||
     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
 | 
			
		||||
     or malfunctioning bc).  If it is a problem with OpenSSL itself,
 | 
			
		||||
     try removing any compiler optimization flags from the CFLAGS line
 | 
			
		||||
     in Makefile.ssl and run "make clean; make". Please send a bug
 | 
			
		||||
     try removing any compiler optimization flags from the CFLAG line
 | 
			
		||||
     in Makefile and run "make clean; make". Please send a bug
 | 
			
		||||
     report to <openssl-bugs@openssl.org>, including the output of
 | 
			
		||||
     "make report".
 | 
			
		||||
     "make report" in order to be added to the request tracker at
 | 
			
		||||
     http://www.openssl.org/support/rt2.html.
 | 
			
		||||
 | 
			
		||||
  4. If everything tests ok, install OpenSSL with
 | 
			
		||||
 | 
			
		||||
@@ -290,3 +296,37 @@
 | 
			
		||||
 targets for shared library creation, like linux-shared.  Those targets
 | 
			
		||||
 can currently be used on their own just as well, but this is expected
 | 
			
		||||
 to change in future versions of OpenSSL.
 | 
			
		||||
 | 
			
		||||
 Note on random number generation
 | 
			
		||||
 --------------------------------
 | 
			
		||||
 | 
			
		||||
 Availability of cryptographically secure random numbers is required for
 | 
			
		||||
 secret key generation. OpenSSL provides several options to seed the
 | 
			
		||||
 internal PRNG. If not properly seeded, the internal PRNG will refuse
 | 
			
		||||
 to deliver random bytes and a "PRNG not seeded error" will occur.
 | 
			
		||||
 On systems without /dev/urandom (or similar) device, it may be necessary
 | 
			
		||||
 to install additional support software to obtain random seed.
 | 
			
		||||
 Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
 | 
			
		||||
 and the FAQ for more information.
 | 
			
		||||
 | 
			
		||||
 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.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								INSTALL.DJGPP
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								INSTALL.DJGPP
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
 INSTALLATION ON THE DOS PLATFORM WITH DJGPP
 | 
			
		||||
 -------------------------------------------
 | 
			
		||||
 | 
			
		||||
 Openssl has been ported to DOS, but only with long filename support. If
 | 
			
		||||
 you wish to compile on native DOS with 8+3 filenames, you will have to
 | 
			
		||||
 tweak the installation yourself, including renaming files with illegal
 | 
			
		||||
 or duplicate names.
 | 
			
		||||
 | 
			
		||||
 You should have a full DJGPP environment installed, including the
 | 
			
		||||
 latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
 | 
			
		||||
 requires that PERL and BC also be installed.
 | 
			
		||||
 | 
			
		||||
 All of these can be obtained from the usual DJGPP mirror sites, such
 | 
			
		||||
 as "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to
 | 
			
		||||
 have the WATT-32 networking package installed before you try to compile
 | 
			
		||||
 openssl. This can be obtained from "http://www.bgnett.no/~giva/".
 | 
			
		||||
 The Makefile assumes that the WATT-32 code is in the directory
 | 
			
		||||
 specified by the environment variable WATT_ROOT. If you have watt-32
 | 
			
		||||
 in directory "watt32" under your main DJGPP directory, specify
 | 
			
		||||
 WATT_ROOT="/dev/env/DJDIR/watt32".
 | 
			
		||||
 | 
			
		||||
 To compile openssl, start your BASH shell. Then configure for DOS by
 | 
			
		||||
 running "./Configure" with appropriate arguments. The basic syntax for
 | 
			
		||||
 DOS is:
 | 
			
		||||
 ./Configure no-threads --prefix=/dev/env/DJDIR DJGPP
 | 
			
		||||
 
 | 
			
		||||
 You may run out of DPMI selectors when running in a DOS box under
 | 
			
		||||
 Windows. If so, just close the BASH shell, go back to Windows, and
 | 
			
		||||
 restart BASH. Then run "make" again.
 | 
			
		||||
 | 
			
		||||
 Building openssl under DJGPP has been tested with DJGPP 2.03,
 | 
			
		||||
 GCC 2.952, GCC 2.953, perl 5.005_02 and perl 5.006_01.
 | 
			
		||||
@@ -20,3 +20,12 @@
 | 
			
		||||
 | 
			
		||||
 If that finishes successfully you will find the libraries and programs in the
 | 
			
		||||
 "out" directory.
 | 
			
		||||
 | 
			
		||||
 Alternatively, you can make a dynamic build that puts the library code into
 | 
			
		||||
 crypto.dll and ssl.dll by running
 | 
			
		||||
 | 
			
		||||
 > make -f os2-emx-dll.mak
 | 
			
		||||
 | 
			
		||||
 This will build the above mentioned dlls and a matching pair of import
 | 
			
		||||
 libraries in the "out_dll" directory along with the set of test programs
 | 
			
		||||
 and the openssl application.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										189
									
								
								INSTALL.W32
									
									
									
									
									
								
							
							
						
						
									
										189
									
								
								INSTALL.W32
									
									
									
									
									
								
							@@ -2,39 +2,20 @@
 | 
			
		||||
 INSTALLATION ON THE WIN32 PLATFORM
 | 
			
		||||
 ----------------------------------
 | 
			
		||||
 | 
			
		||||
 [Instructions for building for Windows CE can be found in INSTALL.WCE]
 | 
			
		||||
 | 
			
		||||
 Heres a few comments about building OpenSSL in Windows environments.  Most
 | 
			
		||||
 of this is tested on Win32 but it may also work in Win 3.1 with some
 | 
			
		||||
 modification.
 | 
			
		||||
 | 
			
		||||
 You need Perl for Win32.  Unless you will build on Cygwin, you will need
 | 
			
		||||
 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:
 | 
			
		||||
 | 
			
		||||
  * Visual C++
 | 
			
		||||
  * Borland C
 | 
			
		||||
  * GNU C (Mingw32 or Cygwin)
 | 
			
		||||
 | 
			
		||||
 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.
 | 
			
		||||
  * GNU C (Cygwin or MinGW)
 | 
			
		||||
 | 
			
		||||
 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
 | 
			
		||||
@@ -44,12 +25,34 @@
 | 
			
		||||
 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
 | 
			
		||||
 | 
			
		||||
 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:
 | 
			
		||||
 | 
			
		||||
@@ -82,7 +85,8 @@
 | 
			
		||||
 There are various changes you can make to the Win32 compile environment. By
 | 
			
		||||
 default the library is not compiled with debugging symbols. If you add 'debug'
 | 
			
		||||
 to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
 | 
			
		||||
 compiled in.
 | 
			
		||||
 compiled in. Note that mk1mf.pl expects the platform to be the last argument
 | 
			
		||||
 on the command line, so 'debug' must appear before that, as all other options.
 | 
			
		||||
 | 
			
		||||
 The default Win32 environment is to leave out any Windows NT specific
 | 
			
		||||
 features.
 | 
			
		||||
@@ -94,6 +98,20 @@
 | 
			
		||||
 You can also build a static version of the library using the Makefile
 | 
			
		||||
 ms\nt.mak
 | 
			
		||||
 | 
			
		||||
 Borland C++ builder 5
 | 
			
		||||
 ---------------------
 | 
			
		||||
 | 
			
		||||
 * Configure for building with Borland Builder (to build a FIPS-certified
 | 
			
		||||
   variant of OpenSSL, add the option "fips"):
 | 
			
		||||
   > perl Configure BC-32
 | 
			
		||||
 | 
			
		||||
 * Create the appropriate makefile (to build a FIPS-certified variant of
 | 
			
		||||
   OpenSSL, add the argument "fips")
 | 
			
		||||
   > ms\do_nasm
 | 
			
		||||
 | 
			
		||||
 * Build
 | 
			
		||||
   > make -f ms\bcb.mak
 | 
			
		||||
 | 
			
		||||
 Borland C++ builder 3 and 4
 | 
			
		||||
 ---------------------------
 | 
			
		||||
 | 
			
		||||
@@ -104,18 +122,72 @@
 | 
			
		||||
 * Run make:
 | 
			
		||||
   > make -f bcb.mak
 | 
			
		||||
 | 
			
		||||
 GNU C (Mingw32)
 | 
			
		||||
 ---------------
 | 
			
		||||
 GNU C (Cygwin)
 | 
			
		||||
 --------------
 | 
			
		||||
 | 
			
		||||
 To build OpenSSL, you need the Mingw32 package and GNU make.
 | 
			
		||||
 Cygwin provides a bash shell and GNU tools environment running
 | 
			
		||||
 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
 | 
			
		||||
 bash environment such as Linux than to other the other Win32
 | 
			
		||||
 makes.
 | 
			
		||||
 | 
			
		||||
 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:
 | 
			
		||||
 | 
			
		||||
 * Install Cygwin (see http://cygwin.com/)
 | 
			
		||||
 | 
			
		||||
 * Install Perl and ensure it is in the path. Both Cygwin perl
 | 
			
		||||
   (5.6.1-2 or newer) and ActivePerl work.
 | 
			
		||||
 | 
			
		||||
 * Run the Cygwin bash shell
 | 
			
		||||
 | 
			
		||||
 * $ tar zxvf openssl-x.x.x.tar.gz
 | 
			
		||||
   $ cd openssl-x.x.x
 | 
			
		||||
 | 
			
		||||
   To build the Cygwin version of OpenSSL:
 | 
			
		||||
 | 
			
		||||
   $ ./config
 | 
			
		||||
   [...]
 | 
			
		||||
   $ make
 | 
			
		||||
   [...]
 | 
			
		||||
   $ make test
 | 
			
		||||
   $ make install
 | 
			
		||||
 | 
			
		||||
   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:
 | 
			
		||||
 | 
			
		||||
 "make test" and normal file operations may fail in directories
 | 
			
		||||
 mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
 | 
			
		||||
 stripping of carriage returns. To avoid this ensure that a binary
 | 
			
		||||
 mount is used, e.g. mount -b c:\somewhere /home.
 | 
			
		||||
 | 
			
		||||
 "bc" is not provided in older Cygwin distribution.  This causes a
 | 
			
		||||
 non-fatal error in "make test" but is otherwise harmless.  If
 | 
			
		||||
 desired and needed, GNU bc can be built with Cygwin without change.
 | 
			
		||||
 | 
			
		||||
 GNU C (MinGW)
 | 
			
		||||
 -------------
 | 
			
		||||
 | 
			
		||||
 * 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.
 | 
			
		||||
   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:
 | 
			
		||||
 | 
			
		||||
@@ -125,6 +197,8 @@
 | 
			
		||||
   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.
 | 
			
		||||
@@ -137,53 +211,6 @@
 | 
			
		||||
   > cd out
 | 
			
		||||
   > ..\ms\test
 | 
			
		||||
 | 
			
		||||
 GNU C (Cygwin)
 | 
			
		||||
 --------------
 | 
			
		||||
 | 
			
		||||
 Cygwin provides a bash shell and GNU tools environment running on
 | 
			
		||||
 NT 4.0, Windows 9x and Windows 2000. Consequently, a make of OpenSSL
 | 
			
		||||
 with Cygwin is closer to a GNU bash environment such as Linux rather
 | 
			
		||||
 than other W32 makes that are based on a single makefile approach.
 | 
			
		||||
 Cygwin implements Posix/Unix calls through cygwin1.dll, and is
 | 
			
		||||
 contrasted to Mingw32 which links dynamically to msvcrt.dll or
 | 
			
		||||
 crtdll.dll.
 | 
			
		||||
 | 
			
		||||
 To build OpenSSL using Cygwin:
 | 
			
		||||
 | 
			
		||||
 * Install Cygwin (see http://sourceware.cygnus.com/cygwin)
 | 
			
		||||
 | 
			
		||||
 * Install Perl and ensure it is in the path (recent Cygwin perl 
 | 
			
		||||
   (version 5.6.1-2 of the latter has been reported to work) or
 | 
			
		||||
   ActivePerl)
 | 
			
		||||
 | 
			
		||||
 * Run the Cygwin bash shell
 | 
			
		||||
 | 
			
		||||
 * $ tar zxvf openssl-x.x.x.tar.gz
 | 
			
		||||
   $ cd openssl-x.x.x
 | 
			
		||||
   $ ./config
 | 
			
		||||
   [...]
 | 
			
		||||
   $ make
 | 
			
		||||
   [...]
 | 
			
		||||
   $ make test
 | 
			
		||||
   $ make install
 | 
			
		||||
 | 
			
		||||
 This will create a default install in /usr/local/ssl.
 | 
			
		||||
 | 
			
		||||
 Cygwin Notes:
 | 
			
		||||
 | 
			
		||||
 "make test" and normal file operations may fail in directories
 | 
			
		||||
 mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
 | 
			
		||||
 stripping of carriage returns. To avoid this ensure that a binary
 | 
			
		||||
 mount is used, e.g. mount -b c:\somewhere /home.
 | 
			
		||||
 | 
			
		||||
 As of version 1.1.1 Cygwin is relatively unstable in its handling
 | 
			
		||||
 of cr/lf issues. These make procedures succeeded with versions 1.1 and
 | 
			
		||||
 the snapshot 20000524 (Slow!).
 | 
			
		||||
 | 
			
		||||
 "bc" is not provided in the Cygwin distribution.  This causes a
 | 
			
		||||
 non-fatal error in "make test" but is otherwise harmless.  If
 | 
			
		||||
 desired, GNU bc can be built with Cygwin without change.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 Installation
 | 
			
		||||
 ------------
 | 
			
		||||
@@ -203,7 +230,7 @@
 | 
			
		||||
	$ md c:\openssl\lib
 | 
			
		||||
	$ md c:\openssl\include
 | 
			
		||||
	$ 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\libeay32.lib c:\openssl\lib
 | 
			
		||||
	$ copy /b out32dll\ssleay32.dll c:\openssl\bin
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										71
									
								
								INSTALL.WCE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								INSTALL.WCE
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
			
		||||
 
 | 
			
		||||
 INSTALLATION FOR THE WINDOWS CE PLATFORM
 | 
			
		||||
 ----------------------------------------
 | 
			
		||||
 | 
			
		||||
 Building OpenSSL for Windows CE requires the following external tools:
 | 
			
		||||
 | 
			
		||||
  * Microsoft eMbedded Visual C++ 3.0
 | 
			
		||||
  * wcecompat compatibility library (www.essemer.com.au)
 | 
			
		||||
  * Optionally ceutils for running automated tests (www.essemer.com.au)
 | 
			
		||||
 | 
			
		||||
 You also need Perl for Win32.  You will need ActiveState Perl, available
 | 
			
		||||
 from http://www.activestate.com/ActivePerl.
 | 
			
		||||
 | 
			
		||||
 Windows CE support in OpenSSL relies on wcecompat.  All Windows CE specific
 | 
			
		||||
 issues should be directed to www.essemer.com.au.
 | 
			
		||||
 | 
			
		||||
 The C Runtime Library implementation for Windows CE that is included with
 | 
			
		||||
 Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
 | 
			
		||||
 incorrect.  wcecompat plugs the holes and tries to bring the Windows CE
 | 
			
		||||
 CRT to a level that is more compatible with ANSI C.  wcecompat goes further
 | 
			
		||||
 and provides low-level IO and stream IO support for stdin/stdout/stderr
 | 
			
		||||
 (which Windows CE does not provide).  This IO functionality is not needed
 | 
			
		||||
 by the OpenSSL library itself but is used for the tests and openssl.exe.
 | 
			
		||||
 More information is available at www.essemer.com.au.
 | 
			
		||||
 | 
			
		||||
 Building
 | 
			
		||||
 --------
 | 
			
		||||
 | 
			
		||||
 Setup the eMbedded Visual C++ environment.  There are batch files for doing
 | 
			
		||||
 this installed with eVC++.  For an ARM processor, for example, execute:
 | 
			
		||||
 | 
			
		||||
 > "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
 | 
			
		||||
 | 
			
		||||
 Next indicate where wcecompat is located:
 | 
			
		||||
 | 
			
		||||
 > set WCECOMPAT=C:\wcecompat
 | 
			
		||||
 | 
			
		||||
 Next you should run Configure:
 | 
			
		||||
 | 
			
		||||
 > perl Configure VC-CE
 | 
			
		||||
 | 
			
		||||
 Next you need to build the Makefiles:
 | 
			
		||||
 | 
			
		||||
 > ms\do_ms
 | 
			
		||||
 | 
			
		||||
 If you get errors about things not having numbers assigned then check the
 | 
			
		||||
 troubleshooting section in INSTALL.W32: you probably won't be able to compile
 | 
			
		||||
 it as it stands.
 | 
			
		||||
 | 
			
		||||
 Then from the VC++ environment at a prompt do:
 | 
			
		||||
 | 
			
		||||
 - to build static libraries:
 | 
			
		||||
 | 
			
		||||
   > nmake -f ms\ce.mak
 | 
			
		||||
 | 
			
		||||
 - or to build DLLs:
 | 
			
		||||
 | 
			
		||||
   > nmake -f ms\cedll.mak
 | 
			
		||||
 | 
			
		||||
 If all is well it should compile and you will have some static libraries and
 | 
			
		||||
 executables in out32, or some DLLs and executables in out32dll.  If you want
 | 
			
		||||
 to try the tests then make sure the ceutils are in the path and do:
 | 
			
		||||
 
 | 
			
		||||
 > cd out32
 | 
			
		||||
 > ..\ms\testce
 | 
			
		||||
 | 
			
		||||
 This will copy each of the test programs to the Windows CE device and execute
 | 
			
		||||
 them, displaying the output of the tests on this computer.  The output should
 | 
			
		||||
 look similar to the output produced by running the tests for a regular Windows
 | 
			
		||||
 build.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 
 | 
			
		||||
@@ -1287,7 +1287,7 @@ EXITPOINT:
 | 
			
		||||
 | 
			
		||||
//	Send some bytes
 | 
			
		||||
 | 
			
		||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength)
 | 
			
		||||
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength)
 | 
			
		||||
{
 | 
			
		||||
OSErr			errCode = noErr;
 | 
			
		||||
int				bytesSent = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,7 @@ int MacSocket_recv(const int inSocketNum,void *outBuff,int outBuffLength,const B
 | 
			
		||||
 | 
			
		||||
//	Call this to send data on a socket
 | 
			
		||||
 | 
			
		||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength);
 | 
			
		||||
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//	If zero bytes were read in a call to MacSocket_recv(), it may be that the remote end has done a half-close
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										366
									
								
								Makefile.org
									
									
									
									
									
								
							
							
						
						
									
										366
									
								
								Makefile.org
									
									
									
									
									
								
							@@ -15,6 +15,11 @@ OPTIONS=
 | 
			
		||||
CONFIGURE_ARGS=
 | 
			
		||||
SHLIB_TARGET=
 | 
			
		||||
 | 
			
		||||
# HERE indicates where this Makefile lives.  This can be used to indicate
 | 
			
		||||
# where sub-Makefiles are expected to be.  Currently has very limited usage,
 | 
			
		||||
# and should probably not be bothered with at all.
 | 
			
		||||
HERE=.
 | 
			
		||||
 | 
			
		||||
# INSTALL_PREFIX is for package builders so that they can configure
 | 
			
		||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
 | 
			
		||||
# Normally it is left empty.
 | 
			
		||||
@@ -59,13 +64,22 @@ DEPFLAG=
 | 
			
		||||
PEX_LIBS= 
 | 
			
		||||
EX_LIBS= 
 | 
			
		||||
EXE_EXT= 
 | 
			
		||||
AR=ar r
 | 
			
		||||
ARFLAGS=
 | 
			
		||||
AR=ar $(ARFLAGS) r
 | 
			
		||||
RANLIB= ranlib
 | 
			
		||||
PERL= perl
 | 
			
		||||
TAR= tar
 | 
			
		||||
TARFLAGS= --no-recursion
 | 
			
		||||
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
 | 
			
		||||
BN_ASM= bn_asm.o
 | 
			
		||||
#BN_ASM= bn_asm.o
 | 
			
		||||
@@ -87,6 +101,7 @@ PROCESSOR=
 | 
			
		||||
 | 
			
		||||
# Set DES_ENC to des_enc.o if you want to use the C version
 | 
			
		||||
#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= des_enc.o fcrypt_b.o          # C
 | 
			
		||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
 | 
			
		||||
@@ -139,6 +154,7 @@ MD5_ASM_OBJ= asm/mx86-out.o
 | 
			
		||||
 | 
			
		||||
# Also need SHA1_ASM defined
 | 
			
		||||
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-sol.o       # solaris
 | 
			
		||||
#SHA1_ASM_OBJ= asm/sx86-out.o       # a.out, FreeBSD
 | 
			
		||||
@@ -159,27 +175,29 @@ LIBKRB5=
 | 
			
		||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
 | 
			
		||||
SHLIB_MARK=
 | 
			
		||||
 | 
			
		||||
DIRS=   crypto ssl $(SHLIB_MARK) apps test tools
 | 
			
		||||
SHLIBDIRS= crypto ssl
 | 
			
		||||
DIRS=   crypto fips ssl $(SHLIB_MARK) sigs apps test tools
 | 
			
		||||
SHLIBDIRS= fips crypto ssl
 | 
			
		||||
 | 
			
		||||
# dirs in crypto to build
 | 
			
		||||
SDIRS=  \
 | 
			
		||||
SDIRS=  objects \
 | 
			
		||||
	md2 md4 md5 sha mdc2 hmac ripemd \
 | 
			
		||||
	des rc2 rc4 rc5 idea bf cast \
 | 
			
		||||
	bn ec rsa dsa ecdsa dh dso engine aes \
 | 
			
		||||
	buffer bio stack lhash rand err objects \
 | 
			
		||||
	bn ec rsa dsa dh dso engine aes \
 | 
			
		||||
	buffer bio stack lhash rand err \
 | 
			
		||||
	evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
 | 
			
		||||
 | 
			
		||||
FDIRS=	sha1 rand des aes dsa rsa dh
 | 
			
		||||
 | 
			
		||||
# tests to perform.  "alltests" is a special word indicating that all tests
 | 
			
		||||
# should be performed.
 | 
			
		||||
TESTS = alltests
 | 
			
		||||
 | 
			
		||||
MAKEFILE= Makefile.ssl
 | 
			
		||||
MAKE=     make -f Makefile.ssl
 | 
			
		||||
MAKEFILE= Makefile
 | 
			
		||||
 | 
			
		||||
MANDIR=$(OPENSSLDIR)/man
 | 
			
		||||
MAN1=1
 | 
			
		||||
MAN3=3
 | 
			
		||||
MANSUFFIX=
 | 
			
		||||
SHELL=/bin/sh
 | 
			
		||||
 | 
			
		||||
TOP=    .
 | 
			
		||||
@@ -187,6 +205,7 @@ ONEDIRS=out tmp
 | 
			
		||||
EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
 | 
			
		||||
WDIRS=  windows
 | 
			
		||||
LIBS=   libcrypto.a libssl.a
 | 
			
		||||
SIGS=	libcrypto.a.sha1
 | 
			
		||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 | 
			
		||||
SHARED_SSL=libssl$(SHLIB_EXT)
 | 
			
		||||
SHARED_LIBS=
 | 
			
		||||
@@ -204,14 +223,32 @@ HEADER=         e_os.h
 | 
			
		||||
# When we're prepared to use shared libraries in the programs we link here
 | 
			
		||||
# we might remove 'clean-shared' from the targets to perform at this stage
 | 
			
		||||
 | 
			
		||||
all: Makefile.ssl sub_all
 | 
			
		||||
all: Makefile sub_all openssl.pc
 | 
			
		||||
 | 
			
		||||
sigs:	$(SIGS)
 | 
			
		||||
libcrypto.a.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.a.sha1; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
sub_all:
 | 
			
		||||
	@for i in $(DIRS); \
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(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 \
 | 
			
		||||
		$(MAKE) $$i; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
sub_target:
 | 
			
		||||
	@for i in $(DIRS); \
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making $(TARGET) in $$i..." && \
 | 
			
		||||
		$(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; \
 | 
			
		||||
	else \
 | 
			
		||||
		$(MAKE) $$i; \
 | 
			
		||||
	fi; \
 | 
			
		||||
@@ -241,7 +278,7 @@ clean-shared:
 | 
			
		||||
		fi; \
 | 
			
		||||
		( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
 | 
			
		||||
		if [ "$(PLATFORM)" = "Cygwin" ]; then \
 | 
			
		||||
			( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
 | 
			
		||||
			( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
 | 
			
		||||
		fi; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
@@ -251,7 +288,8 @@ link-shared:
 | 
			
		||||
		for i in $(SHLIBDIRS); do \
 | 
			
		||||
			prev=lib$$i$(SHLIB_EXT); \
 | 
			
		||||
			for j in $${tmp:-x}; do \
 | 
			
		||||
				( set -x; ln -f -s $$prev lib$$i$$j ); \
 | 
			
		||||
				( set -x; \
 | 
			
		||||
				rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
 | 
			
		||||
				prev=lib$$i$$j; \
 | 
			
		||||
			done; \
 | 
			
		||||
		done; \
 | 
			
		||||
@@ -263,41 +301,45 @@ 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="$$libs -l$$i"; \
 | 
			
		||||
	libs="-l$$i $$libs"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
 | 
			
		||||
	collect2=`gcc -print-prog-name=collect2 2>&1` && \
 | 
			
		||||
	[ -n "$$collect2" ] && \
 | 
			
		||||
	my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
 | 
			
		||||
	[ -n "$$my_ld" ] && \
 | 
			
		||||
	$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
 | 
			
		||||
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
 | 
			
		||||
 | 
			
		||||
# For Darwin AKA Mac OS/X (dyld)
 | 
			
		||||
do_darwin-shared: 
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
 | 
			
		||||
	if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
 | 
			
		||||
		libs="$(LIBKRB5) $$libs"; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
 | 
			
		||||
		lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
 | 
			
		||||
		-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
 | 
			
		||||
	libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \
 | 
			
		||||
	libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
 | 
			
		||||
	echo "" ; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
do_cygwin-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; ${CC}  -shared -o cyg$$i.dll \
 | 
			
		||||
	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="$$libs -l$$i"; \
 | 
			
		||||
	libs="-l$$i $$libs"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
# This assumes that GNU utilities are *not* used
 | 
			
		||||
@@ -306,11 +348,14 @@ do_alpha-osf1-shared:
 | 
			
		||||
		$(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="$$libs -l$$i"; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -322,11 +367,14 @@ do_tru64-shared:
 | 
			
		||||
		$(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="$$libs -l$$i"; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -338,12 +386,15 @@ do_tru64-shared-rpath:
 | 
			
		||||
		$(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="$$libs -l$$i"; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -354,12 +405,19 @@ do_solaris-shared:
 | 
			
		||||
		$(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; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		  MINUSZ='-z '; \
 | 
			
		||||
		  (${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \
 | 
			
		||||
			-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
			-Wl,-Bsymbolic \
 | 
			
		||||
			$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
 | 
			
		||||
			$$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -369,16 +427,20 @@ do_svr3-shared:
 | 
			
		||||
		$(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`" ; \
 | 
			
		||||
		    OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
 | 
			
		||||
		  done ; \
 | 
			
		||||
		  set -x; ${CC}  -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		  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="$$libs -l$$i"; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -388,17 +450,23 @@ do_svr5-shared:
 | 
			
		||||
		$(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`" ; \
 | 
			
		||||
		    OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
 | 
			
		||||
		  done ; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		  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="$$libs -l$$i"; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -408,11 +476,16 @@ do_irix-shared:
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
		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} \
 | 
			
		||||
			-all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
			$${WHOLELIB} $$libs ${EX_LIBS} -lc) || exit 1; \
 | 
			
		||||
		libs="-l$$i $$libs"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
@@ -429,12 +502,16 @@ do_irix-shared:
 | 
			
		||||
#
 | 
			
		||||
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
 | 
			
		||||
@@ -448,11 +525,15 @@ do_hpux-shared:
 | 
			
		||||
#
 | 
			
		||||
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
 | 
			
		||||
@@ -489,17 +570,24 @@ 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 $$i.o $(ALLSYMSFLAG) lib$$i.a && \
 | 
			
		||||
	  ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
 | 
			
		||||
	  ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
 | 
			
		||||
	    $(SHAREDCMD) $(SHAREDFLAG) -o lib$$i.so lib$$i.o \
 | 
			
		||||
	    $(SHAREDCMD) $(SHAREDFLAGS) \
 | 
			
		||||
		-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
 | 
			
		||||
		$$libs ${EX_LIBS} ) ) \
 | 
			
		||||
	|| exit 1; \
 | 
			
		||||
	libs="$$libs -l$$i"; \
 | 
			
		||||
	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; \
 | 
			
		||||
@@ -509,19 +597,32 @@ do_reliantunix-shared:
 | 
			
		||||
	  cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
 | 
			
		||||
	) || exit 1; \
 | 
			
		||||
	rm -rf $$tmpdir ; \
 | 
			
		||||
	libs="$$libs -l$$i"; \
 | 
			
		||||
	libs="-l$$i $$libs"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
Makefile.ssl: Makefile.org
 | 
			
		||||
	@echo "Makefile.ssl is older than Makefile.org."
 | 
			
		||||
openssl.pc: Makefile
 | 
			
		||||
	@ ( echo 'prefix=$(INSTALLTOP)'; \
 | 
			
		||||
	    echo 'exec_prefix=$${prefix}'; \
 | 
			
		||||
	    echo 'libdir=$${exec_prefix}/lib'; \
 | 
			
		||||
	    echo 'includedir=$${prefix}/include'; \
 | 
			
		||||
	    echo ''; \
 | 
			
		||||
	    echo 'Name: OpenSSL'; \
 | 
			
		||||
	    echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
 | 
			
		||||
	    echo 'Version: '$(VERSION); \
 | 
			
		||||
	    echo 'Requires: '; \
 | 
			
		||||
	    echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
 | 
			
		||||
	    echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
 | 
			
		||||
 | 
			
		||||
Makefile: Makefile.org
 | 
			
		||||
	@echo "Makefile is older than Makefile.org."
 | 
			
		||||
	@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
 | 
			
		||||
	@false
 | 
			
		||||
 | 
			
		||||
libclean:
 | 
			
		||||
	rm -f *.a */lib */*/lib
 | 
			
		||||
	rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
 | 
			
		||||
clean:	libclean
 | 
			
		||||
	rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
 | 
			
		||||
	@for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
@@ -530,7 +631,8 @@ clean:
 | 
			
		||||
		rm -f $(LIBS); \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	rm -f *.a *.o speed.* *.map *.so .pure core
 | 
			
		||||
	rm -f openssl.pc
 | 
			
		||||
	rm -f speed.* .pure
 | 
			
		||||
	rm -f $(TARFILE)
 | 
			
		||||
	@for i in $(ONEDIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
@@ -542,7 +644,7 @@ makefile.one: files
 | 
			
		||||
	sh util/do_ms.sh
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
 | 
			
		||||
	@for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
@@ -552,16 +654,19 @@ files:
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
links:
 | 
			
		||||
	@$(TOP)/util/point.sh Makefile.ssl Makefile
 | 
			
		||||
	@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
 | 
			
		||||
	@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
 | 
			
		||||
	@for i in $(DIRS); do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(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; \
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
gentests:
 | 
			
		||||
	@(cd test && echo "generating dummy tests (if needed)..." && \
 | 
			
		||||
	$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' 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:
 | 
			
		||||
	rm -f *.bak
 | 
			
		||||
	@for i in $(DIRS) ;\
 | 
			
		||||
@@ -574,10 +679,14 @@ dclean:
 | 
			
		||||
 | 
			
		||||
rehash: rehash.time
 | 
			
		||||
rehash.time: certs
 | 
			
		||||
	@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
 | 
			
		||||
	@(OPENSSL="`pwd`/apps/openssl$(EXE_EXT)"; OPENSSL_DEBUG_MEMORY=on; \
 | 
			
		||||
		export OPENSSL OPENSSL_DEBUG_MEMORY; \
 | 
			
		||||
		LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
 | 
			
		||||
		export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
 | 
			
		||||
		LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
 | 
			
		||||
		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; \
 | 
			
		||||
		$(PERL) tools/c_rehash certs)
 | 
			
		||||
	touch rehash.time
 | 
			
		||||
 | 
			
		||||
@@ -585,9 +694,13 @@ test:   tests
 | 
			
		||||
 | 
			
		||||
tests: rehash
 | 
			
		||||
	@(cd test && echo "testing..." && \
 | 
			
		||||
	$(MAKE) CC='${CC}' CFLAG='${CFLAG}' 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}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' OPENSSL_DEBUG_MEMORY=on tests );
 | 
			
		||||
	@LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
 | 
			
		||||
		export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
 | 
			
		||||
	$(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`:$$LD_LIBRARY_PATH"; \
 | 
			
		||||
	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; \
 | 
			
		||||
	apps/openssl version -a
 | 
			
		||||
 | 
			
		||||
report:
 | 
			
		||||
@@ -598,7 +711,7 @@ depend:
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making dependencies $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' depend ) || exit 1; \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
@@ -612,13 +725,8 @@ lint:
 | 
			
		||||
	done;
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	@for i in $(DIRS) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	if [ -d "$$i" ]; then \
 | 
			
		||||
		(cd $$i && echo "making tags $$i..." && \
 | 
			
		||||
		$(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	rm -f TAGS
 | 
			
		||||
	find . -name '[^.]*.[ch]' | xargs etags -a
 | 
			
		||||
 | 
			
		||||
errors:
 | 
			
		||||
	$(PERL) util/mkerr.pl -recurse -write
 | 
			
		||||
@@ -638,19 +746,31 @@ crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
 | 
			
		||||
crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
 | 
			
		||||
	$(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
 | 
			
		||||
 | 
			
		||||
apps/openssl-vms.cnf: apps/openssl.cnf
 | 
			
		||||
	$(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
 | 
			
		||||
 | 
			
		||||
TABLE: Configure
 | 
			
		||||
	(echo 'Output of `Configure TABLE'"':"; \
 | 
			
		||||
	$(PERL) Configure TABLE) > TABLE
 | 
			
		||||
 | 
			
		||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
 | 
			
		||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE
 | 
			
		||||
 | 
			
		||||
# Build distribution tar-file. As the list of files returned by "find" is
 | 
			
		||||
# pretty long, on several platforms a "too many arguments" error or similar
 | 
			
		||||
# would occur. Therefore the list of files is temporarily stored into a file
 | 
			
		||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
 | 
			
		||||
# tar does not support the --files-from option.
 | 
			
		||||
tar:
 | 
			
		||||
	@$(TAR) $(TARFLAGS) -cvf - \
 | 
			
		||||
		`find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
 | 
			
		||||
	find . -type d -print | xargs chmod 755
 | 
			
		||||
	find . -type f -print | xargs chmod a+r
 | 
			
		||||
	find . -type f -perm -0100 -print | xargs chmod a+x
 | 
			
		||||
	find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
 | 
			
		||||
	$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
 | 
			
		||||
	tardy --user_number=0  --user_name=openssl \
 | 
			
		||||
	      --group_number=0 --group_name=openssl \
 | 
			
		||||
	      --prefix=openssl-$(VERSION) - |\
 | 
			
		||||
	gzip --best >../$(TARFILE).gz; \
 | 
			
		||||
	rm -f ../$(TARFILE).list; \
 | 
			
		||||
	ls -l ../$(TARFILE).gz
 | 
			
		||||
 | 
			
		||||
tar-snap:
 | 
			
		||||
@@ -665,19 +785,21 @@ dist:
 | 
			
		||||
	$(PERL) Configure dist
 | 
			
		||||
	@$(MAKE) dist_pem_h
 | 
			
		||||
	@$(MAKE) SDIRS='${SDIRS}' clean
 | 
			
		||||
	@$(MAKE) tar
 | 
			
		||||
	@$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
 | 
			
		||||
 | 
			
		||||
dist_pem_h:
 | 
			
		||||
	(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
 | 
			
		||||
 | 
			
		||||
install: all install_docs
 | 
			
		||||
install: all install_docs install_sw
 | 
			
		||||
 | 
			
		||||
install_sw:
 | 
			
		||||
	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
 | 
			
		||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
 | 
			
		||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
 | 
			
		||||
		$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/private \
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/lib
 | 
			
		||||
		$(INSTALL_PREFIX)$(OPENSSLDIR)/private
 | 
			
		||||
	@for i in $(EXHEADER) ;\
 | 
			
		||||
	do \
 | 
			
		||||
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 | 
			
		||||
@@ -694,9 +816,14 @@ install: all install_docs
 | 
			
		||||
	do \
 | 
			
		||||
		if [ -f "$$i" ]; then \
 | 
			
		||||
		(       echo installing $$i; \
 | 
			
		||||
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
			$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
			chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
			
		||||
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
			if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
 | 
			
		||||
				: ; \
 | 
			
		||||
			else \
 | 
			
		||||
				$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
			fi; \
 | 
			
		||||
			chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
			mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
			
		||||
		fi; \
 | 
			
		||||
	done;
 | 
			
		||||
	@if [ -n "$(SHARED_LIBS)" ]; then \
 | 
			
		||||
@@ -706,21 +833,42 @@ install: all install_docs
 | 
			
		||||
			if [ -f "$$i" -o -f "$$i.a" ]; then \
 | 
			
		||||
			(       echo installing $$i; \
 | 
			
		||||
				if [ "$(PLATFORM)" != "Cygwin" ]; then \
 | 
			
		||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
					chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
				else \
 | 
			
		||||
					c=`echo $$i | sed 's/^lib/cyg/'`; \
 | 
			
		||||
					cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
					c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
 | 
			
		||||
					cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
			
		||||
					chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
 | 
			
		||||
					mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
				fi ); \
 | 
			
		||||
			fi; \
 | 
			
		||||
		done; \
 | 
			
		||||
		(	here="`pwd`"; \
 | 
			
		||||
			cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
			make -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
 | 
			
		||||
	@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:
 | 
			
		||||
	@$(PERL) $(TOP)/util/mkdir-p.pl \
 | 
			
		||||
@@ -728,23 +876,45 @@ install_docs:
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man3 \
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man5 \
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man7
 | 
			
		||||
	@for i in doc/apps/*.pod; do \
 | 
			
		||||
	@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
 | 
			
		||||
	here="`pwd`"; \
 | 
			
		||||
	filecase=; \
 | 
			
		||||
	if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
 | 
			
		||||
		filecase=-i; \
 | 
			
		||||
	fi; \
 | 
			
		||||
	for i in doc/apps/*.pod; do \
 | 
			
		||||
		fn=`basename $$i .pod`; \
 | 
			
		||||
		if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
 | 
			
		||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
			
		||||
		(cd `dirname $$i`; \
 | 
			
		||||
		$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
 | 
			
		||||
			 --release=$(VERSION) `basename $$i`) \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
			
		||||
	done
 | 
			
		||||
	@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
			
		||||
		echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
 | 
			
		||||
		(cd `$(PERL) util/dirname.pl $$i`; \
 | 
			
		||||
		sh -c "$$pod2man \
 | 
			
		||||
			--section=$$sec --center=OpenSSL \
 | 
			
		||||
			--release=$(VERSION) `basename $$i`") \
 | 
			
		||||
			>  $(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; \
 | 
			
		||||
	for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
			
		||||
		fn=`basename $$i .pod`; \
 | 
			
		||||
		if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
 | 
			
		||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
			
		||||
		(cd `dirname $$i`; \
 | 
			
		||||
		$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
 | 
			
		||||
			--release=$(VERSION) `basename $$i`) \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
			
		||||
		echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
 | 
			
		||||
		(cd `$(PERL) util/dirname.pl $$i`; \
 | 
			
		||||
		sh -c "$$pod2man \
 | 
			
		||||
			--section=$$sec --center=OpenSSL \
 | 
			
		||||
			--release=$(VERSION) `basename $$i`") \
 | 
			
		||||
			>  $(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
 | 
			
		||||
 | 
			
		||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										106
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										106
									
								
								NEWS
									
									
									
									
									
								
							@@ -5,6 +5,48 @@
 | 
			
		||||
  This file gives a brief overview of the major changes between each OpenSSL
 | 
			
		||||
  release. For more details please read the CHANGES file.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e:
 | 
			
		||||
 | 
			
		||||
      o Fix race condition in CRL checking code.
 | 
			
		||||
      o Fixes to PKCS#7 (S/MIME) code.
 | 
			
		||||
 | 
			
		||||
  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 X509 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:
 | 
			
		||||
 | 
			
		||||
      o New library section OCSP.
 | 
			
		||||
@@ -17,13 +59,21 @@
 | 
			
		||||
        a separate distribution.
 | 
			
		||||
      o New elliptic curve library section.
 | 
			
		||||
      o New AES (Rijndael) library section.
 | 
			
		||||
      o Support for new platforms: Windows CE, Tandem OSS, A/UX, AIX 64-bit,
 | 
			
		||||
        Linux x86_64, Linux 64-bit on Sparc v9
 | 
			
		||||
      o Extended support for some platforms: VxWorks
 | 
			
		||||
      o Enhanced support for shared libraries.
 | 
			
		||||
      o Now only builds PIC code when shared library support is requested.
 | 
			
		||||
      o Support for pkg-config.
 | 
			
		||||
      o Lots of new manuals.
 | 
			
		||||
      o Makes symbolic links to or copies of manuals to cover all described
 | 
			
		||||
        functions.
 | 
			
		||||
      o Change DES API to clean up the namespace (some applications link also
 | 
			
		||||
        against libdes providing similar functions having the same name).
 | 
			
		||||
        Provide macros for backward compatibility (will be removed in the
 | 
			
		||||
        future).
 | 
			
		||||
      o Unifiy handling of cryptographic algorithms (software and
 | 
			
		||||
        engine) to be available via EVP routines for asymmetric and
 | 
			
		||||
        symmetric ciphers.
 | 
			
		||||
      o Unify handling of cryptographic algorithms (software and engine)
 | 
			
		||||
        to be available via EVP routines for asymmetric and symmetric ciphers.
 | 
			
		||||
      o NCONF: new configuration handling routines.
 | 
			
		||||
      o Change API to use more 'const' modifiers to improve error checking
 | 
			
		||||
        and help optimizers.
 | 
			
		||||
@@ -31,14 +81,60 @@
 | 
			
		||||
      o Reworked parts of the BIGNUM code.
 | 
			
		||||
      o Support for new engines: Broadcom ubsec, Accelerated Encryption
 | 
			
		||||
        Processing, IBM 4758.
 | 
			
		||||
      o A few new engines added in the demos area.
 | 
			
		||||
      o Extended and corrected OID (object identifier) table.
 | 
			
		||||
      o PRNG: query at more locations for a random device, automatic query for
 | 
			
		||||
        EGD style random sources at several locations.
 | 
			
		||||
      o SSL/TLS: allow optional cipher choice according to server's preference.
 | 
			
		||||
      o SSL/TLS: allow server to explicitly set new session ids.
 | 
			
		||||
      o SSL/TLS: support Kerberos cipher suites (RFC2712).
 | 
			
		||||
	Only supports MIT Kerberos for now.
 | 
			
		||||
      o SSL/TLS: allow more precise control of renegotiations and sessions.
 | 
			
		||||
      o SSL/TLS: add callback to retrieve SSL/TLS messages.
 | 
			
		||||
      o SSL/TLS: add draft AES ciphersuites (disabled unless explicitly requested).
 | 
			
		||||
      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:
 | 
			
		||||
 | 
			
		||||
      o New configuration targets for Tandem OSS and A/UX.
 | 
			
		||||
      o New OIDs for Microsoft attributes.
 | 
			
		||||
      o Better handling of SSL session caching.
 | 
			
		||||
      o Better comparison of distinguished names.
 | 
			
		||||
      o Better handling of shared libraries in a mixed GNU/non-GNU environment.
 | 
			
		||||
      o Support assembler code with Borland C.
 | 
			
		||||
      o Fixes for length problems.
 | 
			
		||||
      o Fixes for uninitialised variables.
 | 
			
		||||
      o Fixes for memory leaks, some unusual crashes and some race conditions.
 | 
			
		||||
      o Fixes for smaller building problems.
 | 
			
		||||
      o Updates of manuals, FAQ and other instructive documents.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g:
 | 
			
		||||
 | 
			
		||||
      o Important building fixes on Unix.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f:
 | 
			
		||||
 | 
			
		||||
      o Various important bugfixes.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e:
 | 
			
		||||
 | 
			
		||||
      o Important security related bugfixes.
 | 
			
		||||
      o Various SSL/TLS library bugfixes.
 | 
			
		||||
 | 
			
		||||
  Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
 | 
			
		||||
 | 
			
		||||
@@ -91,7 +187,7 @@
 | 
			
		||||
      o Bug fixes for Win32, HP/UX and Irix.
 | 
			
		||||
      o Bug fixes in BIGNUM, SSL, PKCS#7, PKCS#12, X.509, CONF and
 | 
			
		||||
        memory checking routines.
 | 
			
		||||
      o Bug fixes for RSA operations in threaded enviroments.
 | 
			
		||||
      o Bug fixes for RSA operations in threaded environments.
 | 
			
		||||
      o Bug fixes in misc. openssl applications.
 | 
			
		||||
      o Remove a few potential memory leaks.
 | 
			
		||||
      o Add tighter checks of BIGNUM routines.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										131
									
								
								PROBLEMS
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										131
									
								
								PROBLEMS
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,131 @@
 | 
			
		||||
* System libcrypto.dylib and libssl.dylib are used by system ld on MacOS X.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    NOTE: The problem described here only applies when OpenSSL isn't built
 | 
			
		||||
    with shared library support (i.e. without the "shared" configuration
 | 
			
		||||
    option).  If you build with shared library support, you will have no
 | 
			
		||||
    problems as long as you set up DYLD_LIBRARY_PATH properly at all times.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
This is really a misfeature in ld, which seems to look for .dylib libraries
 | 
			
		||||
along the whole library path before it bothers looking for .a libraries.  This
 | 
			
		||||
means that -L switches won't matter unless OpenSSL is built with shared
 | 
			
		||||
library support.
 | 
			
		||||
 | 
			
		||||
The workaround may be to change the following lines in apps/Makefile and
 | 
			
		||||
test/Makefile:
 | 
			
		||||
 | 
			
		||||
  LIBCRYPTO=-L.. -lcrypto
 | 
			
		||||
  LIBSSL=-L.. -lssl
 | 
			
		||||
 | 
			
		||||
to:
 | 
			
		||||
 | 
			
		||||
  LIBCRYPTO=../libcrypto.a
 | 
			
		||||
  LIBSSL=../libssl.a
 | 
			
		||||
 | 
			
		||||
It's possible that something similar is needed for shared library support
 | 
			
		||||
as well.  That hasn't been well tested yet.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Another solution that many seem to recommend is to move the libraries
 | 
			
		||||
/usr/lib/libcrypto.0.9.dylib, /usr/lib/libssl.0.9.dylib to a different
 | 
			
		||||
directory, build and install OpenSSL and anything that depends on your
 | 
			
		||||
build, then move libcrypto.0.9.dylib and libssl.0.9.dylib back to their
 | 
			
		||||
original places.  Note that the version numbers on those two libraries
 | 
			
		||||
may differ on your machine.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
As long as Apple doesn't fix the problem with ld, this problem building
 | 
			
		||||
OpenSSL will remain as is.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Parallell make leads to errors
 | 
			
		||||
 | 
			
		||||
While running tests, running a parallell make is a bad idea.  Many test
 | 
			
		||||
scripts use the same name for output and input files, which means different
 | 
			
		||||
will interfere with each other and lead to test failure.
 | 
			
		||||
 | 
			
		||||
The solution is simple for now: don't run parallell make when testing.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Bugs in gcc 3.0 triggered
 | 
			
		||||
 | 
			
		||||
According to a problem report, there are bugs in gcc 3.0 that are
 | 
			
		||||
triggered by some of the code in OpenSSL, more specifically in
 | 
			
		||||
PEM_get_EVP_CIPHER_INFO().  The triggering code is the following:
 | 
			
		||||
 | 
			
		||||
	header+=11;
 | 
			
		||||
	if (*header != '4') return(0); header++;
 | 
			
		||||
	if (*header != ',') return(0); header++;
 | 
			
		||||
 | 
			
		||||
What happens is that gcc might optimize a little too agressively, and
 | 
			
		||||
you end up with an extra incrementation when *header != '4'.
 | 
			
		||||
 | 
			
		||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
 | 
			
		||||
 | 
			
		||||
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
 | 
			
		||||
 | 
			
		||||
As subject suggests SHA-1 might perform poorly (4 times slower)
 | 
			
		||||
if compiled with WorkShop 6 compiler and -xarch=v9. The cause for
 | 
			
		||||
this seems to be the fact that compiler emits multiplication to
 | 
			
		||||
perform shift operations:-( To work the problem around configure
 | 
			
		||||
with './Configure solaris64-sparcv9-cc -DMD32_REG_T=int'.
 | 
			
		||||
 | 
			
		||||
* 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.
 | 
			
		||||
							
								
								
									
										29
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								README
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
 | 
			
		||||
 OpenSSL 0.9.8-dev XX xxx XXXX
 | 
			
		||||
 OpenSSL 0.9.7e 25 Oct 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
 | 
			
		||||
 All rights reserved.
 | 
			
		||||
 | 
			
		||||
@@ -122,6 +122,13 @@
 | 
			
		||||
 lists the functions; you will probably have to look at the code to work out
 | 
			
		||||
 how to use them. Look at the example programs.
 | 
			
		||||
 | 
			
		||||
 PROBLEMS
 | 
			
		||||
 --------
 | 
			
		||||
 | 
			
		||||
 For some platforms, there are some known problems that may affect the user
 | 
			
		||||
 or application author.  We try to collect those in doc/PROBLEMS, with current
 | 
			
		||||
 thoughts on how they should be solved in a future of OpenSSL.
 | 
			
		||||
 | 
			
		||||
 SUPPORT 
 | 
			
		||||
 -------
 | 
			
		||||
 | 
			
		||||
@@ -146,11 +153,13 @@
 | 
			
		||||
    - Problem Description (steps that will reproduce the problem, if known)
 | 
			
		||||
    - Stack Traceback (if the application dumps core)
 | 
			
		||||
 | 
			
		||||
 Report the bug to the OpenSSL project at:
 | 
			
		||||
 Report the bug to the OpenSSL project via the Request Tracker
 | 
			
		||||
 (http://www.openssl.org/support/rt2.html) by mail to:
 | 
			
		||||
 | 
			
		||||
    openssl-bugs@openssl.org
 | 
			
		||||
 | 
			
		||||
 Note that mail to openssl-bugs@openssl.org is forwarded to a public
 | 
			
		||||
 Note that mail to openssl-bugs@openssl.org is recorded in the publicly
 | 
			
		||||
 readable request tracker database and is forwarded to a public
 | 
			
		||||
 mailing list. Confidential mail may be sent to openssl-security@openssl.org
 | 
			
		||||
 (PGP key available from the key servers).
 | 
			
		||||
 | 
			
		||||
@@ -164,9 +173,17 @@
 | 
			
		||||
 textual explanation of what your patch does.
 | 
			
		||||
 | 
			
		||||
 Note: For legal reasons, contributions from the US can be accepted only
 | 
			
		||||
 if a copy of the patch is sent to crypt@bxa.doc.gov
 | 
			
		||||
 if a TSU notification and a copy of the patch are sent to crypt@bis.doc.gov
 | 
			
		||||
 (formerly BXA) with a copy to the ENC Encryption Request Coordinator;
 | 
			
		||||
 please take some time to look at
 | 
			
		||||
    http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic]
 | 
			
		||||
 and
 | 
			
		||||
    http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e))
 | 
			
		||||
 for the details. If "your encryption source code is too large to serve as
 | 
			
		||||
 an email attachment", they are glad to receive it by fax instead; hope you
 | 
			
		||||
 have a cheap long-distance plan.
 | 
			
		||||
 | 
			
		||||
 The preferred format for changes is "diff -u" output. You might
 | 
			
		||||
 Our preferred format for changes is "diff -u" output. You might
 | 
			
		||||
 generate it like this:
 | 
			
		||||
 | 
			
		||||
 # cd openssl-work
 | 
			
		||||
 
 | 
			
		||||
@@ -154,7 +154,7 @@
 | 
			
		||||
    shared-library that contains the ENGINE implementation, and "NO_VCHECK"
 | 
			
		||||
    might possibly be useful if there is a minor version conflict and you
 | 
			
		||||
    (or a vendor helpdesk) is convinced you can safely ignore it.
 | 
			
		||||
    "ENGINE_ID" is probably only needed if a shared-library implements
 | 
			
		||||
    "ID" is probably only needed if a shared-library implements
 | 
			
		||||
    multiple ENGINEs, but if you know the engine id you expect to be using,
 | 
			
		||||
    it doesn't hurt to specify it (and this provides a sanity check if
 | 
			
		||||
    nothing else). "LIST_ADD" is only required if you actually wish the
 | 
			
		||||
@@ -174,7 +174,7 @@
 | 
			
		||||
 | 
			
		||||
       ENGINE *e = ENGINE_by_id("dynamic");
 | 
			
		||||
       ENGINE_ctrl_cmd_string(e, "SO_PATH", "/lib/libfoo.so", 0);
 | 
			
		||||
       ENGINE_ctrl_cmd_string(e, "ENGINE_ID", "foo", 0);
 | 
			
		||||
       ENGINE_ctrl_cmd_string(e, "ID", "foo", 0);
 | 
			
		||||
       ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
 | 
			
		||||
       ENGINE_ctrl_cmd_string(e, "CMD_FOO", "some input data", 0);
 | 
			
		||||
 | 
			
		||||
@@ -184,7 +184,7 @@
 | 
			
		||||
 | 
			
		||||
       openssl engine dynamic \
 | 
			
		||||
                 -pre SO_PATH:/lib/libfoo.so \
 | 
			
		||||
                 -pre ENGINE_ID:foo \
 | 
			
		||||
                 -pre ID:foo \
 | 
			
		||||
                 -pre LOAD \
 | 
			
		||||
                 -pre "CMD_FOO:some input data"
 | 
			
		||||
 | 
			
		||||
@@ -192,7 +192,7 @@
 | 
			
		||||
 | 
			
		||||
       openssl engine -vvvv dynamic \
 | 
			
		||||
                 -pre SO_PATH:/lib/libfoo.so \
 | 
			
		||||
                 -pre ENGINE_ID:foo \
 | 
			
		||||
                 -pre ID:foo \
 | 
			
		||||
                 -pre LOAD
 | 
			
		||||
 | 
			
		||||
    Applications that support the ENGINE API and more specifically, the
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										27
									
								
								STATUS
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								STATUS
									
									
									
									
									
								
							@@ -1,10 +1,24 @@
 | 
			
		||||
 | 
			
		||||
  OpenSSL STATUS                           Last modified at
 | 
			
		||||
  ______________                           $Date: 2002/05/16 10:01:53 $
 | 
			
		||||
  ______________                           $Date: 2004/03/17 12:01:16 $
 | 
			
		||||
 | 
			
		||||
  DEVELOPMENT STATE
 | 
			
		||||
 | 
			
		||||
    o  OpenSSL 0.9.7:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.8:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.7d: Released on March     17th, 2004
 | 
			
		||||
    o  OpenSSL 0.9.7c: Released on September 30th, 2003
 | 
			
		||||
    o  OpenSSL 0.9.7b: Released on April     10th, 2003
 | 
			
		||||
    o  OpenSSL 0.9.7a: Released on February  19th, 2003
 | 
			
		||||
    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.6f: Released on August     8th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6e: Released on July      30th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6d: Released on May        9th, 2002
 | 
			
		||||
    o  OpenSSL 0.9.6c: Released on December  21st, 2001
 | 
			
		||||
    o  OpenSSL 0.9.6b: Released on July       9th, 2001
 | 
			
		||||
@@ -22,8 +36,7 @@
 | 
			
		||||
 | 
			
		||||
  RELEASE SHOWSTOPPERS
 | 
			
		||||
 | 
			
		||||
    o BN_mod_mul verification fails for mips3-sgi-irix
 | 
			
		||||
      unless configured with no-asm
 | 
			
		||||
    o 
 | 
			
		||||
 | 
			
		||||
  AVAILABLE PATCHES
 | 
			
		||||
 | 
			
		||||
@@ -46,9 +59,8 @@
 | 
			
		||||
	UTIL (a new set of library functions to support some higher level
 | 
			
		||||
	      functionality that is currently missing).
 | 
			
		||||
	Shared library support for VMS.
 | 
			
		||||
	Kerberos 5 authentication
 | 
			
		||||
	Kerberos 5 authentication (Heimdal)
 | 
			
		||||
	Constification
 | 
			
		||||
	OCSP
 | 
			
		||||
 | 
			
		||||
  NEEDS PATCH
 | 
			
		||||
 | 
			
		||||
@@ -58,9 +70,6 @@
 | 
			
		||||
 | 
			
		||||
  OPEN ISSUES
 | 
			
		||||
 | 
			
		||||
    o  Do we want the EVP API changes in 0.9.7?
 | 
			
		||||
       Can compatibility be improved?
 | 
			
		||||
 | 
			
		||||
    o  The Makefile hierarchy and build mechanism is still not a round thing:
 | 
			
		||||
 | 
			
		||||
       1. The config vs. Configure scripts
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								VMS/VMSify-conf.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								VMS/VMSify-conf.pl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
#! /usr/bin/perl
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
use warnings;
 | 
			
		||||
 | 
			
		||||
my @directory_vars = ( "dir", "certs", "crl_dir", "new_certs_dir" );
 | 
			
		||||
my @file_vars = ( "database", "certificate", "serial", "crlnumber",
 | 
			
		||||
		  "crl", "private_key", "RANDFILE" );
 | 
			
		||||
while(<STDIN>) {
 | 
			
		||||
    chomp;
 | 
			
		||||
    foreach my $d (@directory_vars) {
 | 
			
		||||
	if (/^(\s*\#?\s*${d}\s*=\s*)\.\/([^\s\#]*)([\s\#].*)$/) {
 | 
			
		||||
	    $_ = "$1sys\\\$disk:\[.$2$3";
 | 
			
		||||
	} elsif (/^(\s*\#?\s*${d}\s*=\s*)(\w[^\s\#]*)([\s\#].*)$/) {
 | 
			
		||||
	    $_ = "$1sys\\\$disk:\[.$2$3";
 | 
			
		||||
	}
 | 
			
		||||
	s/^(\s*\#?\s*${d}\s*=\s*\$\w+)\/([^\s\#]*)([\s\#].*)$/$1.$2\]$3/;
 | 
			
		||||
	while(/^(\s*\#?\s*${d}\s*=\s*(\$\w+\.|sys\\\$disk:\[\.)[\w\.]+)\/([^\]]*)\](.*)$/) {
 | 
			
		||||
	    $_ = "$1.$3]$4";
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
    foreach my $f (@file_vars) {
 | 
			
		||||
	s/^(\s*\#?\s*${f}\s*=\s*)\.\/(.*)$/$1sys\\\$disk:\[\/$2/;
 | 
			
		||||
	while(/^(\s*\#?\s*${f}\s*=\s*(\$\w+|sys\\\$disk:\[)[^\/]*)\/(\w+\/[^\s\#]*)([\s\#].*)$/) {
 | 
			
		||||
	    $_ = "$1.$3$4";
 | 
			
		||||
	}
 | 
			
		||||
	if (/^(\s*\#?\s*${f}\s*=\s*(\$\w+|sys\\\$disk:\[)[^\/]*)\/(\w+)([\s\#].*)$/) {
 | 
			
		||||
	    $_ = "$1]$3.$4";
 | 
			
		||||
	} elsif  (/^(\s*\#?\s*${f}\s*=\s*(\$\w+|sys\\\$disk:\[)[^\/]*)\/([^\s\#]*)([\s\#].*)$/) {
 | 
			
		||||
	    $_ = "$1]$3$4";
 | 
			
		||||
	}
 | 
			
		||||
   }
 | 
			
		||||
    print $_,"\n";
 | 
			
		||||
}
 | 
			
		||||
@@ -1,477 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
#pragma module HOSTADDR "X-1"
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
** Copyright (c) 2000 Compaq Computer Corporation
 | 
			
		||||
** COMPAQ Registered in U.S. Patent and Trademark Office.
 | 
			
		||||
**
 | 
			
		||||
** Confidential computer software. Valid license from Compaq or
 | 
			
		||||
** authorized sublicensor required for possession, use or copying.
 | 
			
		||||
** Consistent with FAR 12.211 and 12.212, Commercial Computer Software,
 | 
			
		||||
** Computer Software Documentation, and Technical Data for Commercial
 | 
			
		||||
** Items are licensed to the U.S. Government under vendor's standard
 | 
			
		||||
** commercial license.
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**++
 | 
			
		||||
**
 | 
			
		||||
**  FACILITY:  Apache Web Server
 | 
			
		||||
**
 | 
			
		||||
**  ABSTRACT:
 | 
			
		||||
**
 | 
			
		||||
**	This program determine the hostaddr of the default node or of
 | 
			
		||||
**	a given hostname.
 | 
			
		||||
**
 | 
			
		||||
**	The command line syntax is:
 | 
			
		||||
**
 | 
			
		||||
**	    HOSTADDR [-l log-name] [-s sym-name] [host-name]
 | 
			
		||||
**
 | 
			
		||||
**	where:
 | 
			
		||||
**
 | 
			
		||||
**	    -l log-name	    specifies an optional logical name to receive hostname.
 | 
			
		||||
**
 | 
			
		||||
**	    -c sym-name	    specifies an optional symbol name to receive hostname.
 | 
			
		||||
**
 | 
			
		||||
**	    host-name	    specifies an optional host name to resolve.
 | 
			
		||||
**
 | 
			
		||||
**  AUTHOR:  Matthew Doremus			CREATION DATE:  07-Jul-2000
 | 
			
		||||
**
 | 
			
		||||
**  Modification History:
 | 
			
		||||
**
 | 
			
		||||
**	X-1	Matthew Doremus				07-Jul-2000
 | 
			
		||||
**		Initial development
 | 
			
		||||
**
 | 
			
		||||
**--
 | 
			
		||||
**
 | 
			
		||||
**  Compile/Link instructions:
 | 
			
		||||
**
 | 
			
		||||
**	OpenVMS Alpha/VAX:
 | 
			
		||||
**	    $ CC HOSTADDR+SYS$LIBRARY:SYS$LIB_C/LIBRARY
 | 
			
		||||
**	    $ LINK HOSTADDR
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Define __NEW_STARLET if it's not already defined
 | 
			
		||||
*/
 | 
			
		||||
#ifndef __NEW_STARLET
 | 
			
		||||
#define __NEW_STARLET
 | 
			
		||||
#define __NEW_STARLET_SET
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Include the necessary header files
 | 
			
		||||
*/
 | 
			
		||||
#include <lib$routines>
 | 
			
		||||
#include <libclidef>
 | 
			
		||||
#include <descrip>
 | 
			
		||||
#include <stdlib>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <stdio>
 | 
			
		||||
#include <netdb>
 | 
			
		||||
#include <in>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Undefine __NEW_STARLET if we had defined it
 | 
			
		||||
*/
 | 
			
		||||
#ifndef __NEW_STARLET_SET
 | 
			
		||||
#undef  __NEW_STARLET_SET
 | 
			
		||||
#undef  __NEW_STARLET
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Option Data Structure
 | 
			
		||||
*/
 | 
			
		||||
typedef struct _opt_data {
 | 
			
		||||
    char		*log_name;
 | 
			
		||||
    char		*sym_name;
 | 
			
		||||
    char		*host_name; 
 | 
			
		||||
    } OPT_DATA;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Local Routine Prototypes
 | 
			
		||||
*/
 | 
			
		||||
static void 
 | 
			
		||||
ParseCmdLine (
 | 
			
		||||
    int,
 | 
			
		||||
    char *[],
 | 
			
		||||
    OPT_DATA *);
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SetLogName (
 | 
			
		||||
    char *,
 | 
			
		||||
    char *);
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SetSymName (
 | 
			
		||||
    char *,
 | 
			
		||||
    char *);
 | 
			
		||||
 | 
			
		||||
static void 
 | 
			
		||||
Usage ();
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  main - Main processing routine for the HOSTADDR utility
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**	This routine controls overall program execution.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      main argc, argv, envp
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      argc 		- (IN) argument count
 | 
			
		||||
**      argv         	- (IN) address of an argument array 
 | 
			
		||||
**      envp         	- (IN) address of an environment string 
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
int
 | 
			
		||||
main (
 | 
			
		||||
    int		argc,
 | 
			
		||||
    char	*argv[],
 | 
			
		||||
    char	*envp[]
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
struct in_addr *addr_ptr;
 | 
			
		||||
char hostname[512+1];
 | 
			
		||||
struct hostent *hp;
 | 
			
		||||
OPT_DATA OptData;
 | 
			
		||||
char *hostaddr;
 | 
			
		||||
int addr_max,
 | 
			
		||||
    i;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Parse the command line
 | 
			
		||||
*/
 | 
			
		||||
ParseCmdLine (argc, argv, &OptData);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** If no host name was given, then use gethostname otherwise
 | 
			
		||||
** use the host name given.
 | 
			
		||||
*/
 | 
			
		||||
if (! OptData.host_name)
 | 
			
		||||
    {
 | 
			
		||||
    if (gethostname (hostname, sizeof (hostname) - 1))
 | 
			
		||||
        {
 | 
			
		||||
        perror ("gethostname");
 | 
			
		||||
        exit (1);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
else
 | 
			
		||||
    strcpy (hostname, OptData.host_name);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Get the host address using gethostbyname
 | 
			
		||||
*/
 | 
			
		||||
if (! (hp = gethostbyname (hostname)))
 | 
			
		||||
    {
 | 
			
		||||
    perror ("gethostbyname");
 | 
			
		||||
    exit (1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Format the host address(es) into a comma separated list
 | 
			
		||||
*/
 | 
			
		||||
addr_max = hp->h_length / sizeof (struct in_addr);
 | 
			
		||||
hostaddr = malloc ((addr_max * (15 + 1)) + 1);
 | 
			
		||||
addr_ptr = (struct in_addr *) hp->h_addr;
 | 
			
		||||
for (i = 0; i < addr_max; i++)
 | 
			
		||||
    {
 | 
			
		||||
    if (i > 0)
 | 
			
		||||
	strcat (hostaddr, ",");
 | 
			
		||||
    addr_ptr = addr_ptr + (i * sizeof (struct in_addr));
 | 
			
		||||
    sprintf (hostaddr + strlen (hostaddr), "%d.%d.%d.%d",
 | 
			
		||||
	addr_ptr->s_net, addr_ptr->s_host, 
 | 
			
		||||
	addr_ptr->s_lh, addr_ptr->s_impno);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Define a logical name if one was provided
 | 
			
		||||
*/
 | 
			
		||||
if (OptData.log_name)
 | 
			
		||||
    SetLogName (OptData.log_name, hostaddr);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Define a symbol name if one was provided
 | 
			
		||||
*/
 | 
			
		||||
if (OptData.sym_name)
 | 
			
		||||
    SetSymName (OptData.sym_name, hostaddr);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** print the host address if no logical or symbol name was provided
 | 
			
		||||
*/
 | 
			
		||||
if (! OptData.log_name && ! OptData.sym_name)
 | 
			
		||||
    printf ("%s\n", hostaddr);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  ParseCmdLine - Parse the command line options
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine parses the command line options.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      ParseCmdLine argc, argv, OptData
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      argc 		- (IN) argument count
 | 
			
		||||
**      argv         	- (IN) address of an argument array 
 | 
			
		||||
**      OptData		- (OUT) address of command option data structure 
 | 
			
		||||
**			  which will contain the parsed input.
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
ParseCmdLine (
 | 
			
		||||
    int			argc,
 | 
			
		||||
    char		*argv[],
 | 
			
		||||
    OPT_DATA		*OptData
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
int option,
 | 
			
		||||
    i;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Initialize the option data
 | 
			
		||||
*/
 | 
			
		||||
OptData->log_name = NULL;
 | 
			
		||||
OptData->sym_name = NULL;
 | 
			
		||||
OptData->host_name = NULL;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Process the command line options
 | 
			
		||||
*/
 | 
			
		||||
while ((option = getopt (argc, argv, "l:s:?")) != EOF) 
 | 
			
		||||
    {
 | 
			
		||||
    switch (option) 
 | 
			
		||||
	{
 | 
			
		||||
	/* 
 | 
			
		||||
	** Output to logical name ?
 | 
			
		||||
	*/
 | 
			
		||||
	case 'l':
 | 
			
		||||
	    OptData->log_name = strdup (optarg);
 | 
			
		||||
	    break;
 | 
			
		||||
 | 
			
		||||
	/* 
 | 
			
		||||
	** Output to symbol name ?
 | 
			
		||||
	*/
 | 
			
		||||
	case 's':
 | 
			
		||||
	    OptData->sym_name = strdup (optarg);
 | 
			
		||||
	    break;
 | 
			
		||||
 | 
			
		||||
	/* 
 | 
			
		||||
	** Invalid argument ?
 | 
			
		||||
	*/
 | 
			
		||||
	case '?':
 | 
			
		||||
	default:
 | 
			
		||||
	    Usage ();
 | 
			
		||||
	    exit (1);
 | 
			
		||||
	    break;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Are the number of parameters correct ?
 | 
			
		||||
*/
 | 
			
		||||
if (argc - optind > 1)
 | 
			
		||||
    {
 | 
			
		||||
    Usage ();
 | 
			
		||||
    exit (1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Host Name provided ?
 | 
			
		||||
*/
 | 
			
		||||
if (argc - optind == 1)
 | 
			
		||||
    OptData->host_name = strdup (argv[optind]);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  SetLogName - Set a logical name & value
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine sets a logical name & value.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      SetLogName LogName, LogValue
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      LogName		- (IN) address of the logical name
 | 
			
		||||
**      LogValue       	- (IN) address of the logical value
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
SetLogName (
 | 
			
		||||
    char 		*LogName,
 | 
			
		||||
    char		*LogValue
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
struct dsc$descriptor_s log_nam_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
struct dsc$descriptor_s log_val_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
int status;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Setup the logical name & value descriptors
 | 
			
		||||
*/
 | 
			
		||||
log_nam_desc.dsc$w_length = strlen (LogName);
 | 
			
		||||
log_nam_desc.dsc$a_pointer = LogName;
 | 
			
		||||
log_val_desc.dsc$w_length = strlen (LogValue);
 | 
			
		||||
log_val_desc.dsc$a_pointer = LogValue;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Set the logical name & value
 | 
			
		||||
*/
 | 
			
		||||
status = lib$set_logical (&log_nam_desc, &log_val_desc, 0, 0, 0);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    exit (status);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  SetSymName - Set a symbol name & value
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine sets a symbol name & value.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      SetSymName SymName, SymValue
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      SymName		- (IN) address of the symbol name
 | 
			
		||||
**      SymValue       	- (IN) address of the Symbol value
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
SetSymName (
 | 
			
		||||
    char 		*SymName,
 | 
			
		||||
    char		*SymValue
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
struct dsc$descriptor_s sym_nam_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
struct dsc$descriptor_s sym_val_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
int status;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Setup the symbol name & value descriptors
 | 
			
		||||
*/
 | 
			
		||||
sym_nam_desc.dsc$w_length = strlen (SymName);
 | 
			
		||||
sym_nam_desc.dsc$a_pointer = SymName;
 | 
			
		||||
sym_val_desc.dsc$w_length = strlen (SymValue);
 | 
			
		||||
sym_val_desc.dsc$a_pointer = SymValue;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Set the symbol name & value
 | 
			
		||||
*/
 | 
			
		||||
status = lib$set_symbol (&sym_nam_desc, &sym_val_desc, &LIB$K_CLI_LOCAL_SYM);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    exit (status);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  Usage - Display the acceptable unix style command usage
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine displays to standard output the appropriate unix style 
 | 
			
		||||
**	command usage.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      Usage 
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
Usage ()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
fprintf (stdout, "Usage: HOSTADDR [-l log-name] [-s sym-name] [host-name]\n");
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif    /* #ifdef VMS */
 | 
			
		||||
@@ -1,513 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
#pragma module HOSTNAME "X-1"
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
** Copyright (c) 2000 Compaq Computer Corporation
 | 
			
		||||
** COMPAQ Registered in U.S. Patent and Trademark Office.
 | 
			
		||||
**
 | 
			
		||||
** Confidential computer software. Valid license from Compaq or
 | 
			
		||||
** authorized sublicensor required for possession, use or copying.
 | 
			
		||||
** Consistent with FAR 12.211 and 12.212, Commercial Computer Software,
 | 
			
		||||
** Computer Software Documentation, and Technical Data for Commercial
 | 
			
		||||
** Items are licensed to the U.S. Government under vendor's standard
 | 
			
		||||
** commercial license.
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**++
 | 
			
		||||
**
 | 
			
		||||
**  FACILITY:  Apache Web Server
 | 
			
		||||
**
 | 
			
		||||
**  ABSTRACT:
 | 
			
		||||
**
 | 
			
		||||
**	This program determine the hostname of the default node or of
 | 
			
		||||
**	a given hostaddr.
 | 
			
		||||
**
 | 
			
		||||
**	The command line syntax is:
 | 
			
		||||
**
 | 
			
		||||
**	    HOSTNAME [-l log-name] [-s sym-name] [host-addr]
 | 
			
		||||
**
 | 
			
		||||
**	where:
 | 
			
		||||
**
 | 
			
		||||
**	    -l log-name	    specifies an optional logical name to receive hostname.
 | 
			
		||||
**
 | 
			
		||||
**	    -c sym-name	    specifies an optional symbol name to receive hostname.
 | 
			
		||||
**
 | 
			
		||||
**	    host-addr	    specifies an optional host address to resolve.
 | 
			
		||||
**
 | 
			
		||||
**  AUTHOR:  Matthew Doremus			CREATION DATE:  07-Jul-2000
 | 
			
		||||
**
 | 
			
		||||
**  Modification History:
 | 
			
		||||
**
 | 
			
		||||
**	X-1	Matthew Doremus				07-Jul-2000
 | 
			
		||||
**		Initial development
 | 
			
		||||
**
 | 
			
		||||
**--
 | 
			
		||||
**
 | 
			
		||||
**  Compile/Link instructions:
 | 
			
		||||
**
 | 
			
		||||
**	OpenVMS Alpha/VAX:
 | 
			
		||||
**	    $ CC HOSTNAME+SYS$LIBRARY:SYS$LIB_C/LIBRARY
 | 
			
		||||
**	    $ LINK HOSTNAME
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Define __NEW_STARLET if it's not already defined
 | 
			
		||||
*/
 | 
			
		||||
#ifndef __NEW_STARLET
 | 
			
		||||
#define __NEW_STARLET
 | 
			
		||||
#define __NEW_STARLET_SET
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Include the necessary header files
 | 
			
		||||
*/
 | 
			
		||||
#include <lib$routines>
 | 
			
		||||
#include <libclidef>
 | 
			
		||||
#include <descrip>
 | 
			
		||||
#include <stdlib>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <stdio>
 | 
			
		||||
#include <netdb>
 | 
			
		||||
#include <in>
 | 
			
		||||
#include <socket>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Undefine __NEW_STARLET if we had defined it
 | 
			
		||||
*/
 | 
			
		||||
#ifndef __NEW_STARLET_SET
 | 
			
		||||
#undef  __NEW_STARLET_SET
 | 
			
		||||
#undef  __NEW_STARLET
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Option Data Structure
 | 
			
		||||
*/
 | 
			
		||||
typedef struct _opt_data {
 | 
			
		||||
    char		*log_name;
 | 
			
		||||
    char		*sym_name;
 | 
			
		||||
    unsigned char	host_addr[4]; 
 | 
			
		||||
    } OPT_DATA;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Local Routine Prototypes
 | 
			
		||||
*/
 | 
			
		||||
static void 
 | 
			
		||||
ParseCmdLine (
 | 
			
		||||
    int,
 | 
			
		||||
    char *[],
 | 
			
		||||
    OPT_DATA *);
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SetLogName (
 | 
			
		||||
    char *,
 | 
			
		||||
    char *);
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SetSymName (
 | 
			
		||||
    char *,
 | 
			
		||||
    char *);
 | 
			
		||||
 | 
			
		||||
static void 
 | 
			
		||||
Usage ();
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  main - Main processing routine for the HOSTNAME utility
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**	This routine controls overall program execution.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      main argc, argv, envp
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      argc 		- (IN) argument count
 | 
			
		||||
**      argv         	- (IN) address of an argument array 
 | 
			
		||||
**      envp         	- (IN) address of an environment string 
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
int
 | 
			
		||||
main (
 | 
			
		||||
    int		argc,
 | 
			
		||||
    char	*argv[],
 | 
			
		||||
    char	*envp[]
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
struct in_addr host_addr;
 | 
			
		||||
char hostname[512+1];
 | 
			
		||||
struct hostent *hp;
 | 
			
		||||
OPT_DATA OptData;
 | 
			
		||||
int i;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Parse the command line
 | 
			
		||||
*/
 | 
			
		||||
ParseCmdLine (argc, argv, &OptData);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** If no host address was given, then use gethostname otherwise
 | 
			
		||||
** use gethostbyaddr.
 | 
			
		||||
*/
 | 
			
		||||
if (! OptData.host_addr[0] && ! OptData.host_addr[1] && 
 | 
			
		||||
    ! OptData.host_addr[2] && ! OptData.host_addr[3])
 | 
			
		||||
    {
 | 
			
		||||
    if (gethostname (hostname, sizeof (hostname) - 1))
 | 
			
		||||
        {
 | 
			
		||||
        perror ("gethostname");
 | 
			
		||||
        exit (1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    if (! (hp = gethostbyname (hostname)))
 | 
			
		||||
	{
 | 
			
		||||
        perror ("gethostbyname");
 | 
			
		||||
	exit (1);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
else
 | 
			
		||||
    {
 | 
			
		||||
    host_addr.s_net = OptData.host_addr[0];
 | 
			
		||||
    host_addr.s_host = OptData.host_addr[1];
 | 
			
		||||
    host_addr.s_lh = OptData.host_addr[2];
 | 
			
		||||
    host_addr.s_impno = OptData.host_addr[3];
 | 
			
		||||
    	
 | 
			
		||||
    if (! (hp = gethostbyaddr (&host_addr, sizeof (host_addr), AF_INET)))
 | 
			
		||||
	{
 | 
			
		||||
        perror ("gethostbyaddr");
 | 
			
		||||
	exit (1);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Let's try to determine the best available fully qualified hostname.
 | 
			
		||||
*/
 | 
			
		||||
if (hp->h_name)
 | 
			
		||||
    {
 | 
			
		||||
    strcpy (hostname, hp->h_name);
 | 
			
		||||
    if (! strchr (hostname, '.'))
 | 
			
		||||
	{
 | 
			
		||||
	for (i = 0; hp->h_aliases[i]; i++)
 | 
			
		||||
	    {
 | 
			
		||||
	    if (strchr (hp->h_aliases[i], '.') && 
 | 
			
		||||
	        ! strncasecmp (hp->h_aliases[i], hostname, strlen (hostname)))
 | 
			
		||||
		{     
 | 
			
		||||
		strcpy (hostname, hp->h_aliases[i]);
 | 
			
		||||
		break;
 | 
			
		||||
		}
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
else
 | 
			
		||||
    strcpy (hostname, "(unavailable)");
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Define a logical name if one was provided
 | 
			
		||||
*/
 | 
			
		||||
if (OptData.log_name)
 | 
			
		||||
    SetLogName (OptData.log_name, hostname);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Define a symbol name if one was provided
 | 
			
		||||
*/
 | 
			
		||||
if (OptData.sym_name)
 | 
			
		||||
    SetSymName (OptData.sym_name, hostname);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** print the host name if no logical or symbol name was provided
 | 
			
		||||
*/
 | 
			
		||||
if (! OptData.log_name && ! OptData.sym_name)
 | 
			
		||||
    printf ("%s\n", hostname);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  ParseCmdLine - Parse the command line options
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine parses the command line options.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      ParseCmdLine argc, argv, OptData
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      argc 		- (IN) argument count
 | 
			
		||||
**      argv         	- (IN) address of an argument array 
 | 
			
		||||
**      OptData		- (OUT) address of command option data structure 
 | 
			
		||||
**			  which will contain the parsed input.
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
ParseCmdLine (
 | 
			
		||||
    int			argc,
 | 
			
		||||
    char		*argv[],
 | 
			
		||||
    OPT_DATA		*OptData
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
int option,
 | 
			
		||||
    i;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Initialize the option data
 | 
			
		||||
*/
 | 
			
		||||
OptData->log_name = NULL;
 | 
			
		||||
OptData->sym_name = NULL;
 | 
			
		||||
OptData->host_addr[0] = 0;
 | 
			
		||||
OptData->host_addr[1] = 0;
 | 
			
		||||
OptData->host_addr[2] = 0;
 | 
			
		||||
OptData->host_addr[3] = 0;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Process the command line options
 | 
			
		||||
*/
 | 
			
		||||
while ((option = getopt (argc, argv, "l:s:?")) != EOF) 
 | 
			
		||||
    {
 | 
			
		||||
    switch (option) 
 | 
			
		||||
	{
 | 
			
		||||
	/* 
 | 
			
		||||
	** Output to logical name ?
 | 
			
		||||
	*/
 | 
			
		||||
	case 'l':
 | 
			
		||||
	    OptData->log_name = strdup (optarg);
 | 
			
		||||
	    break;
 | 
			
		||||
 | 
			
		||||
	/* 
 | 
			
		||||
	** Output to symbol name ?
 | 
			
		||||
	*/
 | 
			
		||||
	case 's':
 | 
			
		||||
	    OptData->sym_name = strdup (optarg);
 | 
			
		||||
	    break;
 | 
			
		||||
 | 
			
		||||
	/* 
 | 
			
		||||
	** Invalid argument ?
 | 
			
		||||
	*/
 | 
			
		||||
	case '?':
 | 
			
		||||
	default:
 | 
			
		||||
	    Usage ();
 | 
			
		||||
	    exit (1);
 | 
			
		||||
	    break;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Are the number of parameters correct ?
 | 
			
		||||
*/
 | 
			
		||||
if (argc - optind > 1)
 | 
			
		||||
    {
 | 
			
		||||
    Usage ();
 | 
			
		||||
    exit (1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Host Address provided ?
 | 
			
		||||
*/
 | 
			
		||||
if (argc - optind == 1)
 | 
			
		||||
    {
 | 
			
		||||
    char *addr_ptr = argv[optind],
 | 
			
		||||
         *addr_sep;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < 4; i++)
 | 
			
		||||
	{
 | 
			
		||||
        if ((addr_sep = strchr (addr_ptr, '.')) && (i < 3))
 | 
			
		||||
	    *addr_sep = '\0';
 | 
			
		||||
 | 
			
		||||
	if (strlen (addr_ptr) == 0 || atoi (addr_ptr) > 255 ||
 | 
			
		||||
	    strspn (addr_ptr, "0123456789") != strlen (addr_ptr))
 | 
			
		||||
	    {
 | 
			
		||||
	    printf ("Invalid TCP/IP address format.\n");
 | 
			
		||||
	    exit (1);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	OptData->host_addr[i] = atoi (addr_ptr);
 | 
			
		||||
	if (addr_sep)
 | 
			
		||||
	    addr_ptr = addr_sep + 1;
 | 
			
		||||
	}    
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  SetLogName - Set a logical name & value
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine sets a logical name & value.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      SetLogName LogName, LogValue
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      LogName		- (IN) address of the logical name
 | 
			
		||||
**      LogValue       	- (IN) address of the logical value
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
SetLogName (
 | 
			
		||||
    char 		*LogName,
 | 
			
		||||
    char		*LogValue
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
struct dsc$descriptor_s log_nam_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
struct dsc$descriptor_s log_val_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
int status;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Setup the logical name & value descriptors
 | 
			
		||||
*/
 | 
			
		||||
log_nam_desc.dsc$w_length = strlen (LogName);
 | 
			
		||||
log_nam_desc.dsc$a_pointer = LogName;
 | 
			
		||||
log_val_desc.dsc$w_length = strlen (LogValue);
 | 
			
		||||
log_val_desc.dsc$a_pointer = LogValue;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Set the logical name & value
 | 
			
		||||
*/
 | 
			
		||||
status = lib$set_logical (&log_nam_desc, &log_val_desc, 0, 0, 0);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    exit (status);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  SetSymName - Set a symbol name & value
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine sets a symbol name & value.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      SetSymName SymName, SymValue
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      SymName		- (IN) address of the symbol name
 | 
			
		||||
**      SymValue       	- (IN) address of the Symbol value
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
SetSymName (
 | 
			
		||||
    char 		*SymName,
 | 
			
		||||
    char		*SymValue
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
struct dsc$descriptor_s sym_nam_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
struct dsc$descriptor_s sym_val_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
 | 
			
		||||
int status;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Setup the symbol name & value descriptors
 | 
			
		||||
*/
 | 
			
		||||
sym_nam_desc.dsc$w_length = strlen (SymName);
 | 
			
		||||
sym_nam_desc.dsc$a_pointer = SymName;
 | 
			
		||||
sym_val_desc.dsc$w_length = strlen (SymValue);
 | 
			
		||||
sym_val_desc.dsc$a_pointer = SymValue;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Set the symbol name & value
 | 
			
		||||
*/
 | 
			
		||||
status = lib$set_symbol (&sym_nam_desc, &sym_val_desc, &LIB$K_CLI_LOCAL_SYM);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    exit (status);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**
 | 
			
		||||
**  Usage - Display the acceptable unix style command usage
 | 
			
		||||
**
 | 
			
		||||
**  Functional Description:
 | 
			
		||||
**
 | 
			
		||||
**      This routine displays to standard output the appropriate unix style 
 | 
			
		||||
**	command usage.
 | 
			
		||||
**
 | 
			
		||||
**  Usage:
 | 
			
		||||
**
 | 
			
		||||
**      Usage 
 | 
			
		||||
**
 | 
			
		||||
**  Formal parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Implicit Parameters:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Routine Value:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
**  Side Effects:
 | 
			
		||||
**
 | 
			
		||||
**      None
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
static void
 | 
			
		||||
Usage ()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
fprintf (stdout, "Usage: HOSTNAME [-l log-name] [-s sym-name] [host-addr]\n");
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif      /* #ifdef VMS */
 | 
			
		||||
@@ -1,639 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$AUTH_CERT.COM - SSL Certificate Authority procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure prompts the user through creating a Server Certificate.
 | 
			
		||||
$!
 | 
			
		||||
$! There are no parameters used.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ PID = F$GETJPI ("","PID")
 | 
			
		||||
$ TT_NOECHO = F$GETDVI ("TT:","TT_NOECHO")
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = F$GETDVI ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = F$GETDVI ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA := CALL GET_USER_DATA
 | 
			
		||||
$ SET_USER_DATA := CALL SET_USER_DATA
 | 
			
		||||
$ DEL_USER_DATA := CALL DEL_USER_DATA
 | 
			
		||||
$ INIT_TERM := @SSL$COM:SSL$INIT_TERM
 | 
			
		||||
$ SHOW_FILE := @SSL$COM:SSL$SHOW_FILE 
 | 
			
		||||
$ SSL_CONF_FILE = F$TRNLMN ("SSL$CA_CONF")
 | 
			
		||||
$ GET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' GET
 | 
			
		||||
$ SET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' SET
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BLNK = ESC + "[5m"    ! Turn on BLINK Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$CA_CONF") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM
 | 
			
		||||
$ BCOLOR = BGD
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Create Certification Authority"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Reading Configuration ...", NORM
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Initializing Configuration ...", NORM
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ _request_name = "req"
 | 
			
		||||
$!
 | 
			
		||||
$ _distinguished_name = "CA_distinguished_name"
 | 
			
		||||
$ _distinguished_name_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_bits = "1024"
 | 
			
		||||
$ _default_bits_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_days = "1825"
 | 
			
		||||
$ _default_days_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_keyfile = "SSL$KEY:SERVER_CA.KEY"
 | 
			
		||||
$ _default_keyfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_crtfile = "SSL$CRT:SERVER_CA.CRT"
 | 
			
		||||
$ _default_crtfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _countryName_prompt = "Country Name ?"
 | 
			
		||||
$ _countryName_min = "2"
 | 
			
		||||
$ _countryName_max = "2"
 | 
			
		||||
$ _countryName_default = "US"
 | 
			
		||||
$ _countryName_upd = "Y"
 | 
			
		||||
$ _countryName_cnt = 4
 | 
			
		||||
$!
 | 
			
		||||
$ _0organizationName_prompt = "Organization Name ?"
 | 
			
		||||
$ _0organizationName_default = ""
 | 
			
		||||
$ _0organizationName_upd = "Y"
 | 
			
		||||
$ _0organizationName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _organizationalUnitName_prompt = "Organization Unit Name ?"
 | 
			
		||||
$ _organizationalUnitName_default = ""
 | 
			
		||||
$ _organizationalUnitName_upd = "Y"
 | 
			
		||||
$ _organizationalUnitName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _commonName_prompt = "Common Name ?"
 | 
			
		||||
$ _commonName_max = "64"
 | 
			
		||||
$ _commonName_default = "CA Authority"
 | 
			
		||||
$ _commonName_upd = "Y"
 | 
			
		||||
$ _commonName_cnt = 3
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#distinguished_name"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _distinguished_name = SSL_CONF_DATA
 | 
			
		||||
$         _distinguished_name_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_bits"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_bits = SSL_CONF_DATA
 | 
			
		||||
$         _default_bits_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_days"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_days = SSL_CONF_DATA
 | 
			
		||||
$         _default_days_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_keyfile"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_keyfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[KEY]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".KEY",,"TYPE") 
 | 
			
		||||
$         _default_keyfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_crtfile"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_crtfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[CRT]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".CRT",,"TYPE") 
 | 
			
		||||
$         _default_crtfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _countryName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_min"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _countryName_min = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _countryName_max = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _countryName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _countryName_cnt .EQ. CTR THEN _countryName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#0.organizationName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _0organizationName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#0.organizationName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _0organizationName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _0organizationName_cnt .EQ. CTR THEN _0organizationName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#organizationalUnitName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _organizationalUnitName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#organizationalUnitName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _organizationalUnitName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _organizationalUnitName_cnt .EQ. CTR THEN _organizationalUnitName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. "" 
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _commonName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _commonName_max = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _commonName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _commonName_cnt .EQ. CTR THEN _commonName_upd = "N"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SET_USER_DATA "[]#pem_pass_phrase#-##PEM Pass Phrase ?#P#1###Y#Y"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_bits#D#''_default_bits'#Encryption Bits ?#I###''_default_bits_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_days#D#''_default_days'#Default Days ?#I###''_default_days_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_keyfile#D#''_default_keyfile'#CA certificate Key File ?#F###''_default_keyfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_crtfile#D#''_default_crtfile'#CA certificate File ?#F###''_default_crtfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#distinguished_name#D#''_distinguished_name'##S###''_distinguished_name_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#countryName#P#''_countryName_default'#''_countryName_prompt'#S#''_countryName_min'#''_countryName_max'#''_countryName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#0.organizationName#P#''_0organizationName_default'#''_0organizationName_prompt'#S###''_0organizationName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#organizationalUnitName#P#''_organizationalUnitName_default'#''_organizationalUnitName_prompt'#S###''_organizationUnitName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#commonName#P#''_commonName_default'#''_commonName_prompt'#S##''_commonName_max'#''_commonName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#display_certificate#-#N#Display the CA certificate ?#S##1##Y#N"
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Confirm/Update the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input  ?
 | 
			
		||||
$     CONFIRMED = 0
 | 
			
		||||
$     IF REQ .EQS. "N"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ROW .GT. MSG_ROW - 2
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SAY ESC + "[''TOP_ROW';01H", CEOS
 | 
			
		||||
$	  ROW = TOP_ROW
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$CONFIRM_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$     IF PRM .EQS. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''ITM' ? [''DEF'] ''CEOL'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''PRM' [''DEF'] ''CEOL'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /NOECHO
 | 
			
		||||
$     ASK "''PROMPT'" ANS /END_OF_FILE=EXIT
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /ECHO
 | 
			
		||||
$     ANS = F$EDIT (ANS,"TRIM")
 | 
			
		||||
$     IF ANS .EQS. "" THEN ANS = DEF
 | 
			
		||||
$     IF TYP .EQS. "F"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         ANS = F$PARSE ("''ANS'","''DEF'",,,"SYNTAX_ONLY")	  
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "I" .AND. F$TYPE (ANS) .NES. "INTEGER"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF (TYP .EQS. "S" .OR. TYP .EQS. "P") .AND. -
 | 
			
		||||
         ((MIN .NES. "" .AND. F$LENGTH (ANS) .LT. F$INTEGER(MIN)) .OR. -
 | 
			
		||||
          (MAX .NES. "" .AND. F$LENGTH (ANS) .GT. F$INTEGER(MAX)))
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$	  IF TYP .EQS. "S" THEN GOTO PROMPT_LOOP
 | 
			
		||||
$         IF TYP .EQS. "P" THEN GOTO CONFIRM_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     ROW = ROW + 1
 | 
			
		||||
$     IF CFM .EQS. "Y"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         IF CONFIRMED .EQ. 0
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      CONFIRMED = 1
 | 
			
		||||
$	      CONFIRMED_ANS = ANS
 | 
			
		||||
$	      PRM = "Confirm ''PRM'"
 | 
			
		||||
$	      GOTO CONFIRM_LOOP
 | 
			
		||||
$         ELSE
 | 
			
		||||
$	      IF ANS .NES. CONFIRMED_ANS
 | 
			
		||||
$	      THEN 
 | 
			
		||||
$                 CALL INVALID_ENTRY
 | 
			
		||||
$		  ROW = ROW - 2
 | 
			
		||||
$                 SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$                 GOTO PROMPT_LOOP
 | 
			
		||||
$	      ENDIF
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ANS .NES. DEF THEN SSL_USER_DATA_'CTR' = "''KEY'#''ITM'#''VAL'#''ANS'#''PRM'#''TYP'#''MIN'#''MAX'#Y#''REQ'#''CFM'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO PROMPT_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Save the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Saving Configuration ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$SAVE_CONF_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input ?
 | 
			
		||||
$     IF UPD .NES. "Y" .OR. VAL .EQS. "-"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO SAVE_CONF_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "D"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''DEF'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''PRM'"
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'_default" "''DEF'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF MIN .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_min" "''MIN'"
 | 
			
		||||
$     IF MAX .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_max" "''MAX'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO SAVE_CONF_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ PURGE /NOLOG /NOCONFIRM 'SSL_CONF_FILE'
 | 
			
		||||
$ RENAME 'SSL_CONF_FILE'; ;1
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Certificiate Authority
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Creating Certificate Authority ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = 2
 | 
			
		||||
$ Y1 = TOP_ROW
 | 
			
		||||
$ X2 = TT_COLS - 2
 | 
			
		||||
$ Y2 = MSG_ROW - 1
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA "[''_request_name']#default_days"
 | 
			
		||||
$ _default_days = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[''_request_name']#default_keyfile"
 | 
			
		||||
$ _default_keyfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[''_request_name']#default_crtfile"
 | 
			
		||||
$ _default_crtfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#pem_pass_phrase"
 | 
			
		||||
$ _pem_pass_phrase = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#display_certificate"
 | 
			
		||||
$ _display_certificate = SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SHOW SYSTEM /FULL /OUT=SYS$LOGIN:SSL_REQ_'PID'.RND
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE OFILE SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG RANDFILE    SYS$LOGIN:SSL_REQ_''PID'.RND"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$ WRITE OFILE "$ OPENSSL req -config ''SSL_CONF_FILE' -new -x509 -days ''_default_days' -keyout ''_default_keyfile' -out ''_default_crtfile'"
 | 
			
		||||
$ WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$ WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ @SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.RND;*
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SEARCH SYS$LOGIN:SSL_REQ_'PID'.LOG /OUT=SYS$LOGIN:SSL_REQ_'PID'.ERR ":error:"
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.ERR") .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_REQ_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$         SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$         SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$         GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$! 
 | 
			
		||||
$ IF F$EDIT (_display_certificate,"TRIM,UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Generating Output ...", NORM, CEOL
 | 
			
		||||
$!
 | 
			
		||||
$     OPEN /WRITE OFILE SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL x509 -noout -text -in ''_default_crtfile'"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$     @SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$     DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$     SEARCH SYS$LOGIN:SSL_X509_'PID'.LOG /OUT=SYS$LOGIN:SSL_X509_'PID'.ERR ":error:"
 | 
			
		||||
$     IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.ERR") .NES. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_X509_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$         THEN 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$             SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$             SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$             GOTO EXIT
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$     SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ''_default_crtfile' >" 
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$     GOTO EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Press return to continue"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$ PROMPT = ESC + "[''MSG_ROW';''COL'H''TEXT'"
 | 
			
		||||
$ ASK "''PROMPT'" OPT
 | 
			
		||||
$!
 | 
			
		||||
$GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Set the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     SSL_USER_DATA_MAX == 1
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX + 1
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_USER_DATA_'SSL_USER_DATA_MAX' == "''P1'"
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Get the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ USER_KEY = F$ELEMENT (0,"#",P1)
 | 
			
		||||
$ USER_ITM = F$ELEMENT (1,"#",P1)
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     IF USER_KEY .NES. KEY .OR. USER_ITM .NES. ITM
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO GET_USER_DATA_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "-" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "D" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "P" THEN SSL_USER_DATA == "''PRM'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Delete the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. "" THEN GOTO DEL_USER_DATA_END
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_'SSL_USER_DATA_MAX') .NES. "" 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     DELETE /SYMBOL /GLOBAL SSL_USER_DATA_'SSL_USER_DATA_MAX'
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX - 1
 | 
			
		||||
$     GOTO DEL_USER_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /SYMBOL /GLOBAL SSL_USER_DATA_MAX
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_ENTRY: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BELL, " Invalid Entry, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit the procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ DEL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_CONF_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_CONF_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$GETDVI ("TT:","TT_NOECHO") .AND. .NOT. TT_NOECHO THEN SET TERMINAL /ECHO
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.%%%;*") .NES. "" THEN DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.%%%;*
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.%%%;*") .NES. "" THEN DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.%%%;*
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,101 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$AUTO_CERT.COM - SSL Automatic Self-Signed Certificate procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$!
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define Symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! 
 | 
			
		||||
$ OPENSSL       :== $ SSL$EXE:OPENSSL
 | 
			
		||||
$ HOSTNAME      :== $ SSL$EXE:SSL$HOSTNAME
 | 
			
		||||
$!
 | 
			
		||||
$ HOSTNAME -s HOST_NAME
 | 
			
		||||
$ PID = F$GETJPI ("","PID")
 | 
			
		||||
$ USER = F$EDIT (F$GETJPI ("","USERNAME"),"TRIM")
 | 
			
		||||
$ KEY_FILE = "SSL$KEY:SERVER.KEY"
 | 
			
		||||
$ CRT_FILE = "SSL$CRT:SERVER.CRT"
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create a Temporary SSL Configuration
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE CFILE SYS$LOGIN:SSL_'PID'.CNF
 | 
			
		||||
$ WRITE CFILE "[req]"
 | 
			
		||||
$ WRITE CFILE "default_bits = 1024"
 | 
			
		||||
$ WRITE CFILE "distinguished_name = REQ_distinguished_name"
 | 
			
		||||
$ WRITE CFILE "[REQ_distinguished_name]"
 | 
			
		||||
$ WRITE CFILE "countryName = Country Name ?"
 | 
			
		||||
$ WRITE CFILE "countryName_default = "
 | 
			
		||||
$ WRITE CFILE "stateOrProvinceName = State or Province Name ?"
 | 
			
		||||
$ WRITE CFILE "stateOrProvinceName_default = "
 | 
			
		||||
$ WRITE CFILE "localityName = City Name ?"
 | 
			
		||||
$ WRITE CFILE "localityName_default = "
 | 
			
		||||
$ WRITE CFILE "0.organizationName = Organization Name ?"
 | 
			
		||||
$ WRITE CFILE "0.organizationName_default = "
 | 
			
		||||
$ WRITE CFILE "organizationalUnitName = Organization Unit Name ?
 | 
			
		||||
$ WRITE CFILE "organizationalUnitName_default = "
 | 
			
		||||
$ WRITE CFILE "commonName = Common Name ?"
 | 
			
		||||
$ WRITE CFILE "commonName_default = ''HOST_NAME'"
 | 
			
		||||
$ WRITE CFILE "emailAddress = Email Address ?"
 | 
			
		||||
$ WRITE CFILE "emailAddress_default = ''USER'@''HOST_NAME'"
 | 
			
		||||
$ CLOSE CFILE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Self-Signed Server Certificiate
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SHOW SYSTEM /FULL /OUT=SYS$LOGIN:SSL_'PID'.RND
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE OFILE SYS$LOGIN:SSL_'PID'.COM
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG RANDFILE    SYS$LOGIN:SSL_''PID'.RND"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$ WRITE OFILE "$ OPENSSL req -nodes -new -days 30 -x509 -config SYS$LOGIN:SSL_''PID'.CNF -keyout ''KEY_FILE' -out ''CRT_FILE'"
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ @SYS$LOGIN:SSL_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_'PID'.CNF;*
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_'PID'.RND;*
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SEARCH SYS$LOGIN:SSL_'PID'.LOG /OUT=SYS$LOGIN:SSL_'PID'.ERR ":error:"
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_''PID'.ERR") .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         TYPE SYS$LOGIN:SSL_'PID'.LOG
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_'PID'.ERR;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_'PID'.LOG;*
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,231 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$CERT_TOOL.COM - SSL Certificate Tool procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure provides the user a menu from which they can choose desired 
 | 
			
		||||
$! SSL Certificate processing.
 | 
			
		||||
$!
 | 
			
		||||
$! There are no parameters used.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = f$getdvi ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = f$getdvi ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ SET_MENU_DATA := CALL SET_MENU_DATA
 | 
			
		||||
$ DEL_MENU_DATA := CALL DEL_MENU_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BOLD = ESC + "[1m"    ! Turn on BOLD Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$CA_CONF") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Menu Items
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SET_MENU_DATA "View a Certificate#@SSL$COM:SSL$VIEW_CERT.COM CRT"
 | 
			
		||||
$ SET_MENU_DATA "View a Certificate Signing Request#@SSL$COM:SSL$VIEW_CERT.COM CSR"
 | 
			
		||||
$ SET_MENU_DATA "Create a Certificate Signing Request#@SSL$COM:SSL$RQST_CERT.COM"
 | 
			
		||||
$ SET_MENU_DATA "Create a Self-Signed Certificate#@SSL$COM:SSL$SELF_CERT.COM"
 | 
			
		||||
$ SET_MENU_DATA "Create a CA (Certification Authority) Certificate#@SSL$COM:SSL$AUTH_CERT.COM"
 | 
			
		||||
$ SET_MENU_DATA "Sign a Certificate Signing Request#@SSL$COM:SSL$SIGN_CERT.COM"
 | 
			
		||||
$ SET_MENU_DATA "Hash Certificates#@SSL$COM:SSL$HASH_CERT.COM CRT"
 | 
			
		||||
$ SET_MENU_DATA "Hash Certificate Revocations#@SSL$COM:SSL$HASH_CERT.COM CRL"
 | 
			
		||||
$ SET_MENU_DATA "Exit#GOTO EXIT"
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$PAGE_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ BCOLOR = BGD 
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Main Menu"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = (TT_COLS - (SSL_MENU_ITEM_MAX + 4)) / 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ SEP_ROWS = 2
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Process the menu options
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$MENU_LOOP: 
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_MENU_DATA_MAX
 | 
			
		||||
$ THEN
 | 
			
		||||
$     OPT = F$ELEMENT (0,"#",SSL_MENU_DATA_'CTR') ! Option String
 | 
			
		||||
$     CMD = F$ELEMENT (1,"#",SSL_MENU_DATA_'CTR') ! Command String
 | 
			
		||||
$     IF ROW .GE. (MSG_ROW - (SEP_ROWS + 2)) .AND. SEP_ROWS .GT. 1
 | 
			
		||||
$     THEN
 | 
			
		||||
$         SAY ESC + "[''TOP_ROW';01H", CEOS
 | 
			
		||||
$	  ROW = TOP_ROW
 | 
			
		||||
$         SEP_ROWS = 1
 | 
			
		||||
$         CTR = 1
 | 
			
		||||
$     ELSE
 | 
			
		||||
$	  NUM = F$FAO ("!2SL", CTR)
 | 
			
		||||
$         SAY ESC + "[''ROW';''COL'H", BOLD, "''NUM'. ", NORM, "''OPT'"
 | 
			
		||||
$         ROW = ROW + SEP_ROWS
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF	   
 | 
			
		||||
$     GOTO MENU_LOOP
 | 
			
		||||
$ ENDIF    
 | 
			
		||||
$!
 | 
			
		||||
$ ROW = ROW + 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Prompt the user for input
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ PROMPT = ESC + "[''ROW';''COL'HEnter Option: ''CEOL'"
 | 
			
		||||
$ ASK "''PROMPT'" OPT /END_OF_FILE=EXIT
 | 
			
		||||
$ OPT = F$EDIT (OPT, "TRIM")
 | 
			
		||||
$ IF OPT .EQS. ""  THEN GOTO PROMPT_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (OPT) .NES. "INTEGER" .OR. -
 | 
			
		||||
     F$INTEGER (OPT) .LE. 0 .OR. -
 | 
			
		||||
     F$INTEGER (OPT) .GT. SSL_MENU_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     CALL INVALID_OPTION
 | 
			
		||||
$     GOTO PROMPT_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ CMD = F$ELEMENT (1,"#",SSL_MENU_DATA_'OPT')
 | 
			
		||||
$!
 | 
			
		||||
$ 'CMD'
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO PAGE_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Set the Menu Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SET_MENU_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_MENU_DATA_MAX) .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     SSL_MENU_DATA_MAX == 1
 | 
			
		||||
$     SSL_MENU_ITEM_MAX == 0
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SSL_MENU_DATA_MAX == SSL_MENU_DATA_MAX + 1
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_MENU_DATA_'SSL_MENU_DATA_MAX' == "''P1'"
 | 
			
		||||
$!
 | 
			
		||||
$ MENU_ITEM = F$ELEMENT (0,"#",SSL_MENU_DATA_'SSL_MENU_DATA_MAX')
 | 
			
		||||
$ IF F$LENGTH (MENU_ITEM) .GT. SSL_MENU_ITEM_MAX THEN SSL_MENU_ITEM_MAX == F$LENGTH (MENU_ITEM)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Delete the Menu Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$DEL_MENU_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_MENU_DATA_MAX) .EQS. "" THEN GOTO DEL_MENU_DATA_END
 | 
			
		||||
$!
 | 
			
		||||
$DEL_MENU_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_MENU_DATA_'SSL_MENU_DATA_MAX') .NES. "" 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     DELETE /SYMBOL /GLOBAL SSL_MENU_DATA_'SSL_MENU_DATA_MAX'
 | 
			
		||||
$     SSL_MENU_DATA_MAX == SSL_MENU_DATA_MAX - 1
 | 
			
		||||
$     GOTO DEL_MENU_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /SYMBOL /GLOBAL SSL_MENU_DATA_MAX
 | 
			
		||||
$!
 | 
			
		||||
$DEL_MENU_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_MENU_ITEM_MAX) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_MENU_ITEM_MAX
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_OPTION: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BELL, " Invalid Option, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEL_MENU_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,220 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$CONF_UTIL.COM - SSL Configuration Utility procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure gets or sets a given key item in a SSL configuration file.
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- SSL Configuration File
 | 
			
		||||
$! 	P2	- SSL Configuration Function (i.e. GET/SET)
 | 
			
		||||
$! 	P3	- SSL Configuration Key/Item (delimited by '#')
 | 
			
		||||
$! 	P4	- SSL Configuration Key/Item Value (for SET function only)
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_CONF_DATA == ""
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Process parameters
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ KEY_FOUND = 0
 | 
			
		||||
$ ITM_FOUND = 0
 | 
			
		||||
$ P1 = F$EDIT (P1,"TRIM")
 | 
			
		||||
$ P2 = F$EDIT (P2,"TRIM,UPCASE")
 | 
			
		||||
$ KEY = F$ELEMENT (0,"#",P3)
 | 
			
		||||
$ ITM = F$ELEMENT (1,"#",P3)
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Process the configuration function
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF P2 .EQS. "GET" THEN GOSUB GET_CONF_DATA
 | 
			
		||||
$ IF P2 .EQS. "SET" THEN GOSUB SET_CONF_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Get the configuration data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$GET_CONF_DATA:
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /READ /ERROR=OPEN_ERROR IFILE 'P1'
 | 
			
		||||
$!
 | 
			
		||||
$GET_CONF_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ READ /ERROR=READ_ERROR /END_OF_FILE=GET_CONF_DATA_END IFILE IREC
 | 
			
		||||
$!
 | 
			
		||||
$ SREC = IREC
 | 
			
		||||
$ IPOS = F$LOCATE ("#",IREC)
 | 
			
		||||
$ IF IPOS .NE. F$LENGTH (IREC) THEN IREC = F$EXTRACT (0,IPOS,IREC)
 | 
			
		||||
$ IREC = F$EDIT (IREC,"COLLAPSE")
 | 
			
		||||
 | 
			
		||||
$ IF IREC .EQS. "" THEN GOTO GET_CONF_DATA_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$ IF IREC .EQS. KEY 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     KEY_FOUND = 1
 | 
			
		||||
$     GOTO GET_CONF_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF KEY_FOUND .EQ. 1
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$EXTRACT (0,1,IREC) .EQS. "[" .AND. F$EXTRACT (F$LENGTH (IREC)-1,1,IREC) .EQS. "]"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         SSL_CONF_DATA == ""
 | 
			
		||||
$         GOTO GET_CONF_DATA_END
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     IF ITM .EQS. F$EDIT (F$ELEMENT (0,"=",IREC),"TRIM")
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         VAL = F$EDIT (F$ELEMENT (1,"=",SREC),"TRIM")
 | 
			
		||||
$         SSL_CONF_DATA == "''VAL'"
 | 
			
		||||
$         GOTO GET_CONF_DATA_END
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO GET_CONF_DATA_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$GET_CONF_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ CLOSE /ERROR=CLOSE_ERROR IFILE
 | 
			
		||||
$!
 | 
			
		||||
$ RETURN
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Set the configuration data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SET_CONF_DATA:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''P1'") .EQS. "" THEN CREATE /NOLOG 'P1'
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /READ  /ERROR=OPEN_ERROR IFILE 'P1'
 | 
			
		||||
$ OPEN /WRITE /ERROR=OPEN_ERROR OFILE 'P1'
 | 
			
		||||
$!
 | 
			
		||||
$SET_CONF_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ READ /ERROR=READ_ERROR /END_OF_FILE=SET_CONF_DATA_END IFILE IREC
 | 
			
		||||
$!
 | 
			
		||||
$ IF ITM_FOUND .EQ. 1
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     WRITE /ERROR=WRITE_ERROR OFILE IREC
 | 
			
		||||
$     GOTO SET_CONF_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SREC = IREC
 | 
			
		||||
$ IPOS = F$LOCATE ("#",IREC)
 | 
			
		||||
$ IF IPOS .NE. F$LENGTH (IREC) THEN IREC = F$EXTRACT (0,IPOS,IREC)
 | 
			
		||||
$ IREC = F$EDIT (IREC,"COLLAPSE")
 | 
			
		||||
$!
 | 
			
		||||
$ IF IREC .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     WRITE /ERROR=WRITE_ERROR OFILE SREC
 | 
			
		||||
$     GOTO SET_CONF_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF IREC .EQS. KEY 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     KEY_FOUND = 1
 | 
			
		||||
$     WRITE /ERROR=WRITE_ERROR OFILE SREC
 | 
			
		||||
$     GOTO SET_CONF_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF KEY_FOUND .EQ. 1
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$EXTRACT (0,1,IREC) .EQS. "[" .AND. F$EXTRACT (F$LENGTH (IREC)-1,1,IREC) .EQS. "]"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         WRITE /ERROR=WRITE_ERROR OFILE "''ITM' = ''P4'"
 | 
			
		||||
$         WRITE /ERROR=WRITE_ERROR OFILE SREC
 | 
			
		||||
$         ITM_FOUND = 1
 | 
			
		||||
$         GOTO SET_CONF_DATA_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     IF ITM .EQS. F$EDIT (F$ELEMENT (0,"=",IREC),"TRIM")
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         WRITE /ERROR=WRITE_ERROR OFILE "''ITM' = ''P4'"
 | 
			
		||||
$         ITM_FOUND = 1
 | 
			
		||||
$         GOTO SET_CONF_DATA_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ WRITE /ERROR=WRITE_ERROR OFILE SREC
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO SET_CONF_DATA_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$SET_CONF_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF KEY_FOUND .EQ. 0 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     WRITE /ERROR=WRITE_ERROR OFILE "''KEY'"
 | 
			
		||||
$     WRITE /ERROR=WRITE_ERROR OFILE "''ITM' = ''P4'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF KEY_FOUND .EQ. 1 .AND. ITM_FOUND .EQ. 0
 | 
			
		||||
$ THEN
 | 
			
		||||
$     WRITE /ERROR=WRITE_ERROR OFILE "''ITM' = ''P4'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ CLOSE IFILE
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ RETURN
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! File Errors
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$OPEN_ERROR:
 | 
			
		||||
$!
 | 
			
		||||
$ SAY "Open error for file ''P1' ... aborting ''P2'"
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$READ_ERROR:
 | 
			
		||||
$!
 | 
			
		||||
$ SAY "Read error for file ''P1' ... aborting ''P2'"
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$WRITE_ERROR:
 | 
			
		||||
$!
 | 
			
		||||
$ SAY "Write error for file ''P1' ... aborting ''P2'"
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$CLOSE_ERROR:
 | 
			
		||||
$!
 | 
			
		||||
$ SAY "Close error for file ''P1' ... aborting ''P2'"
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE IFILE
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT 1
 | 
			
		||||
@@ -1,109 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$DRAW_BOX.COM - SSL Draw Box procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure draws a box with the specified coordinates.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- X1 coordinate
 | 
			
		||||
$! 	P2	- Y1 coordinate
 | 
			
		||||
$! 	P3	- X2 coordinate
 | 
			
		||||
$! 	P4	- Y3 coordinate
 | 
			
		||||
$! 	P5	- Box Header (Optional)
 | 
			
		||||
$! 	P6	- Box Footer (Optional)
 | 
			
		||||
$! 	P7	- Fill Box (Optional)
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ FILL_BOX := @SSL$COM:SSL$FILL_BOX
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ GRPH_ON[0,8] = 14	! Turn GRAPHICS mode On 
 | 
			
		||||
$ GRPH_OFF[0,8] = 15	! Turn GRAPHICS mode Off
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BOLD = ESC + "[1m"    ! Turn on BOLD Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Draw the box
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = F$INTEGER (P1)
 | 
			
		||||
$ Y1 = F$INTEGER (P2)
 | 
			
		||||
$ X2 = F$INTEGER (P3)
 | 
			
		||||
$ Y2 = F$INTEGER (P4)
 | 
			
		||||
$!
 | 
			
		||||
$ ROW = Y1 + 1
 | 
			
		||||
$ COL = X1 + 1
 | 
			
		||||
$ SIDE1 = X1
 | 
			
		||||
$ SIDE2 = X2 + 1
 | 
			
		||||
$ TOP = "l" + F$FAO("!#*q", x2 - x1) + "k"
 | 
			
		||||
$ BOT = "m" + F$FAO("!#*q", x2 - x1) + "j"
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''Y1';''X1'H", BOLD, GRPH_ON, TOP, GRPH_OFF, NORM
 | 
			
		||||
$!
 | 
			
		||||
$SIDES:
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''ROW';''SIDE1'H",BOLD,GRPH_ON,"x",GRPH_OFF,NORM
 | 
			
		||||
$ SAY ESC + "[''ROW';''SIDE2'H",BOLD,GRPH_ON,"x",GRPH_OFF,NORM
 | 
			
		||||
$!
 | 
			
		||||
$ IF ROW .LT. Y2
 | 
			
		||||
$ THEN
 | 
			
		||||
$     ROW = ROW + 1
 | 
			
		||||
$     GOTO SIDES
 | 
			
		||||
$ ENDIF  
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''Y2';''X1'H", BOLD, GRPH_ON, BOT, GRPH_OFF, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ IF P5 .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$LENGTH(P5) .GT. X2 - X1
 | 
			
		||||
$     THEN 
 | 
			
		||||
$	  HEADER = F$EXTRACT (0, (X2 - X1 - 4), P5)
 | 
			
		||||
$     ELSE
 | 
			
		||||
$	  HEADER = P5
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     COL = X1 + ((X2 - X1 - F$LENGTH(HEADER)) / 2)
 | 
			
		||||
$     SAY ESC + "[''Y1';''COL'H''BOLD'''HEADER'''NORM'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P6 .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$LENGTH(P6) .GT. X2 - X1
 | 
			
		||||
$     THEN 
 | 
			
		||||
$	  FOOTER = F$EXTRACT (0, (X2 - X1 - 4), P6)
 | 
			
		||||
$     ELSE
 | 
			
		||||
$	  FOOTER = P6
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     COL = X1 + ((X2 - X1 - F$LENGTH(FOOTER)) / 2)
 | 
			
		||||
$     SAY ESC + "[''Y2';''COL'H''BOLD'''FOOTER'''NORM'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P7 .EQS. "" .OR. P7 .EQS. "Y" THEN FILL_BOX 'X1' 'Y1' 'X2' 'Y2'
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
EXIT
 | 
			
		||||
@@ -1,65 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$FILL_BOX.COM - SSL Fill Box procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure draws a box with the specified coordinates.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- X1 coordinate
 | 
			
		||||
$! 	P2	- Y1 coordinate
 | 
			
		||||
$! 	P3	- X2 coordinate
 | 
			
		||||
$! 	P4	- Y2 coordinate
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Draw the box
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = F$INTEGER (P1)
 | 
			
		||||
$ Y1 = F$INTEGER (P2)
 | 
			
		||||
$ X2 = F$INTEGER (P3)
 | 
			
		||||
$ Y2 = F$INTEGER (P4)
 | 
			
		||||
$!
 | 
			
		||||
$ ROW = Y1 + 1
 | 
			
		||||
$ COL = X1 + 1
 | 
			
		||||
$ FILL = F$FAO("!#* ", X2 - X1)
 | 
			
		||||
$!
 | 
			
		||||
$FILL_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF ROW .LT. Y2
 | 
			
		||||
$ THEN
 | 
			
		||||
$     SAY ESC + "[''ROW';''COL'H",FILL
 | 
			
		||||
$     ROW = ROW + 1
 | 
			
		||||
$     GOTO FILL_LOOP
 | 
			
		||||
$ ENDIF  
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,235 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$HASH_CERT.COM - SSL Hash Certificate procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure prompts the user through hashing Certificates.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- Certificate or Certificate Revocation List (i.e. "CRT" or "CRL")
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = F$GETDVI ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = F$GETDVI ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM := @SSL$COM:SSL$INIT_TERM
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BLNK = ESC + "[5m"    ! Turn on BLINK Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM
 | 
			
		||||
$ BCOLOR = BGD
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRT"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     TEXT = "Hash Certification Authorities"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     TEXT = "Hash Certificate Revocations"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRT"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     PRM = "Certificate Path:"
 | 
			
		||||
$     DEF = "SSL$CRT:*.CRT"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRL"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     PRM = "Certificate Revocation Path:"
 | 
			
		||||
$     DEF = "SSL$CRT:*.CRL"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Confirm/Update the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ PROMPT = ESC + "[''ROW';''COL'H''PRM' ? [''DEF'] ''CEOL'"
 | 
			
		||||
$ ASK "''PROMPT'" _hash_path_name
 | 
			
		||||
$ _hash_path_name = F$EDIT (_hash_path_name,"TRIM")
 | 
			
		||||
$ IF _hash_path_name .EQS. "" THEN _hash_path_name = DEF
 | 
			
		||||
$!
 | 
			
		||||
$ HASH_DEV = F$PARSE (_hash_path_name,DEF,,"DEVICE")
 | 
			
		||||
$ HASH_DIR = F$PARSE (_hash_path_name,DEF,,"DIRECTORY")
 | 
			
		||||
$ HASH_NAM = F$PARSE (_hash_path_name,DEF,,"NAME")
 | 
			
		||||
$ HASH_TYP = F$PARSE (_hash_path_name,DEF,,"TYPE")
 | 
			
		||||
$ _hash_path_name = HASH_DEV + HASH_DIR + HASH_NAM + HASH_TYP
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Certificiate Hashes 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRT"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Hashing Certificate Authorities ...", NORM, CEOL
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRL"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Hashing Certificate Revocations ...", NORM, CEOL
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''HASH_DEV'''HASH_DIR'DELETE_HASH_FILES.COM") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$    @'HASH_DEV''HASH_DIR'DELETE_HASH_FILES.COM
 | 
			
		||||
$    DELETE 'HASH_DEV''HASH_DIR'DELETE_HASH_FILES.COM;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 0
 | 
			
		||||
$!     
 | 
			
		||||
$ OPEN /WRITE OFILE 'HASH_DEV''HASH_DIR'DELETE_HASH_FILES.COM
 | 
			
		||||
$!
 | 
			
		||||
$CERT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ CERT_FILE = F$SEARCH ("''_hash_path_name'", 1)
 | 
			
		||||
$ IF CERT_FILE .EQS. "" THEN GOTO CERT_END
 | 
			
		||||
$ CTR = CTR + 1
 | 
			
		||||
$!
 | 
			
		||||
$ CALL HASH_CERT 'P1' 'CERT_FILE'
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO CERT_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$CERT_END:
 | 
			
		||||
$!
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .EQ. 0 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     TEXT = "No files found, Press return to continue"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     TEXT = "Press return to continue"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .EQ. 0 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY BELL, ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ PROMPT = ESC + "[''MSG_ROW';''COL'H''TEXT'"
 | 
			
		||||
$ ASK "''PROMPT'" OPT
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Hash Certificate Subroutine
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$HASH_CERT: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRT"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     HASH_SUFF = ""
 | 
			
		||||
$     HASH_FUNC = "$SSL$EXE:OPENSSL X509 -HASH -NOOUT -IN"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     HASH_SUFF = "R"
 | 
			
		||||
$     HASH_FUNC = "$SSL$EXE:OPENSSL CRL -HASH -NOOUT -IN"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ PIPE HASH_FUNC 'P2' | (READ SYS$INPUT VAL ; DEFINE/NOLOG/JOB HASH_VAL &VAL)
 | 
			
		||||
$ HASH_VAL = F$TRNLNM ("HASH_VAL")
 | 
			
		||||
$ DEASSIGN /JOB HASH_VAL
 | 
			
		||||
$!
 | 
			
		||||
$ IDX = 0
 | 
			
		||||
$!
 | 
			
		||||
$IDX_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ HASH_FILE = "''HASH_DEV'''HASH_DIR'''HASH_VAL'.''HASH_SUFF'''IDX'"
 | 
			
		||||
$ IF F$SEARCH ("''HASH_FILE'") .NES. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IDX = IDX + 1
 | 
			
		||||
$     GOTO IDX_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ COPY 'P2' 'HASH_FILE'
 | 
			
		||||
$ WRITE OFILE "$ DELETE ''HASH_FILE';*"
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBOUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit the procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,61 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$INIT_ENV.COM - SSL Initialize Environment
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure sets up the SSL environment logicals & symbols.
 | 
			
		||||
$!
 | 
			
		||||
$! P1 = Mode of the logicals (ie - "/SYSTEM/EXECUTIVE_MODE").
 | 
			
		||||
$!      Note - if P1 is not passed in, P1 will default to PROCESS.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialization 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$    WRITE SYS$OUTPUT " "
 | 
			
		||||
$    WRITE SYS$OUTPUT " SSL-E-ERROR, SSL has not been started."
 | 
			
		||||
$    WRITE SYS$OUTPUT " "
 | 
			
		||||
$    WRITE SYS$OUTPUT " Execute the command procedure, SYS$STARTUP:SSL$STARTUP.COM, and then try this procedure again."
 | 
			
		||||
$    WRITE SYS$OUTPUT " "
 | 
			
		||||
$    EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$    P1 = "/PROCESS"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define logicals
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE 'P1 	SSL$CA_CONF	SSL$ROOT:[CONF]SSL$CA.CNF
 | 
			
		||||
$ DEFINE 'P1 	SSL$CONF	SSL$ROOT:[CONF]SSL$CERT.CNF
 | 
			
		||||
$ DEFINE 'P1 	SSL$COM		SSL$ROOT:[COM]
 | 
			
		||||
$ DEFINE 'P1	SSL$CRT		SSL$ROOT:[CERTS]
 | 
			
		||||
$ DEFINE 'P1 	SSL$CSR		SSL$ROOT:[CERTS]
 | 
			
		||||
$ DEFINE 'P1 	SSL$KEY		SSL$ROOT:[CERTS]
 | 
			
		||||
$ DEFINE 'P1 	SSL$DB		SSL$ROOT:[PRIVATE]
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define foreign symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ OPENSSL	:== $ SSL$EXE:OPENSSL
 | 
			
		||||
$ HOSTADDR	:== $ SSL$EXE:SSL$HOSTADDR
 | 
			
		||||
$ HOSTNAME	:== $ SSL$EXE:SSL$HOSTNAME
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,55 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$INIT_TERM.COM - SSL Initialize Terminal procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure initializes the terminal attributes.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ EDIT := EDIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the terminal with TPU
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SSL$COM:SSL$EXIT_CMD.TPU") .EQS. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     OPEN /WRITE OFILE SSL$COM:SSL$EXIT_CMD.TPU
 | 
			
		||||
$     WRITE OFILE "EXIT"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$INPUT  SYS$COMMAND
 | 
			
		||||
$ EDIT /TPU /COMMAND=OPENSS$COM:SSL$EXIT_CMD.TPU
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,230 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$PICK_FILE.COM - SSL Pick File procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure display the contents of a given file in a box size specified.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- File Spec to Parse
 | 
			
		||||
$! 	P2	- X1 coordinate
 | 
			
		||||
$! 	P3	- Y1 coordinate
 | 
			
		||||
$! 	P4	- X2 coordinate
 | 
			
		||||
$! 	P5	- Y3 coordinate
 | 
			
		||||
$! 	P6	- File Pick Header (Optional)
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_FILE_NAME == ""
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ DRAW_BOX := @SSL$COM:SSL$DRAW_BOX
 | 
			
		||||
$ FILL_BOX := @SSL$COM:SSL$FILL_BOX
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BOLD = ESC + "[1m"    ! Turn on BOLD Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ P1 = F$EDIT (P1, "TRIM")
 | 
			
		||||
$ P2 = F$INTEGER (P2)
 | 
			
		||||
$ P3 = F$INTEGER (P3)
 | 
			
		||||
$ P4 = F$INTEGER (P4)
 | 
			
		||||
$ P5 = F$INTEGER (P5)
 | 
			
		||||
$ FILE_MAX = 0
 | 
			
		||||
$!
 | 
			
		||||
$SEARCH_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ FILE = F$SEARCH ("''P1'",1)
 | 
			
		||||
$ IF FILE .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF FILE_MAX .EQ. 1
 | 
			
		||||
$     THEN
 | 
			
		||||
$         IF FILE_1 .EQS. FILE THEN GOTO SEARCH_END
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     FILE_MAX = FILE_MAX + 1
 | 
			
		||||
$     FILE_'FILE_MAX' = FILE
 | 
			
		||||
$     GOTO SEARCH_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$SEARCH_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF FILE_MAX .EQ. 0 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     DRAW_BOX 'P2' 'P3' 'P4' 'P5' "''P6'" " No Files Found, Press Return to Exit "
 | 
			
		||||
$     INPUT_ROW = P5 + 1
 | 
			
		||||
$     PROMPT = ESC + "[''INPUT_ROW';01H ''CEOL'"
 | 
			
		||||
$     ASK "''PROMPT'" OPT
 | 
			
		||||
$     GOTO EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ COL = P2 + 2
 | 
			
		||||
$ ROW = P3 + 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ INPUT_ROW = P5 + 1
 | 
			
		||||
$ BOX_WIDTH = P4 - (P2 + 2)
 | 
			
		||||
$ BOX_HEIGHT = P5 - (P3 + 3)
 | 
			
		||||
$!
 | 
			
		||||
$ FILE_CTR = 1
 | 
			
		||||
$ PAGE_CTR = 1
 | 
			
		||||
$ PAGE_'PAGE_CTR'_FILE_CTR = FILE_CTR
 | 
			
		||||
$ FILES_PER_PAGE = BOX_HEIGHT
 | 
			
		||||
$ PAGE_MAX = FILE_MAX / FILES_PER_PAGE
 | 
			
		||||
$ IF PAGE_MAX * FILES_PER_PAGE .LT. FILE_MAX THEN PAGE_MAX = PAGE_MAX + 1
 | 
			
		||||
$!
 | 
			
		||||
$ DRAW_BOX 'P2' 'P3' 'P4' 'P5' "''P6'" " Enter B for Back, N for Next, Ctrl-Z to Exit or Enter a File Number "
 | 
			
		||||
$ PAGE_TXT = F$FAO (" Page !UL of !UL ", PAGE_CTR, PAGE_MAX)
 | 
			
		||||
$ _COL = P2 + (BOX_WIDTH - F$LENGTH (PAGE_TXT)) + 2
 | 
			
		||||
$ SAY ESC + "[''P3';''_COL'H''BOLD'''PAGE_TXT'''NORM'"
 | 
			
		||||
$!
 | 
			
		||||
$DISPLAY_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF FILE_CTR .LE. FILE_MAX .AND. F$TYPE (FILE_'FILE_CTR') .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     FILE = FILE_'FILE_CTR'
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     FILE = ""
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ WRAP_IN_PROGRESS = 0
 | 
			
		||||
$!
 | 
			
		||||
$WRAP_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF ROW .LE. (P5 - 2) .AND. -
 | 
			
		||||
     FILE_CTR .LE. PAGE_CTR * FILES_PER_PAGE
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$LENGTH (FILE) .GT. BOX_WIDTH 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$ 	  IF WRAP_IN_PROGRESS .EQ. 0
 | 
			
		||||
$	  THEN 
 | 
			
		||||
$	      CTR_TXT = F$FAO ("!3UL. ",FILE_CTR)
 | 
			
		||||
$	      WRAP_IN_PROGRESS = 1
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$	      CTR_TXT = "     "
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$	  FILE_SEG = F$EXTRACT (0, BOX_WIDTH - F$LENGTH (CTR_TXT), FILE)
 | 
			
		||||
$         SAY ESC + "[''ROW';''COL'H''BOLD'''CTR_TXT'''NORM'''FILE_SEG'"
 | 
			
		||||
$         FILE = F$EXTRACT (BOX_WIDTH - F$LENGTH (CTR_TXT), F$LENGTH (FILE) - (BOX_WIDTH + F$LENGTH (CTR_TXT)), FILE)
 | 
			
		||||
$         ROW = ROW + 1
 | 
			
		||||
$	  GOTO WRAP_LOOP
 | 
			
		||||
$     ELSE
 | 
			
		||||
$	  IF FILE .NES. ""
 | 
			
		||||
$	  THEN
 | 
			
		||||
$ 	      IF WRAP_IN_PROGRESS .EQ. 0
 | 
			
		||||
$	      THEN 
 | 
			
		||||
$	          CTR_TXT = F$FAO ("!3UL. ",FILE_CTR)
 | 
			
		||||
$	      ELSE
 | 
			
		||||
$	          CTR_TXT = "     "
 | 
			
		||||
$             ENDIF
 | 
			
		||||
$             SAY ESC + "[''ROW';''COL'H''BOLD'''CTR_TXT'''NORM'''FILE'"
 | 
			
		||||
$	  ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$RETRY:
 | 
			
		||||
$!
 | 
			
		||||
$     PROMPT = ESC + "[''INPUT_ROW';01H ''CEOL'"
 | 
			
		||||
$     ASK "''PROMPT'" OPT
 | 
			
		||||
$     IF F$TYPE (OPT) .NES. "INTEGER" .AND. -
 | 
			
		||||
         F$EDIT (OPT,"TRIM,UPCASE") .NES. "B" .AND. -
 | 
			
		||||
	 F$EDIT (OPT,"TRIM,UPCASE") .NES. "N" 
 | 
			
		||||
$     THEN
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$	  GOTO RETRY
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF F$TYPE (OPT) .EQS. "INTEGER" 
 | 
			
		||||
$     THEN
 | 
			
		||||
$	  IF OPT .GT. 0 .AND. -
 | 
			
		||||
  	     OPT .LE. FILE_MAX .AND. -
 | 
			
		||||
	     OPT .LE. (FILE_CTR - 1) .AND. -
 | 
			
		||||
	     OPT .GE. (FILE_CTR - 1 - FILES_PER_PAGE)
 | 
			
		||||
$	  THEN 
 | 
			
		||||
$	      SSL_FILE_NAME == FILE_'OPT'
 | 
			
		||||
$	      GOTO EXIT
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$             CALL INVALID_ENTRY
 | 
			
		||||
$	      GOTO RETRY
 | 
			
		||||
$	  ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF F$EDIT (OPT,"TRIM,UPCASE") .EQS. "B"
 | 
			
		||||
$     THEN
 | 
			
		||||
$	  IF PAGE_CTR .GT. 1
 | 
			
		||||
$	  THEN
 | 
			
		||||
$ 	      ROW = TOP_ROW
 | 
			
		||||
$	      PAGE_CTR = PAGE_CTR - 1
 | 
			
		||||
$ 	      FILE_CTR = PAGE_'PAGE_CTR'_FILE_CTR
 | 
			
		||||
$             PAGE_TXT = F$FAO (" Page !UL of !UL ", PAGE_CTR, PAGE_MAX)
 | 
			
		||||
$             _COL = P2 + (BOX_WIDTH - F$LENGTH (PAGE_TXT)) + 2
 | 
			
		||||
$             SAY ESC + "[''P3';''_COL'H''BOLD'''PAGE_TXT'''NORM'"
 | 
			
		||||
$             FILL_BOX 'P2' 'P3' 'P4' 'P5'
 | 
			
		||||
$	      GOTO DISPLAY_LOOP
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$             CALL INVALID_ENTRY
 | 
			
		||||
$	      GOTO RETRY
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF F$EDIT (OPT,"TRIM,UPCASE") .EQS. "N"
 | 
			
		||||
$     THEN
 | 
			
		||||
$	  IF PAGE_CTR .LT. PAGE_MAX
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      PAGE_CTR = PAGE_CTR + 1
 | 
			
		||||
$ 	      PAGE_'PAGE_CTR'_FILE_CTR = FILE_CTR
 | 
			
		||||
$ 	      FILE_CTR = PAGE_'PAGE_CTR'_FILE_CTR
 | 
			
		||||
$             PAGE_TXT = F$FAO (" Page !UL of !UL ", PAGE_CTR, PAGE_MAX)
 | 
			
		||||
$             _COL = P2 + (BOX_WIDTH - F$LENGTH (PAGE_TXT)) + 2
 | 
			
		||||
$             SAY ESC + "[''P3';''_COL'H''BOLD'''PAGE_TXT'''NORM'"
 | 
			
		||||
$             FILL_BOX 'P2' 'P3' 'P4' 'P5'
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$             CALL INVALID_ENTRY
 | 
			
		||||
$	      GOTO RETRY
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     FILL_BOX 'P2' 'P3' 'P4' 'P5'
 | 
			
		||||
$     ROW = TOP_ROW
 | 
			
		||||
$     GOTO WRAP_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ FILE_CTR = FILE_CTR + 1
 | 
			
		||||
$ ROW = ROW + 1
 | 
			
		||||
$ GOTO DISPLAY_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_ENTRY: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''INPUT_ROW';01H", BELL, " Invalid Entry, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''INPUT_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,62 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$REM_ENV.COM - Remove the SSL Initialize Environment
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure deletes the SSL environment logicals & symbols set up by
 | 
			
		||||
$! SSL$INIT_ENV.COM.
 | 
			
		||||
$!
 | 
			
		||||
$! P1 = Mode of the logicals (ie - "/SYSTEM/EXECUTIVE_MODE").
 | 
			
		||||
$!      Note - if P1 is not passed in, P1 will default to PROCESS.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialization 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$    WRITE SYS$OUTPUT " "
 | 
			
		||||
$    WRITE SYS$OUTPUT " SSL-E-ERROR, SSL has not been started."
 | 
			
		||||
$    WRITE SYS$OUTPUT " "
 | 
			
		||||
$    WRITE SYS$OUTPUT " Execute the command procedure, SYS$STARTUP:SSL$STARTUP.COM, and then try this procedure again."
 | 
			
		||||
$    WRITE SYS$OUTPUT " "
 | 
			
		||||
$    EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$    P1 = "/PROCESS"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define logicals
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DEASSIGN 'P1 	SSL$CA_CONF
 | 
			
		||||
$ DEASSIGN 'P1 	SSL$CONF
 | 
			
		||||
$ DEASSIGN 'P1 	SSL$COM
 | 
			
		||||
$ DEASSIGN 'P1	SSL$CRT
 | 
			
		||||
$ DEASSIGN 'P1 	SSL$CSR
 | 
			
		||||
$ DEASSIGN 'P1 	SSL$KEY
 | 
			
		||||
$ DEASSIGN 'P1 	SSL$DB
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define foreign symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL OPENSSL
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL HOSTADDR
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL HOSTNAME
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,769 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$RQST_CERT.COM - SSL Certificate Request procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure prompts the user through creating a Certificate Request.
 | 
			
		||||
$!
 | 
			
		||||
$! There are no parameters used.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ PID = F$GETJPI ("","PID")
 | 
			
		||||
$ TT_NOECHO = F$GETDVI ("TT:","TT_NOECHO")
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = F$GETDVI ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = F$GETDVI ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA := CALL GET_USER_DATA
 | 
			
		||||
$ SET_USER_DATA := CALL SET_USER_DATA
 | 
			
		||||
$ DEL_USER_DATA := CALL DEL_USER_DATA
 | 
			
		||||
$ INIT_TERM := @SSL$COM:SSL$INIT_TERM
 | 
			
		||||
$ SHOW_FILE := @SSL$COM:SSL$SHOW_FILE 
 | 
			
		||||
$ SSL_CONF_FILE = F$TRNLNM ("SSL$CONF")
 | 
			
		||||
$ GET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' GET
 | 
			
		||||
$ SET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' SET
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BLNK = ESC + "[5m"    ! Turn on BLINK Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM
 | 
			
		||||
$ BCOLOR = BGD
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Create Certificate Request"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Reading Configuration ...", NORM
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Initializing Configuration ...", NORM
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ _request_name = "req"
 | 
			
		||||
$!
 | 
			
		||||
$ _distinguished_name = "REQ_distinguished_name"
 | 
			
		||||
$ _distinguished_name_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_bits = "1024"
 | 
			
		||||
$ _default_bits_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_keyfile = "SSL$KEY:SERVER.KEY"
 | 
			
		||||
$ _default_keyfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_csrfile = "SSL$CSR:SERVER.CSR"
 | 
			
		||||
$ _default_csrfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _countryName_prompt = "Country Name ?"
 | 
			
		||||
$ _countryName_min = "2"
 | 
			
		||||
$ _countryName_max = "2"
 | 
			
		||||
$ _countryName_default = "US"
 | 
			
		||||
$ _countryName_upd = "Y"
 | 
			
		||||
$ _countryName_cnt = 4
 | 
			
		||||
$!
 | 
			
		||||
$ _stateOrProvinceName_prompt = "State or Province Name ?"
 | 
			
		||||
$ _stateOrProvinceName_default = ""
 | 
			
		||||
$ _stateOrProvinceName_upd = "Y"
 | 
			
		||||
$ _stateOrProvinceName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _localityName_prompt = "City Name ?"
 | 
			
		||||
$ _localityName_default = ""
 | 
			
		||||
$ _localityName_upd = "Y"
 | 
			
		||||
$ _localityName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _0organizationName_prompt = "Organization Name ?"
 | 
			
		||||
$ _0organizationName_default = ""
 | 
			
		||||
$ _0organizationName_upd = "Y"
 | 
			
		||||
$ _0organizationName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _organizationalUnitName_prompt = "Organization Unit Name ?"
 | 
			
		||||
$ _organizationalUnitName_default = ""
 | 
			
		||||
$ _organizationalUnitName_upd = "Y"
 | 
			
		||||
$ _organizationalUnitName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _commonName_prompt = "Common Name ?"
 | 
			
		||||
$ _commonName_max = "64"
 | 
			
		||||
$ HOSTNAME -s _commonName_default
 | 
			
		||||
$ _commonName_upd = "Y"
 | 
			
		||||
$ _commonName_cnt = 3
 | 
			
		||||
$!
 | 
			
		||||
$ _emailAddress_prompt = "Email Address ?"
 | 
			
		||||
$ _emailAddress_max = "40"
 | 
			
		||||
$ _emailAddress_default = "webmaster@''_commonName_default'"
 | 
			
		||||
$ _emailAddress_upd = "Y"
 | 
			
		||||
$ _emailAddress_cnt = 3
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#distinguished_name"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _distinguished_name = SSL_CONF_DATA
 | 
			
		||||
$         _distinguished_name_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_bits"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_bits = SSL_CONF_DATA
 | 
			
		||||
$         _default_bits_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_keyfile"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_keyfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[KEY]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".KEY",,"TYPE") 
 | 
			
		||||
$         _default_keyfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_csrfile"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_csrfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[CSR]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".CSR",,"TYPE") 
 | 
			
		||||
$         _default_csrfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_min"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_min = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_max = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _countryName_cnt .EQ. CTR THEN _countryName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#stateOrProvinceName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _stateOrProvinceName_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#stateOrProvinceName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _stateOrProvinceName_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _stateOrProvinceName_cnt .EQ. CTR THEN _stateOrProvinceName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#localityName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _localityName_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#localityName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _localityName_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _localityName_cnt .EQ. CTR THEN _localityName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#0.organizationName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _0organizationName_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#0.organizationName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _0organizationName_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _0organizationName_cnt .EQ. CTR THEN _0organizationName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#organizationalUnitName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _organizationalUnitName_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#organizationalUnitName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _organizationalUnitName_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _organizationalUnitName_cnt .EQ. CTR THEN _organizationalUnitName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _commonName_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _commonName_max = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _commonName_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _commonName_cnt .EQ. CTR THEN _commonName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#emailAddress"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _emailAddress_prompt = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#emailAddress_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _emailAddress_max = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#emailAddress_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _emailAddress_default = SSL_CONF_DATA
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _emailAddress_cnt .EQ. CTR THEN _emailAddress_upd = "N"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SET_USER_DATA "[]#encrypt_key#-#N#Encrypt Private Key ?#S##1##Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#pem_pass_phrase#-##PEM Pass Phrase ?#P#1###Y#Y"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_bits#D#''_default_bits'#Encryption Bits ?#I###''_default_bits_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_keyfile#D#''_default_keyfile'#Certificate Key File ?#F###''_default_keyfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_csrfile#D#''_default_csrfile'#Certificate Request File ?#F###''_default_csrfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#distinguished_name#D#''_distinguished_name'##S###''_distinguished_name_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#countryName#P#''_countryName_default'#''_countryName_prompt'#S#''_countryName_min'#''_countryName_max'#''_countryName_upd'#Y#N" 
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#stateOrProvinceName#P#''_stateOrProvinceName_default'#''_stateOrProvinceName_prompt'#S###''_stateOrProvinceName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#localityName#P#''_localityName_default'#''_localityName_prompt'#S###''_localityName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#0.organizationName#P#''_0organizationName_default'#''_0organizationName_prompt'#S###''_0organizationName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#organizationalUnitName#P#''_organizationalUnitName_default'#''_organizationalUnitName_prompt'#S###''_organizationUnitName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#commonName#P#''_commonName_default'#''_commonName_prompt'#S##''_commonName_max'#''_commonName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#emailAddress#P#''_emailAddress_default'#''_emailAddress_prompt'#S##''_emailAddress_max'#''_emailAddress_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#display_certificate#-#N#Display the Certificate ?#S##1##Y#N"
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Confirm/Update the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input  ?
 | 
			
		||||
$!
 | 
			
		||||
$! The PEM Pass Phrase prompt is dependant on the answer to encrypt the private key
 | 
			
		||||
$!
 | 
			
		||||
$     IF KEY .EQS. "[]" .AND. ITM .EQS. "pem_pass_phrase"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         GET_USER_DATA "[]#encrypt_key"
 | 
			
		||||
$ 	  _encrypt_key = SSL_USER_DATA
 | 
			
		||||
$         IF F$EDIT (_encrypt_key,"UPCASE") .NES. "Y"
 | 
			
		||||
$	  THEN
 | 
			
		||||
$             CTR = CTR + 1
 | 
			
		||||
$             GOTO PROMPT_LOOP
 | 
			
		||||
$	  ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     CONFIRMED = 0
 | 
			
		||||
$     IF REQ .EQS. "N"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ROW .GT. MSG_ROW - 2
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SAY ESC + "[''TOP_ROW';01H", CEOS
 | 
			
		||||
$	  ROW = TOP_ROW
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$CONFIRM_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$     IF PRM .EQS. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''ITM' ? [''DEF'] ''CEOL'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''PRM' [''DEF'] ''CEOL'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /NOECHO
 | 
			
		||||
$     ASK "''PROMPT'" ANS /END_OF_FILE=EXIT
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /ECHO
 | 
			
		||||
$     ANS = F$EDIT (ANS,"TRIM")
 | 
			
		||||
$     IF ANS .EQS. "" THEN ANS = DEF
 | 
			
		||||
$     IF TYP .EQS. "F"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         ANS = F$PARSE ("''ANS'","''DEF'",,,"SYNTAX_ONLY")
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "I" .AND. F$TYPE (ANS) .NES. "INTEGER"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF (TYP .EQS. "S" .OR. TYP .EQS. "P") .AND. -
 | 
			
		||||
         ((MIN .NES. "" .AND. F$LENGTH (ANS) .LT. F$INTEGER(MIN)) .OR. -
 | 
			
		||||
          (MAX .NES. "" .AND. F$LENGTH (ANS) .GT. F$INTEGER(MAX)))
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$	  IF TYP .EQS. "S" THEN GOTO PROMPT_LOOP
 | 
			
		||||
$         IF TYP .EQS. "P" THEN GOTO CONFIRM_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     ROW = ROW + 1
 | 
			
		||||
$     IF CFM .EQS. "Y"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         IF CONFIRMED .EQ. 0
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      CONFIRMED = 1
 | 
			
		||||
$	      CONFIRMED_ANS = ANS
 | 
			
		||||
$	      PRM = "Confirm ''PRM'"
 | 
			
		||||
$	      GOTO CONFIRM_LOOP
 | 
			
		||||
$         ELSE
 | 
			
		||||
$	      IF ANS .NES. CONFIRMED_ANS
 | 
			
		||||
$	      THEN 
 | 
			
		||||
$                 CALL INVALID_ENTRY
 | 
			
		||||
$		  ROW = ROW - 2
 | 
			
		||||
$                 SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$                 GOTO PROMPT_LOOP
 | 
			
		||||
$	      ENDIF
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ANS .NES. DEF THEN SSL_USER_DATA_'CTR' = "''KEY'#''ITM'#''VAL'#''ANS'#''PRM'#''TYP'#''MIN'#''MAX'#Y#''REQ'#''CFM'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO PROMPT_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Save the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Saving Configuration ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$SAVE_CONF_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input ?
 | 
			
		||||
$     IF UPD .NES. "Y" .OR. VAL .EQS. "-"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO SAVE_CONF_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "D"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''DEF'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''PRM'"
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'_default" "''DEF'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF MIN .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_min" "''MIN'"
 | 
			
		||||
$     IF MAX .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_max" "''MAX'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO SAVE_CONF_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ PURGE /NOLOG /NOCONFIRM 'SSL_CONF_FILE'
 | 
			
		||||
$ RENAME 'SSL_CONF_FILE'; ;1
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Server Certificiate
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Creating Certificate Request ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = 2
 | 
			
		||||
$ Y1 = TOP_ROW
 | 
			
		||||
$ X2 = TT_COLS - 2
 | 
			
		||||
$ Y2 = MSG_ROW - 1
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA "[]#encrypt_key"
 | 
			
		||||
$ _encrypt_key = SSL_USER_DATA
 | 
			
		||||
$ IF F$EDIT (_encrypt_key,"UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     GET_USER_DATA "[]#pem_pass_phrase"
 | 
			
		||||
$     _pem_pass_phrase = SSL_USER_DATA
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ GET_USER_DATA "[req]#default_bits"
 | 
			
		||||
$ _default_bits = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[req]#default_keyfile"
 | 
			
		||||
$ _default_keyfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[req]#default_csrfile"
 | 
			
		||||
$ _default_csrfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#display_certificate"
 | 
			
		||||
$ _display_certificate = SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SHOW SYSTEM /FULL /OUT=SYS$LOGIN:SSL_GENRSA_'PID'.RND
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE OFILE SYS$LOGIN:SSL_GENRSA_'PID'.COM
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG RANDFILE    SYS$LOGIN:SSL_GENRSA_''PID'.RND"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_GENRSA_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_GENRSA_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$ IF _encrypt_key .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL genrsa -des3 -out ''_default_keyfile' ''_default_bits'"
 | 
			
		||||
$     WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$     WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL genrsa -out ''_default_keyfile' ''_default_bits'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ @SYS$LOGIN:SSL_GENRSA_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.RND;*
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SEARCH SYS$LOGIN:SSL_GENRSA_'PID'.LOG /OUT=SYS$LOGIN:SSL_GENRSA_'PID'.ERR ":error:"
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_GENRSA_''PID'.ERR") .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_GENRSA_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.ERR;*
 | 
			
		||||
$         SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$         SHOW_FILE "SYS$LOGIN:SSL_GENRSA_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.LOG;*
 | 
			
		||||
$         GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.ERR;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$! 
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.LOG;*
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SHOW SYSTEM /FULL /OUT=SYS$LOGIN:SSL_REQ_'PID'.RND
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE OFILE SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG RANDFILE    SYS$LOGIN:SSL_REQ_''PID'.RND"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$ IF _encrypt_key .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL req -new -config ''SSL_CONF_FILE' -key ''_default_keyfile' -out ''_default_csrfile'"
 | 
			
		||||
$     WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$     WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL req -new -nodes -config ''SSL_CONF_FILE' -keyout ''_default_keyfile' -out ''_default_csrfile'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ @SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SEARCH SYS$LOGIN:SSL_REQ_'PID'.LOG /OUT=SYS$LOGIN:SSL_REQ_'PID'.ERR ":error:"
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.ERR") .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_REQ_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$         SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$         SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$         GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$! 
 | 
			
		||||
$ IF F$EDIT (_display_certificate,"TRIM,UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Generating Output ...", NORM, CEOL
 | 
			
		||||
$!
 | 
			
		||||
$     OPEN /WRITE OFILE SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL req -noout -text -config ''SSL_CONF_FILE' -in ''_default_csrfile'"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$     @SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$     DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$     SEARCH SYS$LOGIN:SSL_REQ_'PID'.LOG /OUT=SYS$LOGIN:SSL_REQ_'PID'.ERR ":error:"
 | 
			
		||||
$     IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.ERR") .NES. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_REQ_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$         THEN 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$             SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$             SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$             GOTO EXIT
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$     SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ''_default_csrfile' >" 
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$     GOTO EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Press return to continue"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$ PROMPT = ESC + "[''MSG_ROW';''COL'H''TEXT'"
 | 
			
		||||
$ ASK "''PROMPT'" OPT
 | 
			
		||||
$!
 | 
			
		||||
$GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Set the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     SSL_USER_DATA_MAX == 1
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX + 1
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_USER_DATA_'SSL_USER_DATA_MAX' == "''P1'"
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Get the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ USER_KEY = F$ELEMENT (0,"#",P1)
 | 
			
		||||
$ USER_ITM = F$ELEMENT (1,"#",P1)
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     IF USER_KEY .NES. KEY .OR. USER_ITM .NES. ITM
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO GET_USER_DATA_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "-" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "D" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "P" THEN SSL_USER_DATA == "''PRM'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Delete the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. "" THEN GOTO DEL_USER_DATA_END
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_'SSL_USER_DATA_MAX') .NES. "" 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     DELETE /SYMBOL /GLOBAL SSL_USER_DATA_'SSL_USER_DATA_MAX'
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX - 1
 | 
			
		||||
$     GOTO DEL_USER_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /SYMBOL /GLOBAL SSL_USER_DATA_MAX
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_ENTRY: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BELL, " Invalid Entry, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ DEL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_CONF_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_CONF_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$GETDVI ("TT:","TT_NOECHO") .AND. .NOT. TT_NOECHO THEN SET TERMINAL /ECHO
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_GENRSA_''PID'.%%%;*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_GENRSA_'PID'.%%%;*
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.%%%;*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.%%%;*
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,725 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$SELF_CERT.COM - SSL Self Signed Certificate procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure prompts the user through creating a Server Certificate.
 | 
			
		||||
$!
 | 
			
		||||
$! There are no parameters used.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ PID = F$GETJPI ("","PID")
 | 
			
		||||
$ TT_NOECHO = F$GETDVI ("TT:","TT_NOECHO")
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = F$GETDVI ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = F$GETDVI ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA := CALL GET_USER_DATA
 | 
			
		||||
$ SET_USER_DATA := CALL SET_USER_DATA
 | 
			
		||||
$ DEL_USER_DATA := CALL DEL_USER_DATA
 | 
			
		||||
$ INIT_TERM := @SSL$COM:SSL$INIT_TERM
 | 
			
		||||
$ SHOW_FILE := @SSL$COM:SSL$SHOW_FILE 
 | 
			
		||||
$ SSL_CONF_FILE = F$TRNLNM ("SSL$CONF")
 | 
			
		||||
$ GET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' GET
 | 
			
		||||
$ SET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' SET
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BLNK = ESC + "[5m"    ! Turn on BLINK Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM
 | 
			
		||||
$ BCOLOR = BGD
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Create Self-Signed Certificate"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Reading Configuration ...", NORM
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Initializing Configuration ...", NORM
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ _request_name = "req"
 | 
			
		||||
$!
 | 
			
		||||
$ _distinguished_name = "REQ_distinguished_name"
 | 
			
		||||
$ _distinguished_name_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_bits = "1024"
 | 
			
		||||
$ _default_bits_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_keyfile = "SSL$KEY:SERVER.KEY"
 | 
			
		||||
$ _default_keyfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_crtfile = "SSL$CRT:SERVER.CRT"
 | 
			
		||||
$ _default_crtfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _countryName_prompt = "Country Name ?"
 | 
			
		||||
$ _countryName_min = "2"
 | 
			
		||||
$ _countryName_max = "2"
 | 
			
		||||
$ _countryName_default = "US"
 | 
			
		||||
$ _countryName_upd = "Y"
 | 
			
		||||
$ _countryName_cnt = 4
 | 
			
		||||
$!
 | 
			
		||||
$ _stateOrProvinceName_prompt = "State or Province Name ?"
 | 
			
		||||
$ _stateOrProvinceName_default = ""
 | 
			
		||||
$ _stateOrProvinceName_upd = "Y"
 | 
			
		||||
$ _stateOrProvinceName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _localityName_prompt = "City Name ?"
 | 
			
		||||
$ _localityName_default = ""
 | 
			
		||||
$ _localityName_upd = "Y"
 | 
			
		||||
$ _localityName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _0organizationName_prompt = "Organization Name ?"
 | 
			
		||||
$ _0organizationName_default = ""
 | 
			
		||||
$ _0organizationName_upd = "Y"
 | 
			
		||||
$ _0organizationName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _organizationalUnitName_prompt = "Organization Unit Name ?"
 | 
			
		||||
$ _organizationalUnitName_default = ""
 | 
			
		||||
$ _organizationalUnitName_upd = "Y"
 | 
			
		||||
$ _organizationalUnitName_cnt = 2
 | 
			
		||||
$!
 | 
			
		||||
$ _commonName_prompt = "Common Name ?"
 | 
			
		||||
$ _commonName_max = "64"
 | 
			
		||||
$ HOSTNAME -s _commonName_default
 | 
			
		||||
$ _commonName_upd = "Y"
 | 
			
		||||
$ _commonName_cnt = 3
 | 
			
		||||
$!
 | 
			
		||||
$ _emailAddress_prompt = "Email Address ?"
 | 
			
		||||
$ _emailAddress_max = "40"
 | 
			
		||||
$ _emailAddress_default = "webmaster@''_commonName_default'"
 | 
			
		||||
$ _emailAddress_upd = "Y"
 | 
			
		||||
$ _emailAddress_cnt = 3
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#distinguished_name"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _distinguished_name = SSL_CONF_DATA
 | 
			
		||||
$         _distinguished_name_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_bits"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_bits = SSL_CONF_DATA
 | 
			
		||||
$     	  _default_bits_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_keyfile"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_keyfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[KEY]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".KEY",,"TYPE") 
 | 
			
		||||
$         _default_keyfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_request_name']#default_crtfile"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_crtfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[CRT]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".CRT",,"TYPE") 
 | 
			
		||||
$         _default_crtfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_min"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_min = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_max = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#countryName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _countryName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _countryName_cnt .EQS. CTR THEN _countryName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#stateOrProvinceName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _stateOrProvinceName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#stateOrProvinceName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _stateOrProvinceName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _stateOrProvinceName_cnt .EQ. CTR THEN _stateOrProvinceName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#localityName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _localityName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#localityName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _localityName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _localityName_cnt .EQ. CTR THEN _localityName_default_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#0.organizationName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _0organizationName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#0.organizationName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _0organizationName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _0organizationName_cnt .EQ. CTR THEN _0organizationName_default_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#organizationalUnitName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _organizationalUnitName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#organizationalUnitName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _organizationalUnitName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _organizationalUnitName_cnt .EQ. CTR THEN _organizationalUnitName_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _commonName_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _commonName_max = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#commonName_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _commonName_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _commonName_cnt .EQ. CTR THEN _commonName_default_upd = "N"
 | 
			
		||||
$!
 | 
			
		||||
$     CTR = 0
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#emailAddress"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _emailAddress_prompt = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#emailAddress_max"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _emailAddress_max = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     GET_CONF_DATA "[''_distinguished_name']#emailAddress_default"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _emailAddress_default = SSL_CONF_DATA
 | 
			
		||||
$	  CTR = CTR + 1
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF _emailAddress_cnt .EQ. CTR THEN _emailAddress_default_upd = "N"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SET_USER_DATA "[]#encrypt_key#-#N#Encrypt Private Key ?#S##1##Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#pem_pass_phrase#-##PEM Pass Phrase ?#P#1###Y#Y"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_bits#D#''_default_bits'#Encryption Bits ?#I###''_default_bits_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_keyfile#D#''_default_keyfile'#Certificate Key File ?#F###''_default_keyfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#default_crtfile#D#''_default_crtfile'#Certificate File ?#F###''_default_crtfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_request_name']#distinguished_name#D#''_distinguished_name'##S###''_distinguished_name_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#countryName#P#''_countryName_default'#''_countryName_prompt'#S#''_countryName_min'#''#''_countryName_upd'#Y#N" 
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#stateOrProvinceName#P#''_stateOrProvinceName_default'#''_stateOrProvinceName_prompt'####''_stateOrProvinceName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#localityName#P#''_localityName_default'#''_localityName_prompt'#S###''_localityName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#0.organizationName#P#''_0organizationName_default'#''_0organizationName_prompt'#S###''_0organizationalName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#organizationalUnitName#P#''_organizationalUnitName_default'#''_organizationalUnitName_prompt#S###''_organizationalUnitName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#commonName#P#''_commonName_default'#''_commonName_prompt'#S##''_commonName_max'#''_commonName_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_distinguished_name']#emailAddress#P#''_emailAddress_default'#''_emailAddress_prompt'#S##''_emailAddress_max'#''_emailAddress_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#display_certificate#-#N#Display the Certificate ?#S##1##Y#N"
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Confirm/Update the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input  ?
 | 
			
		||||
$!
 | 
			
		||||
$! The PEM Pass Phrase prompt is dependant on the answer to encrypt the private key
 | 
			
		||||
$!
 | 
			
		||||
$     IF KEY .EQS. "[]" .AND. ITM .EQS. "pem_pass_phrase"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         GET_USER_DATA "[]#encrypt_key"
 | 
			
		||||
$ 	  _encrypt_key = SSL_USER_DATA
 | 
			
		||||
$         IF F$EDIT (_encrypt_key,"UPCASE") .NES. "Y"
 | 
			
		||||
$	  THEN
 | 
			
		||||
$             CTR = CTR + 1
 | 
			
		||||
$             GOTO PROMPT_LOOP
 | 
			
		||||
$	  ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     CONFIRMED = 0
 | 
			
		||||
$     IF REQ .EQS. "N"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ROW .GT. MSG_ROW - 2
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SAY ESC + "[''TOP_ROW';01H", CEOS
 | 
			
		||||
$	  ROW = TOP_ROW
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$CONFIRM_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$     IF PRM .EQS. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''ITM' ? [''DEF'] ''CEOL'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''PRM' [''DEF'] ''CEOL'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /NOECHO
 | 
			
		||||
$     ASK "''PROMPT'" ANS /END_OF_FILE=EXIT
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /ECHO
 | 
			
		||||
$     ANS = F$EDIT (ANS,"TRIM")
 | 
			
		||||
$     IF ANS .EQS. "" THEN ANS = DEF
 | 
			
		||||
$     IF TYP .EQS. "F"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         ANS = F$PARSE ("''ANS'","''DEF'",,,"SYNTAX_ONLY")
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "I" .AND. F$TYPE (ANS) .NES. "INTEGER"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF (TYP .EQS. "S" .OR. TYP .EQS. "P") .AND. -
 | 
			
		||||
         ((MIN .NES. "" .AND. F$LENGTH (ANS) .LT. F$INTEGER(MIN)) .OR. -
 | 
			
		||||
          (MAX .NES. "" .AND. F$LENGTH (ANS) .GT. F$INTEGER(MAX)))
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$	  IF TYP .EQS. "S" THEN GOTO PROMPT_LOOP
 | 
			
		||||
$         IF TYP .EQS. "P" THEN GOTO CONFIRM_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     ROW = ROW + 1
 | 
			
		||||
$     IF CFM .EQS. "Y"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         IF CONFIRMED .EQ. 0
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      CONFIRMED = 1
 | 
			
		||||
$	      CONFIRMED_ANS = ANS
 | 
			
		||||
$	      PRM = "Confirm ''PRM'"
 | 
			
		||||
$	      GOTO CONFIRM_LOOP
 | 
			
		||||
$         ELSE
 | 
			
		||||
$	      IF ANS .NES. CONFIRMED_ANS
 | 
			
		||||
$	      THEN 
 | 
			
		||||
$                 CALL INVALID_ENTRY
 | 
			
		||||
$		  ROW = ROW - 2
 | 
			
		||||
$                 SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$                 GOTO PROMPT_LOOP
 | 
			
		||||
$	      ENDIF
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ANS .NES. DEF THEN SSL_USER_DATA_'CTR' = "''KEY'#''ITM'#''VAL'#''ANS'#''PRM'#''TYP'#''MIN'#''MAX'#Y#''REQ'#''CFM'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO PROMPT_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Save the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Saving Configuration ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$SAVE_CONF_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input ?
 | 
			
		||||
$     IF UPD .NES. "Y" .OR. VAL .EQS. "-"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO SAVE_CONF_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "D"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''DEF'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''PRM'"
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'_default" "''DEF'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF MIN .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_min" "''MIN'"
 | 
			
		||||
$     IF MAX .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_max" "''MAX'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO SAVE_CONF_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ PURGE /NOLOG /NOCONFIRM 'SSL_CONF_FILE'
 | 
			
		||||
$ RENAME 'SSL_CONF_FILE'; ;1
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Server Certificiate
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Creating Self-Signed Certificate ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = 2
 | 
			
		||||
$ Y1 = TOP_ROW
 | 
			
		||||
$ X2 = TT_COLS - 2
 | 
			
		||||
$ Y2 = MSG_ROW - 1
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA "[]#encrypt_key"
 | 
			
		||||
$ _encrypt_key = SSL_USER_DATA
 | 
			
		||||
$ IF F$EDIT (_encrypt_key,"UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     GET_USER_DATA "[]#pem_pass_phrase"
 | 
			
		||||
$     _pem_pass_phrase = SSL_USER_DATA
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ GET_USER_DATA "[''_request_name']#default_bits"
 | 
			
		||||
$ _default_bits = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[''_request_name']#default_keyfile"
 | 
			
		||||
$ _default_keyfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[''_request_name']#default_crtfile"
 | 
			
		||||
$ _default_crtfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#display_certificate"
 | 
			
		||||
$ _display_certificate = SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SHOW SYSTEM /FULL /OUT=SYS$LOGIN:SSL_REQ_'PID'.RND
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE OFILE SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG RANDFILE    SYS$LOGIN:SSL_REQ_''PID'.RND"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$ IF F$EDIT (_encrypt_key,"UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL req -config ''SSL_CONF_FILE' -new -days 365 -x509 -keyout ''_default_keyfile' -out ''_default_crtfile'"
 | 
			
		||||
$     WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$     WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL req -config ''SSL_CONF_FILE' -nodes -new -days 365 -x509 -keyout ''_default_keyfile' -out ''_default_crtfile'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ WRITE OFILE ""
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ @SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SEARCH SYS$LOGIN:SSL_REQ_'PID'.LOG /OUT=SYS$LOGIN:SSL_REQ_'PID'.ERR ":error:"
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.ERR") .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_REQ_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$         SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$         SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >"
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$         GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$! 
 | 
			
		||||
$ IF F$EDIT (_display_certificate,"TRIM,UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Generating Output ...", NORM, CEOL
 | 
			
		||||
$!
 | 
			
		||||
$     OPEN /WRITE OFILE SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL x509 -noout -text -in ''_default_crtfile'"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$     @SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$     SEARCH SYS$LOGIN:SSL_X509_'PID'.LOG /OUT=SYS$LOGIN:SSL_X509_'PID'.ERR ":error:"
 | 
			
		||||
$     IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.ERR") .NES. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_X509_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$         THEN 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$             SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$             SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$             GOTO EXIT
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$     SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ''_default_crtfile' >" 
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$     GOTO EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Press return to continue"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$ PROMPT = ESC + "[''MSG_ROW';''COL'H''TEXT'"
 | 
			
		||||
$ ASK "''PROMPT'" OPT
 | 
			
		||||
$!
 | 
			
		||||
$GOTO EXIT
 | 
			
		||||
z$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Set the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     SSL_USER_DATA_MAX == 1
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX + 1
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_USER_DATA_'SSL_USER_DATA_MAX' == "''P1'"
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Find the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ USER_KEY = F$ELEMENT (0,"#",P1)
 | 
			
		||||
$ USER_ITM = F$ELEMENT (1,"#",P1)
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     IF USER_KEY .NES. KEY .OR. USER_ITM .NES. ITM
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO GET_USER_DATA_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "-" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "D" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "P" THEN SSL_USER_DATA == "''PRM'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Delete the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. "" THEN GOTO DEL_USER_DATA_END
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_'SSL_USER_DATA_MAX') .NES. "" 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     DELETE /SYMBOL /GLOBAL SSL_USER_DATA_'SSL_USER_DATA_MAX'
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX - 1
 | 
			
		||||
$     GOTO DEL_USER_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /SYMBOL /GLOBAL SSL_USER_DATA_MAX
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_ENTRY: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BELL, " Invalid Entry, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ DEL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_CONF_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_CONF_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$GETDVI ("TT:","TT_NOECHO") .AND. .NOT. TT_NOECHO THEN SET TERMINAL /ECHO
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.%%%;*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.%%%;*
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.%%%;*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.%%%;*
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,205 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$SHOW_FILE.COM - SSL Show File procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure display the contents of a given file in a box size specified.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- File to View
 | 
			
		||||
$! 	P2	- X1 coordinate
 | 
			
		||||
$! 	P3	- Y1 coordinate
 | 
			
		||||
$! 	P4	- X2 coordinate
 | 
			
		||||
$! 	P5	- Y3 coordinate
 | 
			
		||||
$! 	P6	- File Box Title (Optional)
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ DRAW_BOX := @SSL$COM:SSL$DRAW_BOX
 | 
			
		||||
$ FILL_BOX := @SSL$COM:SSL$FILL_BOX
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BOLD = ESC + "[1m"    ! Turn on BOLD Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ REC_MAX = 0
 | 
			
		||||
$ OPEN /READ IFILE 'P1' 
 | 
			
		||||
$!
 | 
			
		||||
$READ_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ READ /END_OF_FILE=READ_END IFILE IREC
 | 
			
		||||
$ REC_MAX = REC_MAX + 1
 | 
			
		||||
$ REC_'REC_MAX' = IREC
 | 
			
		||||
$ GOTO READ_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$READ_END:
 | 
			
		||||
$!
 | 
			
		||||
$ CLOSE IFILE
 | 
			
		||||
$!
 | 
			
		||||
$ IF REC_MAX .EQ. 0
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     DRAW_BOX 'P2' 'P3' 'P4' 'P5' "''P6'" " ** End-of-File **, Press Return to Exit "
 | 
			
		||||
$     INPUT_ROW = P5 + 1
 | 
			
		||||
$     PROMPT = ESC + "[''INPUT_ROW';01H ''CEOL'"
 | 
			
		||||
$     ASK "''PROMPT'" OPT
 | 
			
		||||
$     GOTO EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ COL = P2 + 2
 | 
			
		||||
$ ROW = P3 + 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ INPUT_ROW = P5 + 1
 | 
			
		||||
$ BOX_WIDTH = P4 - (P2 + 2)
 | 
			
		||||
$ BOX_HEIGHT = P5 - (P3 + 3)
 | 
			
		||||
$!
 | 
			
		||||
$ REC_CTR = 1
 | 
			
		||||
$ PAGE_CTR = 1
 | 
			
		||||
$ PAGE_'PAGE_CTR'_REC_CTR = REC_CTR
 | 
			
		||||
$ RECS_PER_PAGE = BOX_HEIGHT
 | 
			
		||||
$ PAGE_MAX = REC_MAX / RECS_PER_PAGE
 | 
			
		||||
$ IF PAGE_MAX * RECS_PER_PAGE .LT. REC_MAX THEN PAGE_MAX = PAGE_MAX + 1
 | 
			
		||||
$!
 | 
			
		||||
$ DRAW_BOX 'P2' 'P3' 'P4' 'P5' "''P6'" " Enter B for Back, N for Next, Ctrl-Z to Exit "
 | 
			
		||||
$ PAGE_TXT = F$FAO (" Page !UL of !UL ", PAGE_CTR, PAGE_MAX)
 | 
			
		||||
$ _COL = P2 + (BOX_WIDTH - F$LENGTH (PAGE_TXT)) + 2
 | 
			
		||||
$ SAY ESC + "[''P3';''_COL'H''BOLD'''PAGE_TXT'''NORM'"
 | 
			
		||||
$!
 | 
			
		||||
$DISPLAY_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF REC_CTR .LE. REC_MAX .AND. F$TYPE (REC_'REC_CTR') .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     REC = REC_'REC_CTR'
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ WRAP_IN_PROGRESS = 0
 | 
			
		||||
$!
 | 
			
		||||
$WRAP_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF ROW .LE. (P5 - 2) .AND. -
 | 
			
		||||
     REC_CTR .LE. PAGE_CTR * RECS_PER_PAGE
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$LENGTH (REC) .GT. BOX_WIDTH  
 | 
			
		||||
$     THEN 
 | 
			
		||||
$ 	  IF WRAP_IN_PROGRESS .EQ. 0
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      WRAP_IN_PROGRESS = 1
 | 
			
		||||
$	      _COL = COL
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$	      _COL = COL - 1
 | 
			
		||||
$	  ENDIF
 | 
			
		||||
$	  REC_SEG = F$EXTRACT (0, BOX_WIDTH, REC)
 | 
			
		||||
$         SAY ESC + "[''ROW';''_COL'H", REC_SEG
 | 
			
		||||
$         REC = ">" + F$EXTRACT (BOX_WIDTH, F$LENGTH (REC)-BOX_WIDTH, REC)
 | 
			
		||||
$         ROW = ROW + 1
 | 
			
		||||
$	  GOTO WRAP_LOOP
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         IF REC_CTR .LE. REC_MAX .AND. F$TYPE (REC_'REC_CTR') .NES. ""
 | 
			
		||||
$         THEN 
 | 
			
		||||
$ 	      IF WRAP_IN_PROGRESS .EQ. 1
 | 
			
		||||
$	      THEN
 | 
			
		||||
$		  _COL = COL - 1
 | 
			
		||||
$	      ELSE
 | 
			
		||||
$		  _COL = COL
 | 
			
		||||
$	      ENDIF
 | 
			
		||||
$             SAY ESC + "[''ROW';''_COL'H", REC
 | 
			
		||||
$	  ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$RETRY:
 | 
			
		||||
$!
 | 
			
		||||
$     PROMPT = ESC + "[''INPUT_ROW';01H ''CEOL'"
 | 
			
		||||
$     ASK "''PROMPT'" OPT
 | 
			
		||||
$     IF F$EDIT (OPT,"TRIM,UPCASE") .NES. "B" .AND. -
 | 
			
		||||
	 F$EDIT (OPT,"TRIM,UPCASE") .NES. "N" 
 | 
			
		||||
$     THEN
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$	  GOTO RETRY
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF F$EDIT (OPT,"TRIM,UPCASE") .EQS. "B"
 | 
			
		||||
$     THEN
 | 
			
		||||
$	  IF PAGE_CTR .GT. 1
 | 
			
		||||
$	  THEN
 | 
			
		||||
$ 	      ROW = TOP_ROW
 | 
			
		||||
$	      PAGE_CTR = PAGE_CTR - 1
 | 
			
		||||
$ 	      REC_CTR = PAGE_'PAGE_CTR'_REC_CTR
 | 
			
		||||
$             PAGE_TXT = F$FAO (" Page !UL of !UL ", PAGE_CTR, PAGE_MAX)
 | 
			
		||||
$             _COL = P2 + (BOX_WIDTH - F$LENGTH (PAGE_TXT)) + 2
 | 
			
		||||
$             SAY ESC + "[''P3';''_COL'H''BOLD'''PAGE_TXT'''NORM'"
 | 
			
		||||
$             FILL_BOX 'P2' 'P3' 'P4' 'P5'
 | 
			
		||||
$	      GOTO DISPLAY_LOOP
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$             CALL INVALID_ENTRY
 | 
			
		||||
$	      GOTO RETRY
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF F$EDIT (OPT,"TRIM,UPCASE") .EQS. "N"
 | 
			
		||||
$     THEN
 | 
			
		||||
$	  IF PAGE_CTR .LT. PAGE_MAX
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      PAGE_CTR = PAGE_CTR + 1
 | 
			
		||||
$ 	      PAGE_'PAGE_CTR'_REC_CTR = REC_CTR
 | 
			
		||||
$             PAGE_TXT = F$FAO (" Page !UL of !UL ", PAGE_CTR, PAGE_MAX)
 | 
			
		||||
$             _COL = P2 + (BOX_WIDTH - F$LENGTH (PAGE_TXT)) + 2
 | 
			
		||||
$             SAY ESC + "[''P3';''_COL'H''BOLD'''PAGE_TXT'''NORM'"
 | 
			
		||||
$             FILL_BOX 'P2' 'P3' 'P4' 'P5'
 | 
			
		||||
$	  ELSE
 | 
			
		||||
$             CALL INVALID_ENTRY
 | 
			
		||||
$	      GOTO RETRY
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     FILL_BOX 'P2' 'P3' 'P4' 'P5'
 | 
			
		||||
$     ROW = TOP_ROW
 | 
			
		||||
$     GOTO WRAP_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ REC_CTR = REC_CTR + 1
 | 
			
		||||
$ ROW = ROW + 1
 | 
			
		||||
$ GOTO DISPLAY_LOOP
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_ENTRY: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''INPUT_ROW';01H", BELL, " Invalid Entry, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''INPUT_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE IFILE
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,759 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$SIGN_CERT.COM - SSL Sign Certificate Request procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure prompts the user through creating a Server Certificate.
 | 
			
		||||
$!
 | 
			
		||||
$! There are no parameters used.
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ PID = F$GETJPI ("","PID")
 | 
			
		||||
$ TT_NOECHO = F$GETDVI ("TT:","TT_NOECHO")
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = F$GETDVI ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = F$GETDVI ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA := CALL GET_USER_DATA
 | 
			
		||||
$ SET_USER_DATA := CALL SET_USER_DATA
 | 
			
		||||
$ DEL_USER_DATA := CALL DEL_USER_DATA
 | 
			
		||||
$ INIT_TERM := @SSL$COM:SSL$INIT_TERM
 | 
			
		||||
$ SHOW_FILE := @SSL$COM:SSL$SHOW_FILE 
 | 
			
		||||
$ SSL_CONF_FILE = F$TRNLMN ("SSL$CA_CONF")
 | 
			
		||||
$ GET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' GET
 | 
			
		||||
$ SET_CONF_DATA := @SSL$COM:SSL$CONF_UTIL 'SSL_CONF_FILE' SET
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BLNK = ESC + "[5m"    ! Turn on BLINK Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM
 | 
			
		||||
$ BCOLOR = BGD
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Sign Certificate Request"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Reading Configuration ...", NORM
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Initializing Configuration ...", NORM
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ _ca = "ca"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_ca = "CA_default_ca"
 | 
			
		||||
$ _default_ca_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_serfile = "SSL$DB:SERIAL.TXT"
 | 
			
		||||
$ _default_serfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_idxfile = "SSL$DB:INDEX.TXT"
 | 
			
		||||
$ _default_idxfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_crtfile = "SSL$CRT:SERVER_CA.CRT"
 | 
			
		||||
$ _default_crtfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_keyfile = "SSL$KEY:SERVER_CA.KEY"
 | 
			
		||||
$ _default_keyfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_csrfile = "SSL$CSR:SERVER.CSR"
 | 
			
		||||
$ _default_csrfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_sgnfile = "SSL$CRT:SIGNED.CRT"
 | 
			
		||||
$ _default_sgnfile_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_newcert = "SSL$CRT"
 | 
			
		||||
$ _default_newcert_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_md = "md5"
 | 
			
		||||
$ _default_md_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_days = "365"
 | 
			
		||||
$ _default_days_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_policy = "policy_anything"
 | 
			
		||||
$ _default_policy_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_countryName = "optional"
 | 
			
		||||
$ _policy_countryName_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_stateOrProvinceName = "optional"
 | 
			
		||||
$ _policy_stateOrProvinceName_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_localityName = "optional"
 | 
			
		||||
$ _policy_localityName_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_organizationName = "optional"
 | 
			
		||||
$ _policy_organizationName_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_organizationalUnitName = "optional"
 | 
			
		||||
$ _policy_organizationalUnitName_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_commonName = "supplied"
 | 
			
		||||
$ _policy_commonName_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _policy_emailAddress = "optional"
 | 
			
		||||
$ _policy_emailAddress_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _default_x509_extensions = "CA_x509_extensions"
 | 
			
		||||
$ _default_x509_extensions_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _x509_basicContraints = "CA:FALSE"
 | 
			
		||||
$ _x509_basicContraints_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _x509_nsCertType = "client,email,objsign,server"
 | 
			
		||||
$ _x509_nsCertType_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _x509_nsComment = "SSL Generated Certificate"
 | 
			
		||||
$ _x509_nsComment_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _x509_subjectKeyIdentifier = "hash"
 | 
			
		||||
$ _x509_subjectKeyIdentifier_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ _x509_authorityKeyIdentifier = "keyid,issuer:always"
 | 
			
		||||
$ _x509_authorityKeyIdentifier_upd = "Y"
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''SSL_CONF_FILE'") .NES. ""
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     GET_CONF_DATA "[''_ca']#default_ca"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         _default_ca = SSL_CONF_DATA
 | 
			
		||||
$         _default_ca_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#serial"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_serfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[DB]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERIAL",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".TXT",,"TYPE") 
 | 
			
		||||
$         _default_serfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#database"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_idxfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[DB]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"INDEX",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".TXT",,"TYPE") 
 | 
			
		||||
$         _default_idxfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#certificate"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_crtfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[CRT]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER_CA",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".CRT",,"TYPE") 
 | 
			
		||||
$         _default_crtfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#private_key"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_keyfile = F$PARSE (SSL_CONF_DATA,"SSL$ROOT:",,"DEVICE") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"[KEY]",,"DIRECTORY") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,"SERVER_CA",,"NAME") + -
 | 
			
		||||
 		             F$PARSE (SSL_CONF_DATA,".KEY",,"TYPE") 
 | 
			
		||||
$         _default_keyfile_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#new_certs_dir"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_newcert = SSL_CONF_DATA
 | 
			
		||||
$         _default_newcert_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#default_md"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_md = SSL_CONF_DATA
 | 
			
		||||
$         _default_md_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#default_days"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_days = SSL_CONF_DATA
 | 
			
		||||
$         _default_days_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#policy"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_policy = SSL_CONF_DATA
 | 
			
		||||
$         _default_policy_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#countryName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_countryName = SSL_CONF_DATA
 | 
			
		||||
$         _policy_countryName_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#stateOrProvinceName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_stateOrProvinceName = SSL_CONF_DATA
 | 
			
		||||
$         _policy_stateOrProvinceName_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#localityName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_localityName = SSL_CONF_DATA
 | 
			
		||||
$         _policy_localityName_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#organizationName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_organizationName = SSL_CONF_DATA
 | 
			
		||||
$         _policy_organizationName_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#organizationalUnitName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_organizationalUnitName = SSL_CONF_DATA
 | 
			
		||||
$         _policy_organizationalUnitName_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#commonName"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_commonName = SSL_CONF_DATA
 | 
			
		||||
$         _policy_commonName_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_policy']#emailAddress"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _policy_emailAddress = SSL_CONF_DATA
 | 
			
		||||
$         _policy_emailAddress_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_ca']#x509_extensions"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _default_x509_extensions = SSL_CONF_DATA
 | 
			
		||||
$         _default_x509_extensions_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_x509_extensions']#basicConstraints"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _x509_basicConstraints = SSL_CONF_DATA
 | 
			
		||||
$         _x509_basicConstraints_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_x509_extensions']#nsCertType"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _x509_nsCertType = SSL_CONF_DATA
 | 
			
		||||
$         _x509_nsCertType_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_x509_extensions']#nsComment"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _x509_nsComment = SSL_CONF_DATA
 | 
			
		||||
$         _x509_nsComment_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_x509_extensions']#subjectKeyIdentifier"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _x509_subjectKeyIdentifier = SSL_CONF_DATA
 | 
			
		||||
$         _x509_subjectKeyIdentifier_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     GET_CONF_DATA "[''_default_x509_extensions']#authorityKeyIdentifier"
 | 
			
		||||
$     IF SSL_CONF_DATA .NES. ""
 | 
			
		||||
$     THEN
 | 
			
		||||
$         _x509_authorityKeyIdentifier = SSL_CONF_DATA
 | 
			
		||||
$         _x509_authorityKeyIdentifier_upd = "N"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SET_USER_DATA "[''_ca']#default_ca#D#''_default_ca'##S###''_default_ca_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#serial#D#''_default_serfile'#Serial File ?#F###''_default_serfile_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#database#D#''_default_idxfile'#Database File ?#F###''_default_idxfile_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#certificate#D#''_default_crtfile'#CA Certificate File ?#F###''_default_crtfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#private_key#D#''_default_keyfile'#CA Certificate Key File ?#F###''_default_keyfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#default_csrfile#-#''_default_csrfile'#Certificate Request File ?#F###''_default_csrfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#default_sgnfile#-#''_default_sgnfile'#Signed Certificate File ?#F###''_default_sgnfile_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#new_certs_dir#D#''_default_newcert'#New Certificate Directory ?#S###''_default_newcert_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#default_md#D#''_default_md'#Default Digest ?#I###''_default_md_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#default_days#D#''_default_days'#Default Days ?#I###''_default_days_upd'#Y#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#policy#D#''_default_policy'#Default Policy ?#S###''_default_policy_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#countryName#D#''_policy_countryName'#Country Name Policy ?#S###''_policy_countryName_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#stateOrProvinceName#D#''_policy_stateOrProvinceName'#State or Province Name Policy ?#S###''_policy_stateOrProvinceName_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#localityName#D#''_policy_localityName'#Locality Name Policy ?#S###''_policy_localityName_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#organizationName#D#''_policy_organizationName'#Organization Name Policy ?#S###''_policy_organizationName_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#organizationalUnitName#D#''_policy_organizationalUnitName'#Organization Unit Name Policy ?#S###''_policy_organizationalUnitName_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#commonName#D#''_policy_commonName'#Common Name Policy ?#S###''_policy_commonName_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_policy']#emailAddress#D#''_policy_emailAddress'#Email Address Policy ?#S###''_policy_emailAddress_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_ca']#x509_extensions#D#''_default_x509_extensions'#X509 Extensions ?#S###''_default_x509_extensions_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_x509_extensions']#basicConstraints#D#''_x509_basicConstraints'#X509 Basic Constraints ?#S###''_x509_basicConstraints_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_x509_extensions']#nsCertType#D#''_x509_nsCertType'#X509 NS Cert Type ?#S###''_x509_nsCertType_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_x509_extensions']#nsComment#D#''_x509_nsComment'#X509 NS Comment ?#S###''_x509_nsComment_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_x509_extensions']#subjectKeyIdentifier#D#''_x509_subjectKeyIdentifier'#X509 Subject Key Identifier ?#S###''_x509_subjectKeyIdentifier_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[''_default_x509_extensions']#authorityKeyIdentifier#D#''_x509_authorityKeyIdentifier'#X509 Authority Key Identifier ?#S###''_x509_authorityKeyIdentifier_upd'#N#N"
 | 
			
		||||
$ SET_USER_DATA "[]#pem_pass_phrase#-##PEM Pass Phrase ?#P#1###Y#N"
 | 
			
		||||
$ SET_USER_DATA "[]#display_certificate#-#N#Display the Certificate ?#S##1##Y#N"
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Confirm/Update the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input  ?
 | 
			
		||||
$     CONFIRMED = 0
 | 
			
		||||
$     IF REQ .EQS. "N"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ROW .GT. MSG_ROW - 2
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SAY ESC + "[''TOP_ROW';01H", CEOS
 | 
			
		||||
$	  ROW = TOP_ROW
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$CONFIRM_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$     IF PRM .EQS. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''ITM' ? [''DEF'] ''CEOL'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         PROMPT = ESC + "[''ROW';''COL'H''PRM' [''DEF'] ''CEOL'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /NOECHO
 | 
			
		||||
$     ASK "''PROMPT'" ANS /END_OF_FILE=EXIT
 | 
			
		||||
$     IF TYP .EQS. "P" THEN SET TERMINAL /ECHO
 | 
			
		||||
$     ANS = F$EDIT (ANS,"TRIM")
 | 
			
		||||
$     IF ANS .EQS. "" THEN ANS = DEF
 | 
			
		||||
$     IF TYP .EQS. "F"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         ANS = F$PARSE ("''ANS'","''DEF'",,,"SYNTAX_ONLY")
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF TYP .EQS. "I" .AND. F$TYPE (ANS) .NES. "INTEGER"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$         GOTO PROMPT_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF (TYP .EQS. "S" .OR. TYP .EQS. "P") .AND. -
 | 
			
		||||
         ((MIN .NES. "" .AND. F$LENGTH (ANS) .LT. F$INTEGER(MIN)) .OR. -
 | 
			
		||||
          (MAX .NES. "" .AND. F$LENGTH (ANS) .GT. F$INTEGER(MAX)))
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CALL INVALID_ENTRY
 | 
			
		||||
$         SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$	  IF TYP .EQS. "S" THEN GOTO PROMPT_LOOP
 | 
			
		||||
$         IF TYP .EQS. "P" THEN GOTO CONFIRM_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     ROW = ROW + 1
 | 
			
		||||
$     IF CFM .EQS. "Y"
 | 
			
		||||
$     THEN
 | 
			
		||||
$         IF CONFIRMED .EQ. 0
 | 
			
		||||
$	  THEN
 | 
			
		||||
$	      CONFIRMED = 1
 | 
			
		||||
$	      CONFIRMED_ANS = ANS
 | 
			
		||||
$	      PRM = "Confirm ''PRM'"
 | 
			
		||||
$	      GOTO CONFIRM_LOOP
 | 
			
		||||
$         ELSE
 | 
			
		||||
$	      IF ANS .NES. CONFIRMED_ANS
 | 
			
		||||
$	      THEN 
 | 
			
		||||
$                 CALL INVALID_ENTRY
 | 
			
		||||
$		  ROW = ROW - 2
 | 
			
		||||
$                 SAY ESC + "[''ROW';01H", CEOS
 | 
			
		||||
$                 GOTO PROMPT_LOOP
 | 
			
		||||
$	      ENDIF
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF ANS .NES. DEF THEN SSL_USER_DATA_'CTR' = "''KEY'#''ITM'#''VAL'#''ANS'#''PRM'#''TYP'#''MIN'#''MAX'#Y#''REQ'#''CFM'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO PROMPT_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Save the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Saving Configuration ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$SAVE_CONF_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     TYP = F$ELEMENT (5,"#",SSL_USER_DATA_'CTR') ! Value Type
 | 
			
		||||
$     MIN = F$ELEMENT (6,"#",SSL_USER_DATA_'CTR') ! Value Minimum Length
 | 
			
		||||
$     MAX = F$ELEMENT (7,"#",SSL_USER_DATA_'CTR') ! Value Maximum Length
 | 
			
		||||
$     UPD = F$ELEMENT (8,"#",SSL_USER_DATA_'CTR') ! Entry Updated ?
 | 
			
		||||
$     REQ = F$ELEMENT (9,"#",SSL_USER_DATA_'CTR') ! Entry Required for Input ?
 | 
			
		||||
$     CFM = F$ELEMENT (10,"#",SSL_USER_DATA_'CTR')! Confirm Input ?
 | 
			
		||||
$     IF UPD .NES. "Y" .OR. VAL .EQS. "-"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO SAVE_CONF_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "D"
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''DEF'"
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'" "''PRM'"
 | 
			
		||||
$         SET_CONF_DATA "''KEY'#''ITM'_default" "''DEF'"
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF MIN .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_min" "''MIN'"
 | 
			
		||||
$     IF MAX .NES. "" THEN SET_CONF_DATA "''KEY'#''ITM'_max" "''MAX'"
 | 
			
		||||
$     CTR = CTR + 1
 | 
			
		||||
$     GOTO SAVE_CONF_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ PURGE /NOLOG /NOCONFIRM 'SSL_CONF_FILE'
 | 
			
		||||
$ RENAME 'SSL_CONF_FILE'; ;1
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Certificiate Authority
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SKIP:
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Signing Certificate Request ...", NORM
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = 2
 | 
			
		||||
$ Y1 = TOP_ROW
 | 
			
		||||
$ X2 = TT_COLS - 2
 | 
			
		||||
$ Y2 = MSG_ROW - 1
 | 
			
		||||
$!
 | 
			
		||||
$ GET_USER_DATA "[]#pem_pass_phrase"
 | 
			
		||||
$ _pem_pass_phrase = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[''_default_ca']#database"
 | 
			
		||||
$ _default_idxfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[''_default_ca']#serial"
 | 
			
		||||
$ _default_serfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#default_csrfile"
 | 
			
		||||
$ _default_csrfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#default_sgnfile"
 | 
			
		||||
$ _default_sgnfile = SSL_USER_DATA
 | 
			
		||||
$ GET_USER_DATA "[]#display_certificate"
 | 
			
		||||
$ _display_certificate = SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''_default_idxfile'") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     OPEN /WRITE OFILE '_default_idxfile'
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("''_default_serfile'") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     OPEN /WRITE OFILE '_default_serfile'
 | 
			
		||||
$     WRITE OFILE "01"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SHOW SYSTEM /FULL /OUT=SYS$LOGIN:SSL_CA_'PID'.RND
 | 
			
		||||
$!
 | 
			
		||||
$ OPEN /WRITE OFILE SYS$LOGIN:SSL_CA_'PID'.COM
 | 
			
		||||
$ WRITE OFILE "$ SET NOON"
 | 
			
		||||
$ WRITE OFILE "$ SET MESSAGE /NOFACILITY /NOIDENTIFICATION /NOSEVERITY /NOTEXT"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG RANDFILE    SYS$LOGIN:SSL_CA_''PID'.RND"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_CA_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_CA_''PID'.LOG"
 | 
			
		||||
$ WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$ WRITE OFILE "$ OPENSSL ca -config ''SSL_CONF_FILE' -out ''_default_sgnfile' -infiles ''_default_csrfile'"
 | 
			
		||||
$ WRITE OFILE "''_pem_pass_phrase'"
 | 
			
		||||
$ WRITE OFILE "y"
 | 
			
		||||
$ WRITE OFILE "y"
 | 
			
		||||
$ WRITE OFILE "$ SET MESSAGE /FACILITY /IDENTIFICATION /SEVERITY /TEXT"
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ @SYS$LOGIN:SSL_CA_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.RND;*
 | 
			
		||||
$ DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ SEARCH SYS$LOGIN:SSL_CA_'PID'.LOG /OUT=SYS$LOGIN:SSL_CA_'PID'.ERR "error:"
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_CA_''PID'.ERR") .NES. "" 
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_CA_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.ERR;*
 | 
			
		||||
$         SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$         SHOW_FILE "SYS$LOGIN:SSL_CA_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.LOG;*
 | 
			
		||||
$         GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.ERR;*
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.LOG;*
 | 
			
		||||
$! 
 | 
			
		||||
$ IF F$EDIT (_display_certificate,"TRIM,UPCASE") .EQS. "Y"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H", BLNK, " Generating Output ...", NORM, CEOL
 | 
			
		||||
$!
 | 
			
		||||
$     OPEN /WRITE OFILE SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL x509 -noout -text -in ''_default_sgnfile'"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$     @SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$     DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$     SEARCH SYS$LOGIN:SSL_X509_'PID'.LOG /OUT=SYS$LOGIN:SSL_X509_'PID'.ERR ":error:"
 | 
			
		||||
$     IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.ERR") .NES. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_X509_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$         THEN 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$             SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$             SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$             GOTO EXIT
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$     SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ''_default_sgnfile' >" 
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$     GOTO EXIT
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "Press return to continue"
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$ PROMPT = ESC + "[''MSG_ROW';''COL'H''TEXT'"
 | 
			
		||||
$ ASK "''PROMPT'" OPT
 | 
			
		||||
$!
 | 
			
		||||
$GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Set the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$SET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     SSL_USER_DATA_MAX == 1
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX + 1
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_USER_DATA_'SSL_USER_DATA_MAX' == "''P1'"
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Find the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ USER_KEY = F$ELEMENT (0,"#",P1)
 | 
			
		||||
$ USER_ITM = F$ELEMENT (1,"#",P1)
 | 
			
		||||
$!
 | 
			
		||||
$GET_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF CTR .LE. SSL_USER_DATA_MAX
 | 
			
		||||
$ THEN
 | 
			
		||||
$     KEY = F$ELEMENT (0,"#",SSL_USER_DATA_'CTR') ! Key Name
 | 
			
		||||
$     ITM = F$ELEMENT (1,"#",SSL_USER_DATA_'CTR') ! Item Name
 | 
			
		||||
$     VAL = F$ELEMENT (2,"#",SSL_USER_DATA_'CTR') ! Item Value Contains Default or Prompt
 | 
			
		||||
$     DEF = F$ELEMENT (3,"#",SSL_USER_DATA_'CTR') ! Default Value
 | 
			
		||||
$     PRM = F$ELEMENT (4,"#",SSL_USER_DATA_'CTR') ! Prompt Value
 | 
			
		||||
$     IF USER_KEY .NES. KEY .OR. USER_ITM .NES. ITM
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         CTR = CTR + 1
 | 
			
		||||
$         GOTO GET_USER_DATA_LOOP
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF VAL .EQS. "-" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "D" THEN SSL_USER_DATA == "''DEF'"
 | 
			
		||||
$     IF VAL .EQS. "P" THEN SSL_USER_DATA == "''PRM'"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Delete the User Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_MAX) .EQS. "" THEN GOTO DEL_USER_DATA_END
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA_'SSL_USER_DATA_MAX') .NES. "" 
 | 
			
		||||
$ THEN
 | 
			
		||||
$     DELETE /SYMBOL /GLOBAL SSL_USER_DATA_'SSL_USER_DATA_MAX'
 | 
			
		||||
$     SSL_USER_DATA_MAX == SSL_USER_DATA_MAX - 1
 | 
			
		||||
$     GOTO DEL_USER_DATA_LOOP
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE /SYMBOL /GLOBAL SSL_USER_DATA_MAX
 | 
			
		||||
$!
 | 
			
		||||
$DEL_USER_DATA_END:
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_USER_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the invalid entry 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$INVALID_ENTRY: SUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BELL, " Invalid Entry, Try again ...''CEOL'"
 | 
			
		||||
$ Wait 00:00:01.5
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
$!
 | 
			
		||||
$ ENDSUBROUTINE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit the procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ DEASSIGN SYS$OUTPUT
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ DEASSIGN SYS$ERROR
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ DEL_USER_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_CONF_DATA) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_CONF_DATA
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$GETDVI ("TT:","TT_NOECHO") .AND. .NOT. TT_NOECHO THEN SET TERMINAL /ECHO
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_CA_''PID'.%%%;*") .NES. "" THEN DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_CA_'PID'.%%%;*
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.%%%;*") .NES. "" THEN DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.%%%;*
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
@@ -1,245 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! SSL$VIEW_CERT.COM - SSL View Certificate procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (0)
 | 
			
		||||
$ Set NoOn
 | 
			
		||||
$ Set NoControl=Y
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Description 
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$! This procedure prompts the user through creating a Server Certificate.
 | 
			
		||||
$!
 | 
			
		||||
$! The parameters used are:
 | 
			
		||||
$!
 | 
			
		||||
$! 	P1	- Certificate or Certificate Request (i.e. "CRT" or "CSR")
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Define symbols
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ DELETE := DELETE
 | 
			
		||||
$ SAY := WRITE SYS$OUTPUT
 | 
			
		||||
$ ASK := READ SYS$COMMAND /END_OF_FILE=EXIT /PROMPT=
 | 
			
		||||
$ PID = F$GETJPI ("","PID")
 | 
			
		||||
$ TT_NOECHO = F$GETDVI ("TT:","TT_NOECHO")
 | 
			
		||||
$ On Control_Y THEN GOTO EXIT
 | 
			
		||||
$ Set Control=Y
 | 
			
		||||
$!
 | 
			
		||||
$ TT_ROWS = F$GETDVI ("TT:","TT_PAGE")
 | 
			
		||||
$ TT_COLS = F$GETDVI ("TT:","DEVBUFSIZ")
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM := @SSL$COM:SSL$INIT_TERM
 | 
			
		||||
$ PICK_FILE := @SSL$COM:SSL$PICK_FILE 
 | 
			
		||||
$ SHOW_FILE := @SSL$COM:SSL$SHOW_FILE 
 | 
			
		||||
$!
 | 
			
		||||
$ ESC[0,8] = 27 	! Set the Escape Character
 | 
			
		||||
$ BELL[0,8] = 7 	! Ring the terminal Bell
 | 
			
		||||
$ RED = 1		! Color - Red
 | 
			
		||||
$ FGD = 30		! Foreground
 | 
			
		||||
$ BGD = 0		! Background
 | 
			
		||||
$ CSCR = ESC + "[2J"	! Clear the Screen 
 | 
			
		||||
$ CEOS = ESC + "[0J"	! Clear to the End of the Screen 
 | 
			
		||||
$ CEOL = ESC + "[0K"	! Clear to the End of the Line
 | 
			
		||||
$ NORM = ESC + "[0m"	! Turn Attributes off
 | 
			
		||||
$ BLNK = ESC + "[5m"    ! Turn on BLINK Attribute
 | 
			
		||||
$ WIDE = ESC + "#6"     ! Turn on WIDE Attribute
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Run the SSL setup if it hasn't been run yet
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TRNLNM ("SSL$ROOT") .EQS. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$     IF F$SEARCH ("SSL$COM:SSL$INIT_ENV.COM") .NES. ""
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         @SSL$COM:SSL$INIT_ENV.COM
 | 
			
		||||
$     ELSE
 | 
			
		||||
$         SAY BELL, "Unable to locate SSL$COM:SSL$INIT_ENV.COM ..."
 | 
			
		||||
$	  GOTO EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Display the Page Header
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ INIT_TERM
 | 
			
		||||
$ BCOLOR = BGD
 | 
			
		||||
$ FCOLOR = FGD + RED
 | 
			
		||||
$ COLOR = ESC + "[''BCOLOR';''FCOLOR'm"
 | 
			
		||||
$!
 | 
			
		||||
$ TEXT = "SSL Certificate Tool"
 | 
			
		||||
$ COL = (TT_COLS - (F$LENGTH (TEXT) * 2)) / 4
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[01;01H", CSCR
 | 
			
		||||
$ SAY ESC + "[02;''COL'H", COLOR, WIDE, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CSR"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     TEXT = "View Certificate Request"
 | 
			
		||||
$ ELSE
 | 
			
		||||
$     TEXT = "View Certificate"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$ COL = (TT_COLS - F$LENGTH (TEXT)) / 2
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[04;01H"
 | 
			
		||||
$ SAY ESC + "[04;''COL'H", COLOR, TEXT, NORM
 | 
			
		||||
$!
 | 
			
		||||
$ CTR = 1
 | 
			
		||||
$ ROW = 6
 | 
			
		||||
$ COL = 2
 | 
			
		||||
$ TOP_ROW = ROW
 | 
			
		||||
$ MSG_ROW = TT_ROWS - 1
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Initialize the Request Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .NES. "CRT" .AND. P1 .NES. "CSR"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     PRM = "Display File:"
 | 
			
		||||
$     DEF = "*.*"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRT"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     PRM = "Display Certificate File:"
 | 
			
		||||
$     DEF = "SSL$CRT:*.CRT"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CSR"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     PRM = "Display Certificate Request File:"
 | 
			
		||||
$     DEF = "SSL$CSR:*.CSR"
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", CEOS
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Confirm/Update the SSL Configuration Data
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$PROMPT_LOOP:
 | 
			
		||||
$!
 | 
			
		||||
$ PROMPT = ESC + "[''ROW';''COL'H''PRM' ? [''DEF'] ''CEOL'"
 | 
			
		||||
$ ASK "''PROMPT'" _view_file_name
 | 
			
		||||
$ _view_file_name = F$EDIT (_view_file_name,"TRIM")
 | 
			
		||||
$ IF _view_file_name .EQS. "" THEN _view_file_name = DEF
 | 
			
		||||
$!
 | 
			
		||||
$ X1 = 2
 | 
			
		||||
$ Y1 = TOP_ROW
 | 
			
		||||
$ X2 = TT_COLS - 2
 | 
			
		||||
$ Y2 = MSG_ROW - 1
 | 
			
		||||
$!
 | 
			
		||||
$PICK_FILE:
 | 
			
		||||
$!
 | 
			
		||||
$ PICK_FILE "''_view_file_name'" 'X1' 'Y1' 'X2' 'Y2' "< Select a File >" 
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''TOP_ROW';01H", CEOS
 | 
			
		||||
$! 
 | 
			
		||||
$ IF SSL_FILE_NAME .EQS. "" THEN GOTO EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Create the Certificiate Authority
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H", BLNK, " Generating Output ...", NORM, CEOL
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CRT"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     OPEN /WRITE OFILE SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_X509_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL x509 -noout -text -in ''SSL_FILE_NAME'"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$     @SYS$LOGIN:SSL_X509_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$     DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$     SEARCH SYS$LOGIN:SSL_X509_'PID'.LOG /OUT=SYS$LOGIN:SSL_X509_'PID'.ERR ":error:"
 | 
			
		||||
$     IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.ERR") .NES. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_X509_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$         THEN 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$             SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$             SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$             GOTO EXIT
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.ERR;*
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$     SHOW_FILE "SYS$LOGIN:SSL_X509_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ''SSL_FILE_NAME' >" 
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.LOG;*
 | 
			
		||||
$     GOTO PICK_FILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .EQS. "CSR"
 | 
			
		||||
$ THEN 
 | 
			
		||||
$     OPEN /WRITE OFILE SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$ERROR   SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$OUTPUT  SYS$LOGIN:SSL_REQ_''PID'.LOG"
 | 
			
		||||
$     WRITE OFILE "$ DEFINE /USER /NOLOG SYS$COMMAND SYS$INPUT"
 | 
			
		||||
$     WRITE OFILE "$ OPENSSL req -noout -text -in ''SSL_FILE_NAME'"
 | 
			
		||||
$     CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$     @SYS$LOGIN:SSL_REQ_'PID'.COM
 | 
			
		||||
$!
 | 
			
		||||
$     DELETE/NOLOG/NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.COM;*
 | 
			
		||||
$!
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$     DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$     SEARCH SYS$LOGIN:SSL_REQ_'PID'.LOG /OUT=SYS$LOGIN:SSL_REQ_'PID'.ERR ":error:"
 | 
			
		||||
$     IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.ERR") .NES. "" 
 | 
			
		||||
$     THEN 
 | 
			
		||||
$         IF F$FILE_ATTRIBUTE ("SYS$LOGIN:SSL_REQ_''PID'.ERR","ALQ") .NE. 0
 | 
			
		||||
$         THEN 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$             SAY ESC + "[''MSG_ROW';01H''BELL'''CEOS'"
 | 
			
		||||
$             SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ERROR >" 
 | 
			
		||||
$             DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$             GOTO EXIT
 | 
			
		||||
$         ENDIF
 | 
			
		||||
$         DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.ERR;*
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$     SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$     SHOW_FILE "SYS$LOGIN:SSL_REQ_''PID'.LOG" 'X1' 'Y1' 'X2' 'Y2' "< ''SSL_FILE_NAME' >" 
 | 
			
		||||
$     DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.LOG;*
 | 
			
		||||
$     GOTO PICK_FILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ SAY ESC + "[''MSG_ROW';01H''CEOS'"
 | 
			
		||||
$ SHOW_FILE "''SYS$LOGIN:SSL_FILE_NAME'" 'X1' 'Y1' 'X2' 'Y2' "< ''SSL_FILE_NAME' >"
 | 
			
		||||
$ GOTO PICK_FILE
 | 
			
		||||
$!
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$! Exit the procedure
 | 
			
		||||
$!------------------------------------------------------------------------------
 | 
			
		||||
$!
 | 
			
		||||
$EXIT:
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$ERROR  NL:
 | 
			
		||||
$ DEFINE /USER /NOLOG SYS$OUTPUT NL:
 | 
			
		||||
$ CLOSE OFILE
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$TYPE (SSL_FILE_NAME) .NES. "" THEN DELETE /SYMBOL /GLOBAL SSL_FILE_NAME
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$GETDVI ("TT:","TT_NOECHO") .AND. .NOT. TT_NOECHO THEN SET TERMINAL /ECHO
 | 
			
		||||
$!
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_REQ_''PID'.%%%;*") .NES. "" THEN DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_REQ_'PID'.%%%;*
 | 
			
		||||
$ IF F$SEARCH ("SYS$LOGIN:SSL_X509_''PID'.%%%;*") .NES. "" THEN DELETE /NOLOG /NOCONFIRM SYS$LOGIN:SSL_X509_'PID'.%%%;*
 | 
			
		||||
$!
 | 
			
		||||
$ Verify = F$VERIFY (Verify)
 | 
			
		||||
$!
 | 
			
		||||
$ EXIT
 | 
			
		||||
							
								
								
									
										128
									
								
								VMS/install.com
									
									
									
									
									
								
							
							
						
						
									
										128
									
								
								VMS/install.com
									
									
									
									
									
								
							@@ -26,129 +26,47 @@ $	DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
 | 
			
		||||
$	DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
 | 
			
		||||
$	DEFINE/NOLOG WRK_SSLCERTS WRK_SSLROOT:[CERTS]
 | 
			
		||||
$	DEFINE/NOLOG WRK_SSLPRIVATE WRK_SSLROOT:[PRIVATE]
 | 
			
		||||
$	DEFINE/NOLOG WRK_SSLCOM WRK_SSLROOT:[COM]
 | 
			
		||||
$
 | 
			
		||||
$	IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
 | 
			
		||||
	   CREATE/DIR/LOG WRK_SSLROOT:[000000]
 | 
			
		||||
$	IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
 | 
			
		||||
	   CREATE/DIR/LOG WRK_SSLINCLUDE:
 | 
			
		||||
$!	IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN -
 | 
			
		||||
$!	   CREATE/DIR/LOG WRK_SSLROOT:[VMS]
 | 
			
		||||
$	IF F$PARSE("WRK_SSLCOM:") .EQS. "" THEN -
 | 
			
		||||
	   CREATE/DIR/LOG WRK_SSLROOT:[COM]
 | 
			
		||||
$	IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN -
 | 
			
		||||
	   CREATE/DIR/LOG WRK_SSLROOT:[VMS]
 | 
			
		||||
$
 | 
			
		||||
$	IF F$SEARCH("WRK_SSLINCLUDE:vms_idhacks.h") .NES. "" THEN -
 | 
			
		||||
	   DELETE WRK_SSLINCLUDE:vms_idhacks.h;*
 | 
			
		||||
$
 | 
			
		||||
$	OPEN/WRITE SF WRK_SSLCOM:SSL$STARTUP.COM
 | 
			
		||||
$	WRITE SYS$OUTPUT "%OPEN-I-CREATED,  ",F$SEARCH("WRK_SSLCOM:SSL$STARTUP.COM")," created."
 | 
			
		||||
$	WRITE SF "$! Startup file for SSL 0.9.2-RL 15-Mar-1999"
 | 
			
		||||
$	OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
 | 
			
		||||
$	WRITE SYS$OUTPUT "%OPEN-I-CREATED,  ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created."
 | 
			
		||||
$	WRITE SF "$! Startup file for Openssl 0.9.2-RL 15-Mar-1999"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$! Do not edit this file, as it will be regenerated during next installation."
 | 
			
		||||
$	WRITE SF "$! Instead, add or change SSL$COM:SSL$SYSTARTUP.COM"
 | 
			
		||||
$	WRITE SF "$! Instead, add or change SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$! P1	a qualifier to DEFINE.  For example ""/SYSTEM"" to get the logical names"
 | 
			
		||||
$	WRITE SF "$!	defined in the system logical name table."
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$	ARCH = ""VAX"""
 | 
			
		||||
$	WRITE SF "$	IF F$GETSYI(""CPU"") .GE. 128 THEN ARCH = ""ALPHA"""
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$ IF F$SEARCH(""SYS$STARTUP:SSL$DEFINE_ROOT.COM"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "$	@SYS$STARTUP:SSL$DEFINE_ROOT.COM"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	SSL$CERTS	SSL$ROOT:[CERTS]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	SSL$COM		SSL$ROOT:[COM]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	SSL$EXE		SSL$ROOT:['ARCH'_EXE]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	SSL$INCLUDE	SSL$ROOT:[INCLUDE]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	SSL$KEY		SSL$ROOT:[CERTS]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	SSL$PRIVATE	SSL$ROOT:[PRIVATE]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	SSLROOT		",ROOT,".] /TRANS=CONC"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	SSLLIB		SSLROOT:['ARCH'_LIB]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	SSLINCLUDE	SSLROOT:[INCLUDE]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	SSLEXE		SSLROOT:['ARCH'_EXE]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	SSLCERTS	SSLROOT:[CERTS]"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	SSLPRIVATE	SSLROOT:[PRIVATE]"
 | 
			
		||||
$	WRITE SF "$"
 | 
			
		||||
$	WRITE SF "$!	This is program can include <openssl/{foo}.h>"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG/SYSTEM/EXEC	OPENSSL		SSL$INCLUDE:"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$	IF F$SEARCH(""SSL$COM:SSL$SYSTARTUP.COM"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	   @SSL$COM:SSL$SYSTARTUP.COM"
 | 
			
		||||
$	WRITE SF "$	DEFINE/NOLOG'P1	OPENSSL		SSLINCLUDE:"
 | 
			
		||||
$	WRITE SF "$"
 | 
			
		||||
$	WRITE SF "$	IF F$SEARCH(""SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	   @SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
 | 
			
		||||
$	WRITE SF "$"
 | 
			
		||||
$	WRITE SF "$	EXIT"
 | 
			
		||||
$	CLOSE SF
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLCOM:SSL$STARTUP.COM
 | 
			
		||||
$!
 | 
			
		||||
$	OPEN/WRITE SF WRK_SSLCOM:SSL$SHUTDOWN.COM
 | 
			
		||||
$	WRITE SYS$OUTPUT "%OPEN-I-CREATED,  ",F$SEARCH("WRK_SSLCOM:SSL$SHUTDOWN.COM")," created."
 | 
			
		||||
$	WRITE SF "$! Shutdown file for SSL"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$! Do not edit this file, as it will be regenerated during next installation."
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$	ARCH = ""VAX"""
 | 
			
		||||
$	WRITE SF "$	IF F$GETSYI(""CPU"") .GE. 128 THEN ARCH = ""ALPHA"""
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$ IF F$SEARCH(""SSL$COM:SSL$SYSHUTDOWN.COM"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	@SSL$COM:SSL$SYSHUTDOWN.COM"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$CERTS"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	SSL$CERTS"
 | 
			
		||||
$!
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$COM"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	SSL$COM"
 | 
			
		||||
$!
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$EXE"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	SSL$EXE"
 | 
			
		||||
$!
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$INCLUDE"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	SSL$INCLUDE"
 | 
			
		||||
$!
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$KEY"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	SSL$KEY"
 | 
			
		||||
$!
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$PRIVATE"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	SSL$PRIVATE"
 | 
			
		||||
$!
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""OPENSSL"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC	OPENSSL"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$ IF F$TRNLNM(""SSL$ROOT"") .NES."""" THEN -"
 | 
			
		||||
$	WRITE SF "	DEASSIGN/SYSTEM/EXEC SSL$ROOT"
 | 
			
		||||
$	WRITE SF "$!"
 | 
			
		||||
$	WRITE SF "$	EXIT"
 | 
			
		||||
$	CLOSE SF
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLCOM:SSL$SHUTDOWN.COM
 | 
			
		||||
$!
 | 
			
		||||
$	COPY SSL$UTILS.COM WRK_SSLCOM:/LOG
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLCOM:SSL$UTILS.COM
 | 
			
		||||
$!
 | 
			
		||||
$	COPY SSL$SYSTARTUP.COM WRK_SSLCOM:/LOG
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLCOM:SSL$SYSTARTUP.COM
 | 
			
		||||
$	COPY SSL$SYSHUTDOWN.COM WRK_SSLCOM:/LOG
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLCOM:SSL$SYSHUTDOWN.COM
 | 
			
		||||
$!
 | 
			
		||||
$	CERT_DIR := [.CERT_TOOL]
 | 
			
		||||
$	CERT_FILES := SSL$AUTH_CERT.COM,SSL$AUTO_CERT.COM,SSL$CERT_TOOL.COM, -
 | 
			
		||||
		      SSL$CONF_UTIL.COM,SSL$DRAW_BOX.COM,SSL$EXIT_CMD.TPU, -
 | 
			
		||||
		      SSL$FILL_BOX.COM,SSL$HASH_CERT.COM,SSL$HOSTADDR.EXE, -
 | 
			
		||||
		      SSL$HOSTNAME.EXE,SSL$INIT_ENV.COM,SSL$INIT_TERM.COM, -
 | 
			
		||||
		      SSL$PICK_FILE.COM,SSL$RQST_CERT.COM,SSL$SELF_CERT.COM, -
 | 
			
		||||
		      SSL$SHOW_FILE.COM,SSL$SIGN_CERT.COM,SSL$VIEW_CERT.COM, -
 | 
			
		||||
		      SSL$REM_ENV.COM
 | 
			
		||||
$!
 | 
			
		||||
$	I = 0
 | 
			
		||||
$ LOOP:
 | 
			
		||||
$       CF = F$EDIT(F$ELEMENT(I, ",", CERT_FILES),"TRIM")
 | 
			
		||||
$       I = I + 1
 | 
			
		||||
$       IF CF .EQS. "," THEN GOTO LOOP_END
 | 
			
		||||
$       SET NOON
 | 
			
		||||
$       IF F$SEARCH(CERT_DIR+CF) .NES. ""
 | 
			
		||||
$       THEN
 | 
			
		||||
$         COPY 'CERT_DIR''CF' WRK_SSLCOM:*.*/log
 | 
			
		||||
$         SET FILE/PROT=W:RE WRK_SSLCOM:'CF'
 | 
			
		||||
$       ENDIF
 | 
			
		||||
$       SET ON
 | 
			
		||||
$       GOTO LOOP
 | 
			
		||||
$ LOOP_END:
 | 
			
		||||
$!
 | 
			
		||||
$	SHOW SYSTEM/FULL/OUTPUT=WRK_SSLROOT:[PRIVATE]RANDFILE.
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLROOT:[PRIVATE]RANDFILE.
 | 
			
		||||
$!
 | 
			
		||||
$	COPY SSL010.RELEASE_NOTES WRK_SSLROOT:[000000]/LOG
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLROOT:[000000]SSL010.RELEASE_NOTES
 | 
			
		||||
$!
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
 | 
			
		||||
$
 | 
			
		||||
$	COPY OPENSSL_UTILS.COM WRK_SSLROOT:[VMS]/LOG
 | 
			
		||||
$	SET FILE/PROT=WORLD:RE WRK_SSLROOT:[VMS]OPENSSL_UTILS.COM
 | 
			
		||||
$
 | 
			
		||||
$	EXIT
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										193
									
								
								VMS/mkshared.com
									
									
									
									
									
								
							
							
						
						
									
										193
									
								
								VMS/mkshared.com
									
									
									
									
									
								
							@@ -9,88 +9,10 @@ $! Output:      [.AXP.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
 | 
			
		||||
$!		[.AXP.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
 | 
			
		||||
$!
 | 
			
		||||
$! So far, tests have only been made on VMS for Alpha.  VAX will come in time.
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! >>>>>
 | 
			
		||||
$!	Note: Since I don't know how to put a comment into one of the .NUM
 | 
			
		||||
$!	      files, I will put the comment here and hope that it is found.
 | 
			
		||||
$!
 | 
			
		||||
$!	      For SSLEAY.NUM, we do not expose SSL_add_dir_cert_subjs_to_stk.
 | 
			
		||||
$!	      We do not expose it because it is a truncated VMS name that
 | 
			
		||||
$!	      points to (via SYMHACKS.H) SSL_add_dir_cert_subjects_to_stack.
 | 
			
		||||
$!	      However, SSL_add_dir_cert_subjects_to_stack is #ifndef VMS
 | 
			
		||||
$!	      out of SSL_CERT.C.  So, comment them all out and we won't get
 | 
			
		||||
$!	      any link errors about undefined symbols.  This all works fine
 | 
			
		||||
$!	      until we need this API's functionality. 
 | 
			
		||||
$!
 | 
			
		||||
$!	      For LIBEAY.NUM, 
 | 
			
		||||
$!		ASN1_UTCTIME_GET  #if 0         [.CRYPTO.ASN1]A_UTCTM.C
 | 
			
		||||
$!								[.CRYPTO.ASN1]ASN1.H
 | 
			
		||||
$!
 | 
			
		||||
$!		DES_SET_WEAK_KEY_FLAG           [.CRYPTO.DES]DES.H
 | 
			
		||||
$!						Not used in any .C file.
 | 
			
		||||
$!
 | 
			
		||||
$!		DH_GET_DEFAULT_METHOD   Not found in any .C or .H file.
 | 
			
		||||
$!		DH_SET_DEFAULT_METHOD   Not found in any .C or .H file.
 | 
			
		||||
$!		DSA_GET_DEFAULT_METHOD  Not found in any .C or .H file.
 | 
			
		||||
$!		DSA_SET_DEFAULT_METHOD  Not found in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_READ_BIO_NETSCAPE_CERT_SEQUENCE     [.CRYPTO.PEM]PEM.H
 | 
			
		||||
$!							[.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!							PEM_read_bio_NS_CERT_SEQ is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_READ_BIO_PKCS8_PRIV_KEY_INFO        [.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_read_bio_PKCS8_PRIV_KEY_INFO        PEM_read_bio_P8_PRIV_KEY_INFO
 | 
			
		||||
$!			PEM_read_bio_P8_PRIV_KEY_INFO is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_READ_NETSCAPE_CERT_SEQUENCE         [.CRYPTO.PEM]PEM.H
 | 
			
		||||
$!							[.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_read_NETSCAPE_CERT_SEQUENCE         PEM_read_NS_CERT_SEQ
 | 
			
		||||
$!			PEM_read_NS_CERT_SEQ is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_READ_PKCS8_PRIV_KEY_INFO            [.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_read_PKCS8_PRIV_KEY_INFO            PEM_read_P8_PRIV_KEY_INFO
 | 
			
		||||
$!			PEM_read_P8_PRIV_KEY_INFO is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_WRITE_BIO_NETSCAPE_CERT_SEQUENCE    [.CRYPTO.PEM]PEM.H
 | 
			
		||||
$!							[.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_write_bio_NETSCAPE_CERT_SEQUENCE    PEM_write_bio_NS_CERT_SEQ
 | 
			
		||||
$!			PEM_write_bio_NS_CERT_SEQ is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_WRITE_BIO_PKCS8_PRIV_KEY_INFO       [.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_write_bio_PKCS8_PRIV_KEY_INFO       PEM_write_bio_P8_PRIV_KEY_INFO
 | 
			
		||||
$!			PEM_write_bio_P8_PRIV_KEY_INFO is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_WRITE_NETSCAPE_CERT_SEQUENCE        [.CRYPTO.PEM]PEM.H
 | 
			
		||||
$!							[.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_write_NETSCAPE_CERT_SEQUENCE        PEM_write_NS_CERT_SEQ
 | 
			
		||||
$!			PEM_write_NS_CERT_SEQ is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		PEM_WRITE_PKCS8_PRIV_KEY_INFO           [.CRYPTO]SYMHACKS.H
 | 
			
		||||
$!			#define PEM_write_PKCS8_PRIV_KEY_INFO           PEM_write_P8_PRIV_KEY_INFO
 | 
			
		||||
$!			PEM_write_P8_PRIV_KEY_INFO is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		RAND_EVENT                              [.CRYPTO.RAND]RAND.H RAND_event is #if windows || Win32
 | 
			
		||||
$!							[.CRYPTO.RAND]RAND_WIN.C
 | 
			
		||||
$!							All modules in RAND_WIN are WINDOWS or WIN32 modules.
 | 
			
		||||
$!
 | 
			
		||||
$!		RAND_SCREEN     if Windows or Win32 - [.CRYPTO.RAND]RAND.H
 | 
			
		||||
$!
 | 
			
		||||
$!		RSA_GET_DEFAULT_METHOD          is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!		RSA_SET_DEFAULT_METHOD           is not in any .C or .H file.
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! ===========================================================================
 | 
			
		||||
$!
 | 
			
		||||
$! Setup VMS specific information.
 | 
			
		||||
$!
 | 
			
		||||
$ @vms_build_info
 | 
			
		||||
$!
 | 
			
		||||
$
 | 
			
		||||
$! ----- Prepare info for processing: version number and file info
 | 
			
		||||
$ gosub read_version_info
 | 
			
		||||
$!
 | 
			
		||||
$ if libver .eqs. ""
 | 
			
		||||
$ then
 | 
			
		||||
$   write sys$error "ERROR: Couldn't find any library version info..."
 | 
			
		||||
@@ -102,31 +24,20 @@ $ then
 | 
			
		||||
$   libid  = "Crypto"
 | 
			
		||||
$   libnum = "[.UTIL]LIBEAY.NUM"
 | 
			
		||||
$   libdir = "[.AXP.EXE.CRYPTO]"
 | 
			
		||||
$   libolb = "''libdir'LIBCRYPTO''build_bits'.OLB"
 | 
			
		||||
$   libolb = "''libdir'LIBCRYPTO.OLB"
 | 
			
		||||
$   libopt = "''libdir'LIBCRYPTO.OPT"
 | 
			
		||||
$   libmap = "''libdir'LIBCRYPTO.MAP"
 | 
			
		||||
$   if build_bits .eqs. "32"
 | 
			
		||||
$   then 
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBCRYPTO_SHR''build_bits'.EXE"
 | 
			
		||||
$   else
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBCRYPTO_SHR.EXE"
 | 
			
		||||
$   endif
 | 
			
		||||
$   libgoal= "''libdir'LIBCRYPTO.EXE"
 | 
			
		||||
$   libref = ""
 | 
			
		||||
$   gosub create_axp_shr
 | 
			
		||||
$   libid  = "SSL"
 | 
			
		||||
$   libnum = "[.UTIL]SSLEAY.NUM"
 | 
			
		||||
$   libdir = "[.AXP.EXE.SSL]"
 | 
			
		||||
$   libolb = "''libdir'LIBSSL''build_bits'.OLB"
 | 
			
		||||
$   libolb = "''libdir'LIBSSL.OLB"
 | 
			
		||||
$   libopt = "''libdir'LIBSSL.OPT"
 | 
			
		||||
$   libmap = "''libdir'LIBSSL.MAP"
 | 
			
		||||
$   if build_bits .eqs. "32"
 | 
			
		||||
$   then 
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBSSL_SHR''build_bits'.EXE"
 | 
			
		||||
$      libref = "[.AXP.EXE.CRYPTO]SSL$LIBCRYPTO_SHR''build_bits'.EXE"
 | 
			
		||||
$   else
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBSSL_SHR.EXE"
 | 
			
		||||
$      libref = "[.AXP.EXE.CRYPTO]SSL$LIBCRYPTO_SHR.EXE"
 | 
			
		||||
$   endif
 | 
			
		||||
$   libgoal= "''libdir'LIBSSL.EXE"
 | 
			
		||||
$   libref = "[.AXP.EXE.CRYPTO]LIBCRYPTO.EXE"
 | 
			
		||||
$   gosub create_axp_shr
 | 
			
		||||
$ else
 | 
			
		||||
$   libtit = "CRYPTO_TRANSFER_VECTOR"
 | 
			
		||||
@@ -134,16 +45,11 @@ $   libid  = "Crypto"
 | 
			
		||||
$   libnum = "[.UTIL]LIBEAY.NUM"
 | 
			
		||||
$   libdir = "[.VAX.EXE.CRYPTO]"
 | 
			
		||||
$   libmar = "''libdir'LIBCRYPTO.MAR"
 | 
			
		||||
$   libolb = "''libdir'LIBCRYPTO''build_bits.OLB"
 | 
			
		||||
$   libolb = "''libdir'LIBCRYPTO.OLB"
 | 
			
		||||
$   libopt = "''libdir'LIBCRYPTO.OPT"
 | 
			
		||||
$   libobj = "''libdir'LIBCRYPTO.OBJ"
 | 
			
		||||
$   libmap = "''libdir'LIBCRYPTO.MAP"
 | 
			
		||||
$   if build_bits .eqs. "32"
 | 
			
		||||
$   then
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBCRYPTO_SHR''build_bits'.EXE"
 | 
			
		||||
$   else
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBCRYPTO_SHR.EXE"
 | 
			
		||||
$   endif
 | 
			
		||||
$   libgoal= "''libdir'LIBCRYPTO.EXE"
 | 
			
		||||
$   libref = ""
 | 
			
		||||
$   libvec = "LIBCRYPTO"
 | 
			
		||||
$   gosub create_vax_shr
 | 
			
		||||
@@ -152,18 +58,12 @@ $   libid  = "SSL"
 | 
			
		||||
$   libnum = "[.UTIL]SSLEAY.NUM"
 | 
			
		||||
$   libdir = "[.VAX.EXE.SSL]"
 | 
			
		||||
$   libmar = "''libdir'LIBSSL.MAR"
 | 
			
		||||
$   libolb = "''libdir'LIBSSL''build_bits'.OLB"
 | 
			
		||||
$   libolb = "''libdir'LIBSSL.OLB"
 | 
			
		||||
$   libopt = "''libdir'LIBSSL.OPT"
 | 
			
		||||
$   libobj = "''libdir'LIBSSL.OBJ"
 | 
			
		||||
$   libmap = "''libdir'LIBSSL.MAP"
 | 
			
		||||
$   if build_bits .eqs. "32"
 | 
			
		||||
$   then
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBSSL_SHR''build_bits'.EXE"
 | 
			
		||||
$      libref = "[.VAX.EXE.CRYPTO]SSL$LIBCRYPTO_SHR''build_bits'.EXE"
 | 
			
		||||
$   else
 | 
			
		||||
$      libgoal= "''libdir'SSL$LIBSSL_SHR.EXE"
 | 
			
		||||
$      libref = "[.VAX.EXE.CRYPTO]SSL$LIBCRYPTO_SHR.EXE"
 | 
			
		||||
$   endif
 | 
			
		||||
$   libgoal= "''libdir'LIBSSL.EXE"
 | 
			
		||||
$   libref = "[.VAX.EXE.CRYPTO]LIBCRYPTO.EXE"
 | 
			
		||||
$   libvec = "LIBSSL"
 | 
			
		||||
$   gosub create_vax_shr
 | 
			
		||||
$ endif
 | 
			
		||||
@@ -203,7 +103,6 @@ $! The creator routine
 | 
			
		||||
$ create_axp_shr:
 | 
			
		||||
$   open/write opt 'libopt'
 | 
			
		||||
$   write opt "identification=""",libid," ",libverstr,""""
 | 
			
		||||
$   write opt "build_ident=""",build_ident,"_",build_platform,"_",build_bits,""" "
 | 
			
		||||
$   write opt libolb,"/lib"
 | 
			
		||||
$   if libref .nes. "" then write opt libref,"/SHARE"
 | 
			
		||||
$   write opt "SYMBOL_VECTOR=(-"
 | 
			
		||||
@@ -238,16 +137,14 @@ $   endif
 | 
			
		||||
$   if libfirstentry
 | 
			
		||||
$   then
 | 
			
		||||
$     write 'libwrch' "    ",libentry,"=",pr," -"
 | 
			
		||||
$!DEBUG!$     write sys$output "''libentry' = ''pr' #1"
 | 
			
		||||
$   else
 | 
			
		||||
$     write 'libwrch' "    ,",libentry,"=",pr," -"
 | 
			
		||||
$!DEBUG!$     write sys$output ",''libentry' = ''pr'"
 | 
			
		||||
$   endif
 | 
			
		||||
$   libfirstentry := false
 | 
			
		||||
$   textcount = textcount + textcount_this
 | 
			
		||||
$   return
 | 
			
		||||
$
 | 
			
		||||
$! ----- Subroutines for VAX
 | 
			
		||||
$! ----- Subroutines for AXP
 | 
			
		||||
$! -----
 | 
			
		||||
$! The creator routine
 | 
			
		||||
$ create_vax_shr:
 | 
			
		||||
@@ -268,11 +165,11 @@ $   type sys$input:/out=mar:
 | 
			
		||||
	.TRANSFER routine
 | 
			
		||||
	.MASK	routine
 | 
			
		||||
	JMP	routine+2
 | 
			
		||||
        .ENDM TRANSFER_ENTRY
 | 
			
		||||
	.ENDM FTRANSFER_ENTRY
 | 
			
		||||
;
 | 
			
		||||
; Place entries in own program section.
 | 
			
		||||
;
 | 
			
		||||
$   write mar " .PSECT $$",libvec,"QUAD,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT"
 | 
			
		||||
$   write mar "	.PSECT $$",libvec,",QUAD,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT"
 | 
			
		||||
$   write mar libvec,"_xfer:"
 | 
			
		||||
$   libwrch   := mar
 | 
			
		||||
$   libwriter := write_vax_ftransfer_entry
 | 
			
		||||
@@ -282,8 +179,8 @@ $   type sys$input:/out=mar:
 | 
			
		||||
; Allocate extra storage at end of vector to allow for expansion.
 | 
			
		||||
;
 | 
			
		||||
$   write mar "	.BLKB 32768-<.-",libvec,"_xfer>	; 64 pages total."
 | 
			
		||||
$   libwriter := write_vax_vtransfer_entry
 | 
			
		||||
$   gosub read_func_num
 | 
			
		||||
$!   libwriter := write_vax_vtransfer_entry
 | 
			
		||||
$!   gosub read_func_num
 | 
			
		||||
$   write mar "	.END"
 | 
			
		||||
$   close mar
 | 
			
		||||
$   open/write opt 'libopt'
 | 
			
		||||
@@ -305,7 +202,7 @@ $   type sys$input:/out=opt:
 | 
			
		||||
PSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT
 | 
			
		||||
$   libwrch   := opt
 | 
			
		||||
$   libwriter := write_vax_psect_attr
 | 
			
		||||
$   gosub read_var_num
 | 
			
		||||
$   gosub read_func_num
 | 
			
		||||
$   close opt
 | 
			
		||||
$   macro/obj='libobj' 'libmar'
 | 
			
		||||
$   link/map='libmap'/full/share='libgoal' 'libopt'/option
 | 
			
		||||
@@ -348,16 +245,6 @@ $     info_exist=f$element(0,":",entryinfo)
 | 
			
		||||
$     info_platforms=","+f$element(1,":",entryinfo)+","
 | 
			
		||||
$     info_kind=f$element(2,":",entryinfo)
 | 
			
		||||
$     info_algorithms=","+f$element(3,":",entryinfo)+","
 | 
			
		||||
$!
 | 
			
		||||
$!DEBUG!$ write sys$output " Processing ... ", line
 | 
			
		||||
$!DEBUG!$ write sys$output "Entry num = ",entrynum
 | 
			
		||||
$!DEBUG!$ write sys$output "Entry info = ",entryinfo
 | 
			
		||||
$!DEBUG!$ write sys$output "Cur Entry = ",curentry
 | 
			
		||||
$!DEBUG!$ write sys$output "info exist = ",info_exist
 | 
			
		||||
$!DEBUG!$ write sys$output "info platforms = ",info_platforms
 | 
			
		||||
$!DEBUG!$ write sys$output "info kind = ",info_kind
 | 
			
		||||
$!DEBUG!$ write sys$output "info algs = ",info_algorithms
 | 
			
		||||
$!
 | 
			
		||||
$     if info_exist .eqs. "NOEXIST" then goto loop
 | 
			
		||||
$     truesum = 0
 | 
			
		||||
$     falsesum = 0
 | 
			
		||||
@@ -365,15 +252,10 @@ $     negatives = 1
 | 
			
		||||
$     plat_i = 0
 | 
			
		||||
$     loop1:
 | 
			
		||||
$       plat_entry = f$element(plat_i,",",info_platforms)
 | 
			
		||||
$!DEBUG!$ write sys$output "plat entry = ",plat_entry
 | 
			
		||||
$! 
 | 
			
		||||
$       plat_i = plat_i + 1
 | 
			
		||||
$!DEBUG!$ write sys$output "plat i = ", plat_i
 | 
			
		||||
$       if plat_entry .eqs. "" then goto loop1
 | 
			
		||||
$       if plat_entry .eqs. ","
 | 
			
		||||
$       if plat_entry .nes. ","
 | 
			
		||||
$       then
 | 
			
		||||
$	  goto endloop1
 | 
			
		||||
$       else
 | 
			
		||||
$         if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0
 | 
			
		||||
$         if f$getsyi("CPU") .lt. 128
 | 
			
		||||
$         then
 | 
			
		||||
@@ -382,20 +264,18 @@ $             truesum = truesum + 1
 | 
			
		||||
$           if plat_entry .eqs. "!EXPORT_VAR_AS_FUNCTION" then -
 | 
			
		||||
$             falsesum = falsesum + 1
 | 
			
		||||
$         endif
 | 
			
		||||
$         if plat_entry .eqs. "VMS" 
 | 
			
		||||
$         if plat_entry .eqs. "VMS" then truesum = truesum + 1
 | 
			
		||||
$         if plat_entry .eqs. "!VMS" then falsesum = falsesum + 1
 | 
			
		||||
$         if f$trnlnm("OPENSSL_FIPS") .nes. ""
 | 
			
		||||
$         then
 | 
			
		||||
$		truesum = truesum + 1
 | 
			
		||||
$!DEBUG!$		write sys$output "plat_entry = VMS"
 | 
			
		||||
$         endif
 | 
			
		||||
$!
 | 
			
		||||
$         if plat_entry .eqs. "!VMS" 
 | 
			
		||||
$	  then 
 | 
			
		||||
$		falsesum = falsesum + 1
 | 
			
		||||
$!DEBUG!$		write sys$output "plat_entry <> VMS"
 | 
			
		||||
$         endif
 | 
			
		||||
$           if plat_entry .eqs. "OPENSSL_FIPS" then truesum = truesum + 1
 | 
			
		||||
$           if plat_entry .eqs. "!OPENSSL_FIPS" then falsesum = falsesum + 1
 | 
			
		||||
$         else
 | 
			
		||||
$           if plat_entry .eqs. "OPENSSL_FIPS" then falsesum = falsesum + 1
 | 
			
		||||
$           if plat_entry .eqs. "!OPENSSL_FIPS" then truesum = truesum + 1
 | 
			
		||||
$         endif
 | 
			
		||||
$	  goto loop1
 | 
			
		||||
$! 
 | 
			
		||||
$       endif
 | 
			
		||||
$     endloop1:
 | 
			
		||||
$!DEBUG!$     if info_platforms - "EXPORT_VAR_AS_FUNCTION" .nes. info_platforms
 | 
			
		||||
$!DEBUG!$     then
 | 
			
		||||
@@ -404,26 +284,18 @@ $!DEBUG!$       write sys$output "        truesum = ",truesum,-
 | 
			
		||||
$!DEBUG!		", negatives = ",negatives,", falsesum = ",falsesum
 | 
			
		||||
$!DEBUG!$     endif
 | 
			
		||||
$     if falsesum .ne. 0 then goto loop
 | 
			
		||||
$     if truesum+negatives .eq. 0 
 | 
			
		||||
$     then
 | 
			
		||||
$!DEBUG!$	write sys$output "truesum+negatives .eq. 0. Going to loop." 
 | 
			
		||||
$	goto loop
 | 
			
		||||
$     endif
 | 
			
		||||
$     if truesum+negatives .eq. 0 then goto loop
 | 
			
		||||
$     alg_i = 0
 | 
			
		||||
$     loop2:
 | 
			
		||||
$       alg_entry = f$element(alg_i,",",info_algorithms)
 | 
			
		||||
$!DEBUG!$ write sys$output "alg entry = ",alg_entry
 | 
			
		||||
$	alg_i = alg_i + 1
 | 
			
		||||
$       if alg_entry .eqs. "" then goto loop2
 | 
			
		||||
$       if alg_entry .eqs. ","
 | 
			
		||||
$       if alg_entry .nes. ","
 | 
			
		||||
$       then
 | 
			
		||||
$	  goto endloop2
 | 
			
		||||
$       else
 | 
			
		||||
$         if alg_entry .eqs. "KRB5" then goto loop ! Special for now
 | 
			
		||||
$         if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop
 | 
			
		||||
$       endif
 | 
			
		||||
$	  goto loop2
 | 
			
		||||
$!
 | 
			
		||||
$       endif
 | 
			
		||||
$     endloop2:
 | 
			
		||||
$     if info_platforms - "EXPORT_VAR_AS_FUNCTION" .nes. info_platforms
 | 
			
		||||
$     then
 | 
			
		||||
@@ -459,10 +331,9 @@ $     goto 'next'
 | 
			
		||||
$   loop_end:
 | 
			
		||||
$   close libnum
 | 
			
		||||
$   return
 | 
			
		||||
$!
 | 
			
		||||
$
 | 
			
		||||
$! The version number reader
 | 
			
		||||
$!
 | 
			
		||||
$read_version_info:
 | 
			
		||||
$ read_version_info:
 | 
			
		||||
$   libver = ""
 | 
			
		||||
$   open/read vf [.CRYPTO]OPENSSLV.H
 | 
			
		||||
$   loop_rvi:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$! SSL$SYSHUTDOWN.COM - This command procedure is used for site specific SSL
 | 
			
		||||
$!			shutdown tasks.  Anything setup in SSL$SYSTARTUP.COM
 | 
			
		||||
$!			should be cleaned up in this command procedure.
 | 
			
		||||
$!
 | 
			
		||||
$ DEASSIGN/SYSTEM/EXEC  RANDFILE
 | 
			
		||||
$ DEASSIGN/SYSTEM/EXEC  SSL$RANDFILE
 | 
			
		||||
$!
 | 
			
		||||
@@ -1,7 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$!  Add logical to aid random number generators.  --  http://www.free.lp.se/openssl/docs/openssl3.html#ss3.1
 | 
			
		||||
$!
 | 
			
		||||
$ DEFINE/SYSTEM/EXEC  RANDFILE		SSL$ROOT:[PRIVATE]RANDFILE.;
 | 
			
		||||
$ DEFINE/SYSTEM/EXEC  SSL$RANDFILE	SSL$ROOT:[PRIVATE]RANDFILE.;
 | 
			
		||||
$!
 | 
			
		||||
@@ -1,76 +0,0 @@
 | 
			
		||||
$!
 | 
			
		||||
$!  APPS.COM
 | 
			
		||||
$!  Written By:  Robert Byer
 | 
			
		||||
$!               Vice-President
 | 
			
		||||
$!               A-Com Computing, Inc.
 | 
			
		||||
$!               byer@mail.all-net.net
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! Slightly modified by Richard Levitte <richard@levitte.org>
 | 
			
		||||
$!
 | 
			
		||||
$ IF P1 .NES. "" THEN GOTO 'P1
 | 
			
		||||
$!
 | 
			
		||||
$DEFINE:
 | 
			
		||||
$!
 | 
			
		||||
$ OPENSSL  :== $SSL$EXE:OPENSSL
 | 
			
		||||
$ VERIFY   :== $SSL$EXE:OPENSSL VERIFY
 | 
			
		||||
$ ASN1PARSE:== $SSL$EXE:OPENSSL ASN1PARS
 | 
			
		||||
$ REQ      :== $SSL$EXE:OPENSSL REQ
 | 
			
		||||
$ DGST     :== $SSL$EXE:OPENSSL DGST
 | 
			
		||||
$ DH       :== $SSL$EXE:OPENSSL DH
 | 
			
		||||
$ ENC      :== $SSL$EXE:OPENSSL ENC
 | 
			
		||||
$ GENDH    :== $SSL$EXE:OPENSSL GENDH
 | 
			
		||||
$ ERRSTR   :== $SSL$EXE:OPENSSL ERRSTR
 | 
			
		||||
$ CA       :== $SSL$EXE:OPENSSL CA
 | 
			
		||||
$ CRL      :== $SSL$EXE:OPENSSL CRL
 | 
			
		||||
$ RSA      :== $SSL$EXE:OPENSSL RSA
 | 
			
		||||
$ DSA      :== $SSL$EXE:OPENSSL DSA
 | 
			
		||||
$ DSAPARAM :== $SSL$EXE:OPENSSL DSAPARAM
 | 
			
		||||
$ X509     :== $SSL$EXE:OPENSSL X509
 | 
			
		||||
$ GENRSA   :== $SSL$EXE:OPENSSL GENRSA
 | 
			
		||||
$ GENDSA   :== $SSL$EXE:OPENSSL GENDSA
 | 
			
		||||
$ S_SERVER :== $SSL$EXE:OPENSSL S_SERVER
 | 
			
		||||
$ S_CLIENT :== $SSL$EXE:OPENSSL S_CLIENT
 | 
			
		||||
$ SPEED    :== $SSL$EXE:OPENSSL SPEED
 | 
			
		||||
$ S_TIME   :== $SSL$EXE:OPENSSL S_TIME
 | 
			
		||||
$ VERSION  :== $SSL$EXE:OPENSSL VERSION
 | 
			
		||||
$ PKCS7    :== $SSL$EXE:OPENSSL PKCS7
 | 
			
		||||
$ CRL2PKCS7:== $SSL$EXE:OPENSSL CRL2P7
 | 
			
		||||
$ SESS_ID  :== $SSL$EXE:OPENSSL SESS_ID
 | 
			
		||||
$ CIPHERS  :== $SSL$EXE:OPENSSL CIPHERS
 | 
			
		||||
$ NSEQ     :== $SSL$EXE:OPENSSL NSEQ
 | 
			
		||||
$ PKCS12   :== $SSL$EXE:OPENSSL PKCS12
 | 
			
		||||
$!
 | 
			
		||||
$EXIT
 | 
			
		||||
$!
 | 
			
		||||
$REMOVE:
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL OPENSSL
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL VERIFY
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL ASN1PARSE
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL REQ
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL DGST
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL DH
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL ENC
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL GENDH
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL ERRSTR
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL CA
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL CRL
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL RSA
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL DSA
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL DSAPARAM
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL X509
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL GENRSA
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL GENDSA
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL S_SERVER
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL S_CLIENT
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL SPEED
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL S_TIME
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL VERSION
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL PKCS7
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL CRL2PKCS7
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL SESS_ID
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL CIPHERS
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL NSEQ
 | 
			
		||||
$ DELETE/SYMBOL/GLOBAL PKCS12
 | 
			
		||||
$!
 | 
			
		||||
$EXIT
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
 | 
			
		||||
      Compaq SSL for OpenVMS Alpha
 | 
			
		||||
 | 
			
		||||
      Field Test Release Notes
 | 
			
		||||
 | 
			
		||||
      February 2002
 | 
			
		||||
 | 
			
		||||
      Based on OpenSSL 0.9.6B
 | 
			
		||||
 | 
			
		||||
      Compaq SSL T1.0 for OpenVMS Alpha
 | 
			
		||||
      CPQ-AXPVMS-SSL-T0100--1.PCSI-DCX-AXPEXE
 | 
			
		||||
 | 
			
		||||
      ----------------------------------------------
 | 
			
		||||
 | 
			
		||||
      Compaq is pleased to provide you with the first release of Compaq
 | 
			
		||||
      SSL for OpenVMS Alpha.  Compaq SSL (Secure Sockets Layer)
 | 
			
		||||
      is based on the 0.9.6B release from the Open Group.  See
 | 
			
		||||
      http://www.openssl.org for more information about OpenSSL.
 | 
			
		||||
 | 
			
		||||
      Documentation for this kit, including installation and configuration
 | 
			
		||||
      information, release notes, a programming tutorial and API reference,
 | 
			
		||||
      is included in "Open Source Security for OpenVMS Alpha
 | 
			
		||||
      Volume 2: SSL" in HTML, PDF, and PostScript format. This document
 | 
			
		||||
      is included on the OpenVMS field test documentation CD-ROM.
 | 
			
		||||
 | 
			
		||||
@@ -3,3 +3,4 @@ Makefile.save
 | 
			
		||||
der_chop
 | 
			
		||||
der_chop.bak
 | 
			
		||||
CA.pl
 | 
			
		||||
openssl.sha1
 | 
			
		||||
 
 | 
			
		||||
@@ -82,9 +82,6 @@ foreach (@ARGV) {
 | 
			
		||||
		mkdir "${CATOP}/crl", $DIRMODE ;
 | 
			
		||||
		mkdir "${CATOP}/newcerts", $DIRMODE;
 | 
			
		||||
		mkdir "${CATOP}/private", $DIRMODE;
 | 
			
		||||
		open OUT, ">${CATOP}/serial";
 | 
			
		||||
		print OUT "01\n";
 | 
			
		||||
		close OUT;
 | 
			
		||||
		open OUT, ">${CATOP}/index.txt";
 | 
			
		||||
		close OUT;
 | 
			
		||||
	    }
 | 
			
		||||
@@ -106,6 +103,10 @@ foreach (@ARGV) {
 | 
			
		||||
		    $RET=$?;
 | 
			
		||||
		}
 | 
			
		||||
	    }
 | 
			
		||||
	    if (! -f "${CATOP}/serial" ) {
 | 
			
		||||
		system ("$X509 -in ${CATOP}/$CACERT -noout "
 | 
			
		||||
			. "-next_serial -out ${CATOP}/serial");
 | 
			
		||||
	    }
 | 
			
		||||
	} elsif (/^-pkcs12$/) {
 | 
			
		||||
	    my $cname = $ARGV[1];
 | 
			
		||||
	    $cname = "My Certificate" unless defined $cname;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1171
									
								
								apps/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1171
									
								
								apps/Makefile
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,945 +0,0 @@
 | 
			
		||||
#
 | 
			
		||||
#  apps/Makefile.ssl
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
DIR=		apps
 | 
			
		||||
TOP=		..
 | 
			
		||||
CC=		cc
 | 
			
		||||
INCLUDES=	-I$(TOP) -I../include $(KRB5_INCLUDES)
 | 
			
		||||
CFLAG=		-g -static
 | 
			
		||||
INSTALL_PREFIX=
 | 
			
		||||
INSTALLTOP=	/usr/local/ssl
 | 
			
		||||
OPENSSLDIR=	/usr/local/ssl
 | 
			
		||||
MAKE=		make -f Makefile.ssl
 | 
			
		||||
MAKEDEPPROG=	makedepend
 | 
			
		||||
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 | 
			
		||||
MAKEFILE=	Makefile.ssl
 | 
			
		||||
PERL= perl
 | 
			
		||||
RM=		rm -f
 | 
			
		||||
# KRB5 stuff
 | 
			
		||||
KRB5_INCLUDES=
 | 
			
		||||
LIBKRB5=
 | 
			
		||||
 | 
			
		||||
PEX_LIBS=
 | 
			
		||||
EX_LIBS= 
 | 
			
		||||
EXE_EXT= 
 | 
			
		||||
 | 
			
		||||
SHLIB_TARGET=
 | 
			
		||||
 | 
			
		||||
CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
 | 
			
		||||
 | 
			
		||||
GENERAL=Makefile makeapps.com install.com
 | 
			
		||||
 | 
			
		||||
DLIBCRYPTO=../libcrypto.a
 | 
			
		||||
DLIBSSL=../libssl.a
 | 
			
		||||
LIBCRYPTO=-L.. -lcrypto
 | 
			
		||||
LIBSSL=-L.. -lssl
 | 
			
		||||
 | 
			
		||||
PROGRAM= openssl
 | 
			
		||||
 | 
			
		||||
SCRIPTS=CA.sh CA.pl der_chop
 | 
			
		||||
 | 
			
		||||
EXE= $(PROGRAM)$(EXE_EXT)
 | 
			
		||||
 | 
			
		||||
E_EXE=	verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
 | 
			
		||||
	ca crl rsa rsautl dsa dsaparam ecdsa ecdsaparam\
 | 
			
		||||
	x509 genrsa gendsa s_server s_client speed \
 | 
			
		||||
	s_time version pkcs7 crl2pkcs7 sess_id ciphers nseq pkcs12 \
 | 
			
		||||
	pkcs8 spkac smime rand engine ocsp
 | 
			
		||||
 | 
			
		||||
PROGS= $(PROGRAM).c
 | 
			
		||||
 | 
			
		||||
A_OBJ=apps.o
 | 
			
		||||
A_SRC=apps.c
 | 
			
		||||
S_OBJ=	s_cb.o s_socket.o
 | 
			
		||||
S_SRC=	s_cb.c s_socket.c
 | 
			
		||||
RAND_OBJ=app_rand.o
 | 
			
		||||
RAND_SRC=app_rand.c
 | 
			
		||||
 | 
			
		||||
E_OBJ=	verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o \
 | 
			
		||||
	ca.o pkcs7.o crl2p7.o crl.o \
 | 
			
		||||
	rsa.o rsautl.o dsa.o dsaparam.o ecdsa.o ecdsaparam.o\
 | 
			
		||||
	x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o \
 | 
			
		||||
	s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \
 | 
			
		||||
	ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o
 | 
			
		||||
 | 
			
		||||
E_SRC=	verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \
 | 
			
		||||
	pkcs7.c crl2p7.c crl.c \
 | 
			
		||||
	rsa.c rsautl.c dsa.c dsaparam.c ecdsa.c ecdsaparam.c\
 | 
			
		||||
	x509.c genrsa.c gendsa.c s_server.c s_client.c speed.c \
 | 
			
		||||
	s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \
 | 
			
		||||
	ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c engine.c ocsp.c
 | 
			
		||||
 | 
			
		||||
SRC=$(E_SRC)
 | 
			
		||||
 | 
			
		||||
EXHEADER=
 | 
			
		||||
HEADER=	apps.h progs.h s_apps.h \
 | 
			
		||||
	testdsa.h testrsa.h \
 | 
			
		||||
	$(EXHEADER)
 | 
			
		||||
 | 
			
		||||
ALL=    $(GENERAL) $(SRC) $(HEADER)
 | 
			
		||||
 | 
			
		||||
top:
 | 
			
		||||
	@(cd ..; $(MAKE) DIRS=$(DIR) all)
 | 
			
		||||
 | 
			
		||||
all:	exe
 | 
			
		||||
 | 
			
		||||
exe:	$(PROGRAM)
 | 
			
		||||
 | 
			
		||||
req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
 | 
			
		||||
	$(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 | 
			
		||||
 | 
			
		||||
sreq.o: req.c 
 | 
			
		||||
	$(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
	@for i in $(EXE); \
 | 
			
		||||
	do  \
 | 
			
		||||
	(echo installing $$i; \
 | 
			
		||||
	 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
 | 
			
		||||
	 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
 | 
			
		||||
	 done;
 | 
			
		||||
	@for i in $(SCRIPTS); \
 | 
			
		||||
	do  \
 | 
			
		||||
	(echo installing $$i; \
 | 
			
		||||
	 cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
 | 
			
		||||
	 chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
 | 
			
		||||
	 done
 | 
			
		||||
	@cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR); \
 | 
			
		||||
	chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	ctags $(SRC)
 | 
			
		||||
 | 
			
		||||
tests:
 | 
			
		||||
 | 
			
		||||
links:
 | 
			
		||||
	@$(TOP)/util/point.sh Makefile.ssl Makefile
 | 
			
		||||
 | 
			
		||||
lint:
 | 
			
		||||
	lint -DLINT $(INCLUDES) $(SRC)>fluff
 | 
			
		||||
 | 
			
		||||
depend:
 | 
			
		||||
	$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(SRC)
 | 
			
		||||
 | 
			
		||||
dclean:
 | 
			
		||||
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
 | 
			
		||||
	mv -f Makefile.new $(MAKEFILE)
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
 | 
			
		||||
	rm -f req
 | 
			
		||||
 | 
			
		||||
$(DLIBSSL):
 | 
			
		||||
	(cd ../ssl; $(MAKE))
 | 
			
		||||
 | 
			
		||||
$(DLIBCRYPTO):
 | 
			
		||||
	(cd ../crypto; $(MAKE))
 | 
			
		||||
 | 
			
		||||
$(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
 | 
			
		||||
	$(RM) $(PROGRAM)
 | 
			
		||||
	if [ "$(SHLIB_TARGET)" = "hpux-shared" ] ; then \
 | 
			
		||||
	  $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
 | 
			
		||||
	else \
 | 
			
		||||
	  $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
 | 
			
		||||
	fi
 | 
			
		||||
	-(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
 | 
			
		||||
		LIBPATH="`pwd`"; LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; \
 | 
			
		||||
		export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
 | 
			
		||||
		$(PERL) tools/c_rehash certs)
 | 
			
		||||
 | 
			
		||||
progs.h: progs.pl
 | 
			
		||||
	$(PERL) progs.pl $(E_EXE) >progs.h
 | 
			
		||||
	$(RM) $(PROGRAM).o
 | 
			
		||||
 | 
			
		||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
 | 
			
		||||
 | 
			
		||||
app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
app_rand.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
app_rand.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
app_rand.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
app_rand.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
 | 
			
		||||
app_rand.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
app_rand.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h app_rand.c
 | 
			
		||||
app_rand.o: apps.h
 | 
			
		||||
apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
apps.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
apps.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
apps.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
apps.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
apps.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
apps.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
apps.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
 | 
			
		||||
apps.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
apps.o: ../include/openssl/sha.h ../include/openssl/stack.h
 | 
			
		||||
apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
 | 
			
		||||
apps.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h
 | 
			
		||||
asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
asn1pars.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
asn1pars.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
asn1pars.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
asn1pars.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
asn1pars.o: asn1pars.c
 | 
			
		||||
ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
ca.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
ca.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
ca.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
ca.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
ca.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
ca.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
ca.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
 | 
			
		||||
ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 | 
			
		||||
ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h
 | 
			
		||||
ca.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
ca.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
ca.o: ../include/openssl/sha.h ../include/openssl/stack.h
 | 
			
		||||
ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
 | 
			
		||||
ca.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c
 | 
			
		||||
ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
ciphers.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
ciphers.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
ciphers.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
ciphers.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
ciphers.o: ../include/openssl/x509_vfy.h apps.h ciphers.c
 | 
			
		||||
crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
crl.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
crl.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
crl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
crl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
crl.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
crl.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
crl.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
crl.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 | 
			
		||||
crl.o: ../include/openssl/x509v3.h apps.h crl.c
 | 
			
		||||
crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
crl2p7.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
crl2p7.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
crl2p7.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
crl2p7.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
crl2p7.o: crl2p7.c
 | 
			
		||||
dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
dgst.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
dgst.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
dgst.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
dgst.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
dgst.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
dgst.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dgst.c
 | 
			
		||||
dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
dh.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
dh.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
dh.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
dh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
dh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
dh.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
dh.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
dh.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
dh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dh.c
 | 
			
		||||
dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
dsa.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
dsa.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
dsa.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
dsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
dsa.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
dsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
dsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
dsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dsa.c
 | 
			
		||||
dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
dsaparam.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
dsaparam.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
dsaparam.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
dsaparam.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
dsaparam.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
dsaparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
dsaparam.o: dsaparam.c
 | 
			
		||||
ecdsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
ecdsa.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
ecdsa.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
ecdsa.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
ecdsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
ecdsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
ecdsa.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
ecdsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
ecdsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
ecdsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
ecdsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
ecdsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
ecdsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
ecdsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
ecdsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
ecdsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
ecdsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h ecdsa.c
 | 
			
		||||
ecdsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
ecdsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
ecdsaparam.o: ecdsaparam.c
 | 
			
		||||
enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
enc.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
enc.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
enc.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
enc.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
enc.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
enc.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
enc.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h enc.c
 | 
			
		||||
engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
engine.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
engine.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
engine.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
engine.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
engine.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
engine.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
engine.o: ../include/openssl/x509_vfy.h apps.h engine.c
 | 
			
		||||
errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
errstr.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
errstr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
errstr.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
errstr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
errstr.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
errstr.o: ../include/openssl/x509_vfy.h apps.h errstr.c
 | 
			
		||||
gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
gendh.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
gendh.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
gendh.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
gendh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
gendh.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
gendh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h gendh.c
 | 
			
		||||
gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
gendsa.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
gendsa.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
gendsa.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
gendsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
gendsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
gendsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
gendsa.o: gendsa.c
 | 
			
		||||
genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
genrsa.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
genrsa.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
genrsa.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
genrsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
genrsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
genrsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
genrsa.o: genrsa.c
 | 
			
		||||
nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
nseq.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
nseq.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
nseq.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
nseq.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
nseq.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
nseq.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
nseq.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h nseq.c
 | 
			
		||||
ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
ocsp.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
ocsp.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
ocsp.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
ocsp.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
 | 
			
		||||
ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 | 
			
		||||
ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h
 | 
			
		||||
ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
ocsp.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h
 | 
			
		||||
ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
 | 
			
		||||
ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
 | 
			
		||||
ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
 | 
			
		||||
ocsp.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 | 
			
		||||
ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c
 | 
			
		||||
openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
openssl.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
openssl.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
openssl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
openssl.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
openssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
openssl.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
openssl.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
openssl.o: ../include/openssl/x509_vfy.h apps.h openssl.c progs.h s_apps.h
 | 
			
		||||
passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
passwd.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h
 | 
			
		||||
passwd.o: ../include/openssl/des_old.h ../include/openssl/dh.h
 | 
			
		||||
passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
passwd.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
passwd.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
passwd.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
passwd.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
 | 
			
		||||
passwd.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 | 
			
		||||
passwd.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 | 
			
		||||
passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
 | 
			
		||||
passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
 | 
			
		||||
passwd.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
 | 
			
		||||
passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
passwd.o: passwd.c
 | 
			
		||||
pkcs12.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
pkcs12.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
pkcs12.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
pkcs12.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
pkcs12.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
pkcs12.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
pkcs12.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
pkcs12.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
pkcs12.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
pkcs12.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
 | 
			
		||||
pkcs12.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
pkcs12.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
pkcs12.o: ../include/openssl/sha.h ../include/openssl/stack.h
 | 
			
		||||
pkcs12.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
 | 
			
		||||
pkcs12.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
pkcs12.o: ../include/openssl/x509_vfy.h apps.h pkcs12.c
 | 
			
		||||
pkcs7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
pkcs7.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
pkcs7.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
pkcs7.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
pkcs7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
pkcs7.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
pkcs7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
pkcs7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
pkcs7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
pkcs7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
pkcs7.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
pkcs7.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
pkcs7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
pkcs7.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h pkcs7.c
 | 
			
		||||
pkcs8.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
pkcs8.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
pkcs8.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
pkcs8.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
pkcs8.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
pkcs8.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
pkcs8.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
pkcs8.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
pkcs8.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
pkcs8.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
 | 
			
		||||
pkcs8.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
pkcs8.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
pkcs8.o: ../include/openssl/sha.h ../include/openssl/stack.h
 | 
			
		||||
pkcs8.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
 | 
			
		||||
pkcs8.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
 | 
			
		||||
rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
rand.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
rand.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
rand.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
rand.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
 | 
			
		||||
rand.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
rand.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rand.c
 | 
			
		||||
req.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
req.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
req.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
req.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
req.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
req.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
req.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
req.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
req.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 | 
			
		||||
req.o: ../include/openssl/x509v3.h apps.h req.c
 | 
			
		||||
rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
rsa.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
rsa.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
rsa.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
rsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
rsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
rsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
rsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
rsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rsa.c
 | 
			
		||||
rsautl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
rsautl.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
rsautl.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
rsautl.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
rsautl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
rsautl.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
rsautl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
rsautl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
rsautl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
rsautl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
rsautl.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
rsautl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
rsautl.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
rsautl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
 | 
			
		||||
rsautl.o: rsautl.c
 | 
			
		||||
s_cb.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
s_cb.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
s_cb.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
s_cb.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
s_cb.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
s_cb.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
s_cb.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
s_cb.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
s_cb.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
s_cb.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
s_cb.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
s_cb.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
s_cb.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
s_cb.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
s_cb.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
s_cb.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
s_cb.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
s_cb.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_cb.c
 | 
			
		||||
s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
s_client.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
s_client.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
s_client.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
s_client.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
s_client.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
s_client.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
s_client.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
s_client.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
s_client.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
s_client.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
s_client.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
s_client.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
s_client.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
s_client.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
s_client.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
s_client.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
s_client.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_client.c
 | 
			
		||||
s_server.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
s_server.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
s_server.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
s_server.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
s_server.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
s_server.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
s_server.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
s_server.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
s_server.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
s_server.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
s_server.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
s_server.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
s_server.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
s_server.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
s_server.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
s_server.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_server.c
 | 
			
		||||
s_socket.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
s_socket.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
s_socket.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
s_socket.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
s_socket.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
s_socket.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
s_socket.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
s_socket.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
s_socket.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
s_socket.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_socket.c
 | 
			
		||||
s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
s_time.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
s_time.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
s_time.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
s_time.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
s_time.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
s_time.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
s_time.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
s_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
s_time.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
s_time.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
s_time.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
s_time.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
s_time.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
s_time.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
s_time.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
s_time.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
s_time.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_time.c
 | 
			
		||||
sess_id.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
sess_id.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
sess_id.o: ../include/openssl/buffer.h ../include/openssl/comp.h
 | 
			
		||||
sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
sess_id.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
sess_id.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
sess_id.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
sess_id.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
 | 
			
		||||
sess_id.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
sess_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
sess_id.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
sess_id.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
sess_id.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
sess_id.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
 | 
			
		||||
sess_id.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
 | 
			
		||||
sess_id.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
sess_id.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
 | 
			
		||||
sess_id.o: ../include/openssl/ui.h ../include/openssl/x509.h
 | 
			
		||||
sess_id.o: ../include/openssl/x509_vfy.h apps.h sess_id.c
 | 
			
		||||
smime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
smime.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
smime.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
smime.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
smime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
smime.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
smime.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
smime.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
smime.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
smime.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
smime.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
smime.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
smime.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
smime.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
smime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
smime.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h smime.c
 | 
			
		||||
speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
 | 
			
		||||
speed.o: ../include/openssl/asn1t.h ../include/openssl/bio.h
 | 
			
		||||
speed.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
 | 
			
		||||
speed.o: ../include/openssl/buffer.h ../include/openssl/cast.h
 | 
			
		||||
speed.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
speed.o: ../include/openssl/des.h ../include/openssl/des_old.h
 | 
			
		||||
speed.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
speed.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
speed.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
speed.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
 | 
			
		||||
speed.o: ../include/openssl/lhash.h ../include/openssl/md2.h
 | 
			
		||||
speed.o: ../include/openssl/md4.h ../include/openssl/md5.h
 | 
			
		||||
speed.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
 | 
			
		||||
speed.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 | 
			
		||||
speed.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 | 
			
		||||
speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
 | 
			
		||||
speed.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
 | 
			
		||||
speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
 | 
			
		||||
speed.o: ../include/openssl/sha.h ../include/openssl/stack.h
 | 
			
		||||
speed.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
 | 
			
		||||
speed.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
 | 
			
		||||
speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h speed.c
 | 
			
		||||
speed.o: testdsa.h testrsa.h
 | 
			
		||||
spkac.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
spkac.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
spkac.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
spkac.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
spkac.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
spkac.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
spkac.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
spkac.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
spkac.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
spkac.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
spkac.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
spkac.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
spkac.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
spkac.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
spkac.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h spkac.c
 | 
			
		||||
verify.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
verify.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
verify.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
verify.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
verify.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
verify.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
verify.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
verify.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
verify.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
verify.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
verify.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
verify.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
verify.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
verify.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
verify.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
verify.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 | 
			
		||||
verify.o: ../include/openssl/x509v3.h apps.h verify.c
 | 
			
		||||
version.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
version.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
 | 
			
		||||
version.o: ../include/openssl/bn.h ../include/openssl/buffer.h
 | 
			
		||||
version.o: ../include/openssl/conf.h ../include/openssl/crypto.h
 | 
			
		||||
version.o: ../include/openssl/des.h ../include/openssl/des_old.h
 | 
			
		||||
version.o: ../include/openssl/dh.h ../include/openssl/dsa.h
 | 
			
		||||
version.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
 | 
			
		||||
version.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
 | 
			
		||||
version.o: ../include/openssl/err.h ../include/openssl/evp.h
 | 
			
		||||
version.o: ../include/openssl/idea.h ../include/openssl/lhash.h
 | 
			
		||||
version.o: ../include/openssl/md2.h ../include/openssl/obj_mac.h
 | 
			
		||||
version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
 | 
			
		||||
version.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
 | 
			
		||||
version.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
 | 
			
		||||
version.o: ../include/openssl/rc4.h ../include/openssl/rsa.h
 | 
			
		||||
version.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
version.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
version.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
version.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
 | 
			
		||||
version.o: ../include/openssl/x509_vfy.h apps.h version.c
 | 
			
		||||
x509.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h
 | 
			
		||||
x509.o: ../include/openssl/bio.h ../include/openssl/bn.h
 | 
			
		||||
x509.o: ../include/openssl/buffer.h ../include/openssl/conf.h
 | 
			
		||||
x509.o: ../include/openssl/crypto.h ../include/openssl/dh.h
 | 
			
		||||
x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
 | 
			
		||||
x509.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h
 | 
			
		||||
x509.o: ../include/openssl/engine.h ../include/openssl/err.h
 | 
			
		||||
x509.o: ../include/openssl/evp.h ../include/openssl/lhash.h
 | 
			
		||||
x509.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 | 
			
		||||
x509.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 | 
			
		||||
x509.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
 | 
			
		||||
x509.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
 | 
			
		||||
x509.o: ../include/openssl/rand.h ../include/openssl/rsa.h
 | 
			
		||||
x509.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 | 
			
		||||
x509.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 | 
			
		||||
x509.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
 | 
			
		||||
x509.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
 | 
			
		||||
x509.o: ../include/openssl/x509v3.h apps.h x509.c
 | 
			
		||||
							
								
								
									
										760
									
								
								apps/apps.c
									
									
									
									
									
								
							
							
						
						
									
										760
									
								
								apps/apps.c
									
									
									
									
									
								
							@@ -114,9 +114,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#define NON_MAIN
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#undef NON_MAIN
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/x509v3.h>
 | 
			
		||||
@@ -124,17 +122,13 @@
 | 
			
		||||
#include <openssl/pkcs12.h>
 | 
			
		||||
#include <openssl/ui.h>
 | 
			
		||||
#include <openssl/safestack.h>
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
#include <openssl/engine.h>
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#define strcasecmp _stricmp
 | 
			
		||||
#else
 | 
			
		||||
#include <strings.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#  include "bss_file.c"
 | 
			
		||||
#endif
 | 
			
		||||
#define NON_MAIN
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#undef NON_MAIN
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
	char *name;
 | 
			
		||||
@@ -310,10 +304,17 @@ void program_name(char *in, char *out, int size)
 | 
			
		||||
 | 
			
		||||
	q=strrchr(p,'.');
 | 
			
		||||
	if (q == NULL)
 | 
			
		||||
		q = in+size;
 | 
			
		||||
	strncpy(out,p,q-p);
 | 
			
		||||
		q = p + strlen(p);
 | 
			
		||||
	strncpy(out,p,size-1);
 | 
			
		||||
	if (q-p >= size)
 | 
			
		||||
		{
 | 
			
		||||
		out[size-1]='\0';
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		out[q-p]='\0';
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
#else
 | 
			
		||||
void program_name(char *in, char *out, int size)
 | 
			
		||||
	{
 | 
			
		||||
@@ -324,22 +325,24 @@ void program_name(char *in, char *out, int size)
 | 
			
		||||
		p++;
 | 
			
		||||
	else
 | 
			
		||||
		p=in;
 | 
			
		||||
	strncpy(out,p,size-1);
 | 
			
		||||
	out[size-1]='\0';
 | 
			
		||||
	BUF_strlcpy(out,p,size);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WIN32
 | 
			
		||||
int WIN32_rename(char *from, char *to)
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
int VMS_strcasecmp(const char *str1, const char *str2)
 | 
			
		||||
	{
 | 
			
		||||
	/* Windows rename gives an error if 'to' exists, so delete it
 | 
			
		||||
	 * first and ignore file not found errror
 | 
			
		||||
	 */
 | 
			
		||||
	if((remove(to) != 0) && (errno != ENOENT))
 | 
			
		||||
	while (*str1 && *str2)
 | 
			
		||||
		{
 | 
			
		||||
		int res = toupper(*str1) - toupper(*str2);
 | 
			
		||||
		if (res) return res < 0 ? -1 : 1;
 | 
			
		||||
		}
 | 
			
		||||
	if (*str1)
 | 
			
		||||
		return 1;
 | 
			
		||||
	if (*str2)
 | 
			
		||||
		return -1;
 | 
			
		||||
#undef rename
 | 
			
		||||
	return rename(from, to);
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -418,15 +421,19 @@ int app_init(long mesgwin)
 | 
			
		||||
 | 
			
		||||
int dump_cert_text (BIO *out, X509 *x)
 | 
			
		||||
{
 | 
			
		||||
	char buf[256];
 | 
			
		||||
	X509_NAME_oneline(X509_get_subject_name(x),buf,256);
 | 
			
		||||
	BIO_puts(out,"subject=");
 | 
			
		||||
	BIO_puts(out,buf);
 | 
			
		||||
	char *p;
 | 
			
		||||
 | 
			
		||||
	X509_NAME_oneline(X509_get_issuer_name(x),buf,256);
 | 
			
		||||
	BIO_puts(out,"\nissuer= ");
 | 
			
		||||
	BIO_puts(out,buf);
 | 
			
		||||
	p=X509_NAME_oneline(X509_get_subject_name(x),NULL,0);
 | 
			
		||||
	BIO_puts(out,"subject=");
 | 
			
		||||
	BIO_puts(out,p);
 | 
			
		||||
	OPENSSL_free(p);
 | 
			
		||||
 | 
			
		||||
	p=X509_NAME_oneline(X509_get_issuer_name(x),NULL,0);
 | 
			
		||||
	BIO_puts(out,"\nissuer=");
 | 
			
		||||
	BIO_puts(out,p);
 | 
			
		||||
	BIO_puts(out,"\n");
 | 
			
		||||
	OPENSSL_free(p);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -446,7 +453,7 @@ static int ui_read(UI *ui, UI_STRING *uis)
 | 
			
		||||
			{
 | 
			
		||||
			const char *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);
 | 
			
		||||
				return 1;
 | 
			
		||||
@@ -470,7 +477,7 @@ static int ui_write(UI *ui, UI_STRING *uis)
 | 
			
		||||
			{
 | 
			
		||||
			const char *password =
 | 
			
		||||
				((PW_CB_DATA *)UI_get0_user_data(ui))->password;
 | 
			
		||||
			if (password[0] != '\0')
 | 
			
		||||
			if (password && password[0] != '\0')
 | 
			
		||||
				return 1;
 | 
			
		||||
			}
 | 
			
		||||
		default:
 | 
			
		||||
@@ -483,7 +490,7 @@ static int ui_close(UI *ui)
 | 
			
		||||
	{
 | 
			
		||||
	return UI_method_get_closer(UI_OpenSSL())(ui);
 | 
			
		||||
	}
 | 
			
		||||
int setup_ui_method()
 | 
			
		||||
int setup_ui_method(void)
 | 
			
		||||
	{
 | 
			
		||||
	ui_method = UI_create_method("OpenSSL application user interface");
 | 
			
		||||
	UI_method_set_opener(ui_method, ui_open);
 | 
			
		||||
@@ -492,7 +499,7 @@ int setup_ui_method()
 | 
			
		||||
	UI_method_set_closer(ui_method, ui_close);
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
void destroy_ui_method()
 | 
			
		||||
void destroy_ui_method(void)
 | 
			
		||||
	{
 | 
			
		||||
	if(ui_method)
 | 
			
		||||
		{
 | 
			
		||||
@@ -558,7 +565,7 @@ int password_callback(char *buf, int bufsiz, int verify,
 | 
			
		||||
 | 
			
		||||
		if (buff)
 | 
			
		||||
			{
 | 
			
		||||
			memset(buff,0,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_cleanse(buff,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_free(buff);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
@@ -568,13 +575,13 @@ int password_callback(char *buf, int bufsiz, int verify,
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "User interface error\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			memset(buf,0,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_cleanse(buf,(unsigned int)bufsiz);
 | 
			
		||||
			res = 0;
 | 
			
		||||
			}
 | 
			
		||||
		if (ok == -2)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"aborted!\n");
 | 
			
		||||
			memset(buf,0,(unsigned int)bufsiz);
 | 
			
		||||
			OPENSSL_cleanse(buf,(unsigned int)bufsiz);
 | 
			
		||||
			res = 0;
 | 
			
		||||
			}
 | 
			
		||||
		UI_free(ui);
 | 
			
		||||
@@ -787,7 +794,7 @@ end:
 | 
			
		||||
	return(x);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *key=NULL;
 | 
			
		||||
@@ -797,11 +804,12 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
	cb_data.password = pass;
 | 
			
		||||
	cb_data.prompt_info = file;
 | 
			
		||||
 | 
			
		||||
	if (file == NULL)
 | 
			
		||||
	if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err,"no keyfile specified\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	if (format == FORMAT_ENGINE)
 | 
			
		||||
		{
 | 
			
		||||
		if (!e)
 | 
			
		||||
@@ -811,15 +819,23 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
				ui_method, &cb_data);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	key=BIO_new(BIO_s_file());
 | 
			
		||||
	if (key == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
	if (file == NULL && maybe_stdin)
 | 
			
		||||
		{
 | 
			
		||||
		setvbuf(stdin, NULL, _IONBF, 0);
 | 
			
		||||
		BIO_set_fp(key,stdin,BIO_NOCLOSE);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		if (BIO_read_filename(key,file) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
		BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
 | 
			
		||||
			BIO_printf(err, "Error opening %s %s\n",
 | 
			
		||||
				key_descrip, file);
 | 
			
		||||
			ERR_print_errors(err);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
@@ -856,7 +872,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
	return(pkey);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *key=NULL;
 | 
			
		||||
@@ -866,11 +882,12 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
	cb_data.password = pass;
 | 
			
		||||
	cb_data.prompt_info = file;
 | 
			
		||||
 | 
			
		||||
	if (file == NULL)
 | 
			
		||||
	if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(err,"no keyfile specified\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	if (format == FORMAT_ENGINE)
 | 
			
		||||
		{
 | 
			
		||||
		if (!e)
 | 
			
		||||
@@ -880,15 +897,23 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
				ui_method, &cb_data);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	key=BIO_new(BIO_s_file());
 | 
			
		||||
	if (key == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
	if (file == NULL && maybe_stdin)
 | 
			
		||||
		{
 | 
			
		||||
		setvbuf(stdin, NULL, _IONBF, 0);
 | 
			
		||||
		BIO_set_fp(key,stdin,BIO_NOCLOSE);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		if (BIO_read_filename(key,file) <= 0)
 | 
			
		||||
			{
 | 
			
		||||
		BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
 | 
			
		||||
			BIO_printf(err, "Error opening %s %s\n",
 | 
			
		||||
				key_descrip, file);
 | 
			
		||||
			ERR_print_errors(err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
@@ -918,7 +943,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
 | 
			
		||||
EVP_PKEY *
 | 
			
		||||
static EVP_PKEY *
 | 
			
		||||
load_netscape_key(BIO *err, BIO *key, const char *file,
 | 
			
		||||
		const char *key_descrip, int format)
 | 
			
		||||
	{
 | 
			
		||||
@@ -935,7 +960,7 @@ load_netscape_key(BIO *err, BIO *key, const char *file,
 | 
			
		||||
		goto error;
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		if (!BUF_MEM_grow(buf,size+1024*10))
 | 
			
		||||
		if (!BUF_MEM_grow_clean(buf,size+1024*10))
 | 
			
		||||
			goto error;
 | 
			
		||||
		i = BIO_read(key, &(buf->data[size]), 1024*10);
 | 
			
		||||
		size += i;
 | 
			
		||||
@@ -1063,6 +1088,7 @@ int set_cert_ex(unsigned long *flags, const char *arg)
 | 
			
		||||
		{ "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
 | 
			
		||||
		{ "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
 | 
			
		||||
		{ "no_aux", X509_FLAG_NO_AUX, 0},
 | 
			
		||||
		{ "no_attributes", X509_FLAG_NO_ATTRIBUTES, 0},
 | 
			
		||||
		{ "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
@@ -1206,18 +1232,20 @@ static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_T
 | 
			
		||||
 | 
			
		||||
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
 | 
			
		||||
{
 | 
			
		||||
	char buf[256];
 | 
			
		||||
	char *buf;
 | 
			
		||||
	char mline = 0;
 | 
			
		||||
	int indent = 0;
 | 
			
		||||
 | 
			
		||||
	if(title) BIO_puts(out, title);
 | 
			
		||||
	if((lflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
 | 
			
		||||
		mline = 1;
 | 
			
		||||
		indent = 4;
 | 
			
		||||
	}
 | 
			
		||||
	if(lflags == XN_FLAG_COMPAT) {
 | 
			
		||||
		X509_NAME_oneline(nm,buf,256);
 | 
			
		||||
		BIO_puts(out,buf);
 | 
			
		||||
		buf = X509_NAME_oneline(nm, 0, 0);
 | 
			
		||||
		BIO_puts(out, buf);
 | 
			
		||||
		BIO_puts(out, "\n");
 | 
			
		||||
		OPENSSL_free(buf);
 | 
			
		||||
	} else {
 | 
			
		||||
		if(mline) BIO_puts(out, "\n");
 | 
			
		||||
		X509_NAME_print_ex(out, nm, indent, lflags);
 | 
			
		||||
@@ -1255,8 +1283,9 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath)
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
/* Try to load an engine in a shareable library */
 | 
			
		||||
ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
 | 
			
		||||
static ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
 | 
			
		||||
	{
 | 
			
		||||
	ENGINE *e = ENGINE_by_id("dynamic");
 | 
			
		||||
	if (e)
 | 
			
		||||
@@ -1311,6 +1340,7 @@ ENGINE *setup_engine(BIO *err, const char *engine, int debug)
 | 
			
		||||
		}
 | 
			
		||||
        return e;
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int load_config(BIO *err, CONF *cnf)
 | 
			
		||||
	{
 | 
			
		||||
@@ -1329,3 +1359,635 @@ int load_config(BIO *err, CONF *cnf)
 | 
			
		||||
		}
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
char *make_config_name()
 | 
			
		||||
	{
 | 
			
		||||
	const char *t=X509_get_default_cert_area();
 | 
			
		||||
	size_t len;
 | 
			
		||||
	char *p;
 | 
			
		||||
 | 
			
		||||
	len=strlen(t)+strlen(OPENSSL_CONF)+2;
 | 
			
		||||
	p=OPENSSL_malloc(len);
 | 
			
		||||
	BUF_strlcpy(p,t,len);
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
	BUF_strlcat(p,"/",len);
 | 
			
		||||
#endif
 | 
			
		||||
	BUF_strlcat(p,OPENSSL_CONF,len);
 | 
			
		||||
 | 
			
		||||
	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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										85
									
								
								apps/apps.h
									
									
									
									
									
								
							
							
						
						
									
										85
									
								
								apps/apps.h
									
									
									
									
									
								
							@@ -121,7 +121,9 @@
 | 
			
		||||
#include <openssl/lhash.h>
 | 
			
		||||
#include <openssl/conf.h>
 | 
			
		||||
#include <openssl/txt_db.h>
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
#include <openssl/engine.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <openssl/ossl_typ.h>
 | 
			
		||||
 | 
			
		||||
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
 | 
			
		||||
@@ -134,10 +136,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read,
 | 
			
		||||
                                       * (see e_os.h).  The string is
 | 
			
		||||
                                       * destroyed! */
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_NO_STDIO
 | 
			
		||||
BIO_METHOD *BIO_s_file();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WIN32
 | 
			
		||||
#define rename(from,to) WIN32_rename((from),(to))
 | 
			
		||||
int WIN32_rename(char *oldname,char *newname);
 | 
			
		||||
@@ -148,9 +146,13 @@ int WIN32_rename(char *oldname,char *newname);
 | 
			
		||||
#define MAIN(a,v)	main(a,v)
 | 
			
		||||
 | 
			
		||||
#ifndef NON_MAIN
 | 
			
		||||
CONF *config=NULL;
 | 
			
		||||
BIO *bio_err=NULL;
 | 
			
		||||
int in_FIPS_mode=0;
 | 
			
		||||
#else
 | 
			
		||||
extern CONF *config;
 | 
			
		||||
extern BIO *bio_err;
 | 
			
		||||
extern int in_FIPS_mode;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
@@ -159,6 +161,7 @@ extern BIO *bio_err;
 | 
			
		||||
extern CONF *config;
 | 
			
		||||
extern char *default_config_file;
 | 
			
		||||
extern BIO *bio_err;
 | 
			
		||||
extern int in_FIPS_mode;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -175,6 +178,7 @@ extern BIO *bio_err;
 | 
			
		||||
		do_pipe_sig()
 | 
			
		||||
#  define apps_shutdown()
 | 
			
		||||
#else
 | 
			
		||||
#  ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
#    if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
 | 
			
		||||
     defined(OPENSSL_SYS_WIN32)
 | 
			
		||||
#      ifdef _O_BINARY
 | 
			
		||||
@@ -199,6 +203,32 @@ extern BIO *bio_err;
 | 
			
		||||
			EVP_cleanup(); ENGINE_cleanup(); \
 | 
			
		||||
			CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
 | 
			
		||||
			ERR_free_strings(); } while(0)
 | 
			
		||||
#  else
 | 
			
		||||
#    if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
 | 
			
		||||
     defined(OPENSSL_SYS_WIN32)
 | 
			
		||||
#      ifdef _O_BINARY
 | 
			
		||||
#        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
 | 
			
		||||
 | 
			
		||||
typedef struct args_st
 | 
			
		||||
@@ -217,8 +247,8 @@ typedef struct pw_cb_data
 | 
			
		||||
int password_callback(char *buf, int bufsiz, int verify,
 | 
			
		||||
	PW_CB_DATA *cb_data);
 | 
			
		||||
 | 
			
		||||
int setup_ui_method();
 | 
			
		||||
void destroy_ui_method();
 | 
			
		||||
int setup_ui_method(void);
 | 
			
		||||
void destroy_ui_method(void);
 | 
			
		||||
 | 
			
		||||
int should_retry(int i);
 | 
			
		||||
int args_from_file(char *file, int *argc, char **argv[]);
 | 
			
		||||
@@ -237,21 +267,56 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
 | 
			
		||||
int add_oid_section(BIO *err, CONF *conf);
 | 
			
		||||
X509 *load_cert(BIO *err, const char *file, int format,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *cert_descrip);
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip);
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
 | 
			
		||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *key_descrip);
 | 
			
		||||
STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
 | 
			
		||||
	const char *pass, ENGINE *e, const char *cert_descrip);
 | 
			
		||||
X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int load_config(BIO *err, CONF *cnf);
 | 
			
		||||
char *make_config_name(void);
 | 
			
		||||
 | 
			
		||||
/* Functions defined in ca.c and also used in ocsp.c */
 | 
			
		||||
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
 | 
			
		||||
			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);
 | 
			
		||||
 | 
			
		||||
@@ -274,4 +339,6 @@ X509_NAME *do_subject(char *str, long chtype);
 | 
			
		||||
 | 
			
		||||
#define APP_PASS_LEN	1024
 | 
			
		||||
 | 
			
		||||
#define SERIAL_RAND_BITS	64
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -184,7 +184,7 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err,"where options are\n");
 | 
			
		||||
		BIO_printf(bio_err," -inform arg   input format - one of DER TXT PEM\n");
 | 
			
		||||
		BIO_printf(bio_err," -in arg       input file\n");
 | 
			
		||||
		BIO_printf(bio_err," -out arg      output file\n");
 | 
			
		||||
		BIO_printf(bio_err," -out arg      output file (output format is always DER\n");
 | 
			
		||||
		BIO_printf(bio_err," -noout arg    don't produce any output\n");
 | 
			
		||||
		BIO_printf(bio_err," -offset arg   offset into file\n");
 | 
			
		||||
		BIO_printf(bio_err," -length arg   length of section in file\n");
 | 
			
		||||
@@ -195,7 +195,6 @@ bad:
 | 
			
		||||
		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,"               ASN1 blob wrappings\n");
 | 
			
		||||
		BIO_printf(bio_err," -out filename output DER encoding to file\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -279,6 +278,7 @@ bad:
 | 
			
		||||
		tmplen=num;
 | 
			
		||||
		for (i=0; i<sk_num(osk); i++)
 | 
			
		||||
			{
 | 
			
		||||
			int typ;
 | 
			
		||||
			ASN1_TYPE *atmp;
 | 
			
		||||
			j=atoi(sk_value(osk,i));
 | 
			
		||||
			if (j == 0)
 | 
			
		||||
@@ -297,6 +297,15 @@ bad:
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				goto end;
 | 
			
		||||
				}
 | 
			
		||||
			typ = ASN1_TYPE_get(at);
 | 
			
		||||
			if ((typ == V_ASN1_OBJECT)
 | 
			
		||||
				|| (typ == V_ASN1_NULL))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "Can't parse %s type\n",
 | 
			
		||||
					typ == V_ASN1_NULL ? "NULL" : "OBJECT");
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				goto end;
 | 
			
		||||
				}
 | 
			
		||||
			/* hmm... this is a little evil but it works */
 | 
			
		||||
			tmpbuf=at->value.asn1_string->data;
 | 
			
		||||
			tmplen=at->value.asn1_string->length;
 | 
			
		||||
@@ -305,7 +314,15 @@ bad:
 | 
			
		||||
		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(BIO_write(derout, str + offset, length) != (int)length) {
 | 
			
		||||
			BIO_printf(bio_err, "Error writing output\n");
 | 
			
		||||
@@ -333,6 +350,6 @@ end:
 | 
			
		||||
	if (osk != NULL) sk_free(osk);
 | 
			
		||||
	OBJ_cleanup();
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -187,7 +187,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_puts(STDout,SSL_CIPHER_description(
 | 
			
		||||
				sk_SSL_CIPHER_value(sk,i),
 | 
			
		||||
				buf,512));
 | 
			
		||||
				buf,sizeof buf));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -203,6 +203,6 @@ end:
 | 
			
		||||
	if (ssl != NULL) SSL_free(ssl);
 | 
			
		||||
	if (STDout != NULL) BIO_free_all(STDout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -81,6 +81,7 @@ static char *crl_usage[]={
 | 
			
		||||
" -in arg         - input file - default stdin\n",
 | 
			
		||||
" -out arg        - output file - default stdout\n",
 | 
			
		||||
" -hash           - print hash value\n",
 | 
			
		||||
" -fingerprint    - print the crl fingerprint\n",
 | 
			
		||||
" -issuer         - print issuer DN\n",
 | 
			
		||||
" -lastupdate     - lastUpdate field\n",
 | 
			
		||||
" -nextupdate     - nextUpdate field\n",
 | 
			
		||||
@@ -377,7 +378,7 @@ end:
 | 
			
		||||
		X509_STORE_free(store);
 | 
			
		||||
	}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static X509_CRL *load_crl(char *infile, int format)
 | 
			
		||||
 
 | 
			
		||||
@@ -280,7 +280,7 @@ end:
 | 
			
		||||
	if (crl != NULL) X509_CRL_free(crl);
 | 
			
		||||
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										119
									
								
								apps/dgst.c
									
									
									
									
									
								
							
							
						
						
									
										119
									
								
								apps/dgst.c
									
									
									
									
									
								
							@@ -66,6 +66,7 @@
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/hmac.h>
 | 
			
		||||
 | 
			
		||||
#undef BUFSIZE
 | 
			
		||||
#define BUFSIZE	1024*8
 | 
			
		||||
@@ -73,8 +74,11 @@
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG	dgst_main
 | 
			
		||||
 | 
			
		||||
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
		EVP_PKEY *key, unsigned char *sigin, int siglen);
 | 
			
		||||
static HMAC_CTX hmac_ctx;
 | 
			
		||||
 | 
			
		||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
	  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
			
		||||
	  const char *file,BIO *bmd,const char *hmac_key);
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
@@ -99,7 +103,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	EVP_PKEY *sigkey = NULL;
 | 
			
		||||
	unsigned char *sigbuf = NULL;
 | 
			
		||||
	int siglen = 0;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	char *hmac_key=NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -116,7 +123,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	/* first check the program name */
 | 
			
		||||
	program_name(argv[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
	program_name(argv[0],pname,sizeof pname);
 | 
			
		||||
 | 
			
		||||
	md=EVP_get_digestbyname(pname);
 | 
			
		||||
 | 
			
		||||
@@ -165,17 +172,25 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) break;
 | 
			
		||||
			keyform=str2fmt(*(++argv));
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) break;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-hex") == 0)
 | 
			
		||||
			out_bin = 0;
 | 
			
		||||
		else if (strcmp(*argv,"-binary") == 0)
 | 
			
		||||
			out_bin = 1;
 | 
			
		||||
		else if (strcmp(*argv,"-d") == 0)
 | 
			
		||||
			debug=1;
 | 
			
		||||
		else if (!strcmp(*argv,"-hmac"))
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1)
 | 
			
		||||
				break;
 | 
			
		||||
			hmac_key=*++argv;
 | 
			
		||||
			}
 | 
			
		||||
		else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
 | 
			
		||||
			md=m;
 | 
			
		||||
		else
 | 
			
		||||
@@ -207,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,"-signature file signature to verify\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");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
 | 
			
		||||
			LN_md5,LN_md5);
 | 
			
		||||
@@ -227,7 +244,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	in=BIO_new(BIO_s_file());
 | 
			
		||||
	bmd=BIO_new(BIO_f_md());
 | 
			
		||||
@@ -276,10 +295,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if(keyfile)
 | 
			
		||||
		{
 | 
			
		||||
		if (want_pub)
 | 
			
		||||
			sigkey = load_pubkey(bio_err, keyfile, keyform, NULL,
 | 
			
		||||
			sigkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL,
 | 
			
		||||
				e, "key file");
 | 
			
		||||
		else
 | 
			
		||||
			sigkey = load_key(bio_err, keyfile, keyform, NULL,
 | 
			
		||||
			sigkey = load_key(bio_err, keyfile, keyform, 0, NULL,
 | 
			
		||||
				e, "key file");
 | 
			
		||||
		if (!sigkey)
 | 
			
		||||
			{
 | 
			
		||||
@@ -310,38 +329,58 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/* we use md as a filter, reading from 'in' */
 | 
			
		||||
	BIO_set_md(bmd,md);
 | 
			
		||||
	if (!BIO_set_md(bmd,md))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "Error setting digest %s\n", pname);
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
	inp=BIO_push(bmd,in);
 | 
			
		||||
 | 
			
		||||
	if (argc == 0)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
			
		||||
		do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, siglen);
 | 
			
		||||
		err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
 | 
			
		||||
			  siglen,"","(stdin)",bmd,hmac_key);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		name=OBJ_nid2sn(md->type);
 | 
			
		||||
		for (i=0; i<argc; i++)
 | 
			
		||||
			{
 | 
			
		||||
			char *tmp,*tofree=NULL;
 | 
			
		||||
			int r;
 | 
			
		||||
 | 
			
		||||
			if (BIO_read_filename(in,argv[i]) <= 0)
 | 
			
		||||
				{
 | 
			
		||||
				perror(argv[i]);
 | 
			
		||||
				err++;
 | 
			
		||||
				continue;
 | 
			
		||||
				}
 | 
			
		||||
			if(!out_bin) BIO_printf(out, "%s(%s)= ",name,argv[i]);
 | 
			
		||||
			do_fp(out, buf,inp,separator, out_bin, sigkey, 
 | 
			
		||||
								sigbuf, siglen);
 | 
			
		||||
			if(!out_bin)
 | 
			
		||||
				{
 | 
			
		||||
				size_t len = strlen(name)+strlen(argv[i])+(hmac_key ? 5 : 0)+5;
 | 
			
		||||
				tmp=tofree=OPENSSL_malloc(len);
 | 
			
		||||
				BIO_snprintf(tmp,len,"%s%s(%s)= ",
 | 
			
		||||
							 hmac_key ? "HMAC-" : "",name,argv[i]);
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				tmp="";
 | 
			
		||||
			r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
 | 
			
		||||
				siglen,tmp,argv[i],bmd,hmac_key);
 | 
			
		||||
			if(r)
 | 
			
		||||
			    err=r;
 | 
			
		||||
			if(tofree)
 | 
			
		||||
				OPENSSL_free(tofree);
 | 
			
		||||
			(void)BIO_reset(bmd);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
end:
 | 
			
		||||
	if (buf != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		memset(buf,0,BUFSIZE);
 | 
			
		||||
		OPENSSL_cleanse(buf,BUFSIZE);
 | 
			
		||||
		OPENSSL_free(buf);
 | 
			
		||||
		}
 | 
			
		||||
	if (in != NULL) BIO_free(in);
 | 
			
		||||
@@ -350,33 +389,56 @@ end:
 | 
			
		||||
	if(sigbuf) OPENSSL_free(sigbuf);
 | 
			
		||||
	if (bmd != NULL) BIO_free(bmd);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(err);
 | 
			
		||||
	OPENSSL_EXIT(err);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
			EVP_PKEY *key, unsigned char *sigin, int siglen)
 | 
			
		||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
	  EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
 | 
			
		||||
	  const char *file,BIO *bmd,const char *hmac_key)
 | 
			
		||||
	{
 | 
			
		||||
	int len;
 | 
			
		||||
	unsigned int len;
 | 
			
		||||
	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 (;;)
 | 
			
		||||
		{
 | 
			
		||||
		i=BIO_read(bp,(char *)buf,BUFSIZE);
 | 
			
		||||
		if (i <= 0) break;
 | 
			
		||||
		if(i < 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Read Error in %s\n",file);
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		if (i == 0) break;
 | 
			
		||||
		}
 | 
			
		||||
	if(sigin)
 | 
			
		||||
		{
 | 
			
		||||
		EVP_MD_CTX *ctx;
 | 
			
		||||
		BIO_get_md_ctx(bp, &ctx);
 | 
			
		||||
		i = EVP_VerifyFinal(ctx, sigin, (unsigned int)siglen, key); 
 | 
			
		||||
		if(i > 0) BIO_printf(out, "Verified OK\n");
 | 
			
		||||
		else if(i == 0) BIO_printf(out, "Verification Failure\n");
 | 
			
		||||
		if(i > 0)
 | 
			
		||||
			BIO_printf(out, "Verified OK\n");
 | 
			
		||||
		else if(i == 0)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(out, "Verification Failure\n");
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error Verifying Data\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		return;
 | 
			
		||||
		return 0;
 | 
			
		||||
		}
 | 
			
		||||
	if(key)
 | 
			
		||||
		{
 | 
			
		||||
@@ -386,16 +448,22 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error Signing Data\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			return;
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else if(hmac_key)
 | 
			
		||||
		{
 | 
			
		||||
		HMAC_Final(&hmac_ctx,buf,&len);
 | 
			
		||||
		HMAC_CTX_cleanup(&hmac_ctx);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		len=BIO_gets(bp,(char *)buf,BUFSIZE);
 | 
			
		||||
 | 
			
		||||
	if(binout) BIO_write(out, buf, len);
 | 
			
		||||
	else 
 | 
			
		||||
		{
 | 
			
		||||
		for (i=0; i<len; i++)
 | 
			
		||||
		BIO_write(out,title,strlen(title));
 | 
			
		||||
		for (i=0; (unsigned int)i<len; i++)
 | 
			
		||||
			{
 | 
			
		||||
			if (sep && (i != 0))
 | 
			
		||||
				BIO_printf(out, ":");
 | 
			
		||||
@@ -403,5 +471,10 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
 | 
			
		||||
			}
 | 
			
		||||
		BIO_printf(out, "\n");
 | 
			
		||||
		}
 | 
			
		||||
	if (hmac_key)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_set_md_ctx(bmd,md_ctx);
 | 
			
		||||
		}
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								apps/dh.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								apps/dh.c
									
									
									
									
									
								
							@@ -87,12 +87,17 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	DH *dh=NULL;
 | 
			
		||||
	int i,badops=0,text=0;
 | 
			
		||||
	BIO *in=NULL,*out=NULL;
 | 
			
		||||
	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();
 | 
			
		||||
 | 
			
		||||
@@ -103,7 +108,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (!load_config(bio_err, NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	infile=NULL;
 | 
			
		||||
	outfile=NULL;
 | 
			
		||||
	informat=FORMAT_PEM;
 | 
			
		||||
@@ -134,11 +141,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-check") == 0)
 | 
			
		||||
			check=1;
 | 
			
		||||
		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," -C            Output C code\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");
 | 
			
		||||
#endif
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	in=BIO_new(BIO_s_file());
 | 
			
		||||
	out=BIO_new(BIO_s_file());
 | 
			
		||||
@@ -333,6 +346,6 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dh != NULL) DH_free(dh);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -148,7 +148,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	DH *dh=NULL;
 | 
			
		||||
	int i,badops=0,text=0;
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
@@ -157,7 +159,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	BIO *in=NULL,*out=NULL;
 | 
			
		||||
	int informat,outformat,check=0,noout=0,C=0,ret=1;
 | 
			
		||||
	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;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
@@ -199,11 +204,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-check") == 0)
 | 
			
		||||
			check=1;
 | 
			
		||||
		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," -5            generate parameters using  5 as the generator value\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");
 | 
			
		||||
#endif
 | 
			
		||||
		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,"               the random number generator\n");
 | 
			
		||||
@@ -259,7 +268,9 @@ bad:
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (g && !num)
 | 
			
		||||
		num = DEFBITS;
 | 
			
		||||
@@ -519,7 +530,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dh != NULL) DH_free(dh);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								apps/dsa.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								apps/dsa.c
									
									
									
									
									
								
							@@ -90,7 +90,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	int ret=1;
 | 
			
		||||
	DSA *dsa=NULL;
 | 
			
		||||
	int i,badops=0;
 | 
			
		||||
@@ -98,7 +100,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	BIO *in=NULL,*out=NULL;
 | 
			
		||||
	int informat,outformat,text=0,noout=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 *passin = NULL, *passout = NULL;
 | 
			
		||||
	int modulus=0;
 | 
			
		||||
@@ -112,7 +117,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (!load_config(bio_err, NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	infile=NULL;
 | 
			
		||||
	outfile=NULL;
 | 
			
		||||
	informat=FORMAT_PEM;
 | 
			
		||||
@@ -153,11 +160,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargout= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-noout") == 0)
 | 
			
		||||
			noout=1;
 | 
			
		||||
		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," -out arg        output file\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");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err," -des            encrypt PEM output with cbc des\n");
 | 
			
		||||
		BIO_printf(bio_err," -des3           encrypt PEM output with ede cbc des using 168 bit key\n");
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
@@ -207,7 +218,9 @@ bad:
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
			
		||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
			
		||||
@@ -314,6 +327,6 @@ end:
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -90,7 +90,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	DSA *dsa=NULL;
 | 
			
		||||
	int i,badops=0,text=0;
 | 
			
		||||
	BIO *in=NULL,*out=NULL;
 | 
			
		||||
@@ -98,7 +100,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	char *infile,*outfile,*prog,*inrand=NULL;
 | 
			
		||||
	int numbits= -1,num,genkey=0;
 | 
			
		||||
	int need_rand=0;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -139,11 +143,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if(strcmp(*argv, "-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine = *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-text") == 0)
 | 
			
		||||
			text=1;
 | 
			
		||||
		else if (strcmp(*argv,"-C") == 0)
 | 
			
		||||
@@ -191,7 +197,9 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err," -noout        no output\n");
 | 
			
		||||
		BIO_printf(bio_err," -genkey       generate a DSA key\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");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err," number        number of bits to use for generating private key\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
@@ -235,7 +243,9 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (need_rand)
 | 
			
		||||
		{
 | 
			
		||||
@@ -372,7 +382,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dsa != NULL) DSA_free(dsa);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										445
									
								
								apps/ecdsa.c
									
									
									
									
									
								
							
							
						
						
									
										445
									
								
								apps/ecdsa.c
									
									
									
									
									
								
							@@ -1,445 +0,0 @@
 | 
			
		||||
/* apps/ecdsa.c */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 * are met:
 | 
			
		||||
 *
 | 
			
		||||
 * 1. Redistributions of source code must retain the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer. 
 | 
			
		||||
 *
 | 
			
		||||
 * 2. Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer in
 | 
			
		||||
 *    the documentation and/or other materials provided with the
 | 
			
		||||
 *    distribution.
 | 
			
		||||
 *
 | 
			
		||||
 * 3. All advertising materials mentioning features or use of this
 | 
			
		||||
 *    software must display the following acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 | 
			
		||||
 *    endorse or promote products derived from this software without
 | 
			
		||||
 *    prior written permission. For written permission, please contact
 | 
			
		||||
 *    openssl-core@openssl.org.
 | 
			
		||||
 *
 | 
			
		||||
 * 5. Products derived from this software may not be called "OpenSSL"
 | 
			
		||||
 *    nor may "OpenSSL" appear in their names without prior written
 | 
			
		||||
 *    permission of the OpenSSL Project.
 | 
			
		||||
 *
 | 
			
		||||
 * 6. Redistributions of any form whatsoever must retain the following
 | 
			
		||||
 *    acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
			
		||||
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 | 
			
		||||
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 | 
			
		||||
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 | 
			
		||||
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 | 
			
		||||
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
			
		||||
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 | 
			
		||||
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 | 
			
		||||
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 | 
			
		||||
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 * ====================================================================
 | 
			
		||||
 *
 | 
			
		||||
 * This product includes cryptographic software written by Eric Young
 | 
			
		||||
 * (eay@cryptsoft.com).  This product includes software written by Tim
 | 
			
		||||
 * Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 | 
			
		||||
 * All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * This package is an SSL implementation written
 | 
			
		||||
 * by Eric Young (eay@cryptsoft.com).
 | 
			
		||||
 * The implementation was written so as to conform with Netscapes SSL.
 | 
			
		||||
 * 
 | 
			
		||||
 * This library is free for commercial and non-commercial use as long as
 | 
			
		||||
 * the following conditions are aheared to.  The following conditions
 | 
			
		||||
 * apply to all code found in this distribution, be it the RC4, RSA,
 | 
			
		||||
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 | 
			
		||||
 * included with this distribution is covered by the same copyright terms
 | 
			
		||||
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright remains Eric Young's, and as such any Copyright notices in
 | 
			
		||||
 * the code are not to be removed.
 | 
			
		||||
 * If this package is used in a product, Eric Young should be given attribution
 | 
			
		||||
 * as the author of the parts of the library used.
 | 
			
		||||
 * This can be in the form of a textual message at program startup or
 | 
			
		||||
 * in documentation (online or textual) provided with the package.
 | 
			
		||||
 * 
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 * are met:
 | 
			
		||||
 * 1. Redistributions of source code must retain the copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 * 2. Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *    documentation and/or other materials provided with the distribution.
 | 
			
		||||
 * 3. All advertising materials mentioning features or use of this software
 | 
			
		||||
 *    must display the following acknowledgement:
 | 
			
		||||
 *    "This product includes cryptographic software written by
 | 
			
		||||
 *     Eric Young (eay@cryptsoft.com)"
 | 
			
		||||
 *    The word 'cryptographic' can be left out if the rouines from the library
 | 
			
		||||
 *    being used are not cryptographic related :-).
 | 
			
		||||
 * 4. If you include any Windows specific code (or a derivative thereof) from 
 | 
			
		||||
 *    the apps directory (application code) you must include an acknowledgement:
 | 
			
		||||
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 | 
			
		||||
 * 
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 | 
			
		||||
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
			
		||||
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 | 
			
		||||
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 | 
			
		||||
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 | 
			
		||||
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 | 
			
		||||
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
			
		||||
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 | 
			
		||||
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 | 
			
		||||
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
			
		||||
 * SUCH DAMAGE.
 | 
			
		||||
 * 
 | 
			
		||||
 * The licence and distribution terms for any publically available version or
 | 
			
		||||
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 | 
			
		||||
 * copied and put under another distribution licence
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/bio.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#include <openssl/evp.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG	ecdsa_main
 | 
			
		||||
 | 
			
		||||
/* -inform arg	- input format - default PEM (one of DER, NET or PEM)
 | 
			
		||||
 * -outform arg - output format - default PEM
 | 
			
		||||
 * -in arg	- input file - default stdin
 | 
			
		||||
 * -out arg	- output file - default stdout
 | 
			
		||||
 * -des		- encrypt output if PEM format with DES in cbc mode
 | 
			
		||||
 * -des3	- encrypt output if PEM format
 | 
			
		||||
 * -idea	- encrypt output if PEM format
 | 
			
		||||
 * -aes128	- encrypt output if PEM format
 | 
			
		||||
 * -aes192	- encrypt output if PEM format
 | 
			
		||||
 * -aes256	- encrypt output if PEM format
 | 
			
		||||
 * -text	- print a text version
 | 
			
		||||
 * -pub		- print the ECDSA public key
 | 
			
		||||
 * -compressed  - print the public key in compressed form ( default )   
 | 
			
		||||
 * -hybrid 	- print the public key in hybrid form
 | 
			
		||||
 * -uncompressed - print the public key in uncompressed form
 | 
			
		||||
 *		  the last three options ( compressed, hybrid and uncompressed )
 | 
			
		||||
 *		  are only used if the "-pub" option is also selected.
 | 
			
		||||
 *	  	  For a precise description of the the meaning of compressed,
 | 
			
		||||
 *		  hybrid and uncompressed please refer to the X9.62 standart.
 | 
			
		||||
 *		  All three forms represents ways to express the ecdsa public
 | 
			
		||||
 *		  key ( a point on a elliptic curve ) as octet string. Let len be
 | 
			
		||||
 *		  the length ( in bytes ) of an element of the field over which
 | 
			
		||||
 *		  the curve is defined, then a compressed octet string has the form
 | 
			
		||||
 *		  0x02 + result of BN_bn2bin() of the x coordinate of the public key
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
	ENGINE 	*e = NULL;
 | 
			
		||||
	int 	ret = 1;
 | 
			
		||||
	ECDSA 	*ecdsa = NULL;
 | 
			
		||||
	int 	i, badops = 0;
 | 
			
		||||
	const EVP_CIPHER *enc = NULL;
 | 
			
		||||
	BIO 	*in = NULL, *out = NULL;
 | 
			
		||||
	int 	informat, outformat, text=0, noout=0;
 | 
			
		||||
	int  	pubin = 0, pubout = 0;
 | 
			
		||||
	char 	*infile, *outfile, *prog, *engine;
 | 
			
		||||
	char 	*passargin = NULL, *passargout = NULL;
 | 
			
		||||
	char 	*passin = NULL, *passout = NULL;
 | 
			
		||||
	int 	pub = 0, point_form = 0;
 | 
			
		||||
	unsigned char *buffer = NULL;
 | 
			
		||||
	unsigned int  buf_len = 0;
 | 
			
		||||
	BIGNUM	*tmp_bn = NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err, stderr, BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	if (!load_config(bio_err, NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	engine = NULL;
 | 
			
		||||
	infile = NULL;
 | 
			
		||||
	outfile = NULL;
 | 
			
		||||
	informat = FORMAT_PEM;
 | 
			
		||||
	outformat = FORMAT_PEM;
 | 
			
		||||
 | 
			
		||||
	prog = argv[0];
 | 
			
		||||
	argc--;
 | 
			
		||||
	argv++;
 | 
			
		||||
	while (argc >= 1)
 | 
			
		||||
	{
 | 
			
		||||
		if (strcmp(*argv,"-inform") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			informat=str2fmt(*(++argv));
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-outform") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outformat=str2fmt(*(++argv));
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-in") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			infile= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-out") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outfile= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-passin") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargin= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv,"-passout") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargout= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv, "-engine") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv, "-noout") == 0)
 | 
			
		||||
			noout = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-text") == 0)
 | 
			
		||||
			text = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-pub") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			pub = 1;
 | 
			
		||||
			buffer = (unsigned char *)(*(argv+1));
 | 
			
		||||
			if (strcmp((char *)buffer, "compressed") == 0)
 | 
			
		||||
				point_form = POINT_CONVERSION_COMPRESSED;
 | 
			
		||||
			else if (strcmp((char *)buffer, "hybrid") == 0)
 | 
			
		||||
				point_form = POINT_CONVERSION_HYBRID;
 | 
			
		||||
			else if (strcmp((char *)buffer, "uncompressed") == 0)
 | 
			
		||||
				point_form = POINT_CONVERSION_UNCOMPRESSED;
 | 
			
		||||
			if (point_form)
 | 
			
		||||
			{
 | 
			
		||||
				argc--;
 | 
			
		||||
				argv++;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		else if (strcmp(*argv, "-pubin") == 0)
 | 
			
		||||
			pubin=1;
 | 
			
		||||
		else if (strcmp(*argv, "-pubout") == 0)
 | 
			
		||||
			pubout=1;
 | 
			
		||||
		else if ((enc=EVP_get_cipherbyname(&(argv[0][1]))) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
			
		||||
			badops=1;
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		argc--;
 | 
			
		||||
		argv++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (badops)
 | 
			
		||||
	{
 | 
			
		||||
bad:
 | 
			
		||||
		BIO_printf(bio_err, "%s [options] <infile >outfile\n",prog);
 | 
			
		||||
		BIO_printf(bio_err, "where options are\n");
 | 
			
		||||
		BIO_printf(bio_err, " -inform arg     input format - DER or PEM\n");
 | 
			
		||||
		BIO_printf(bio_err, " -outform arg    output format - DER or PEM\n");
 | 
			
		||||
		BIO_printf(bio_err, " -in arg         input file\n");
 | 
			
		||||
		BIO_printf(bio_err, " -passin arg     input file pass phrase source\n");
 | 
			
		||||
		BIO_printf(bio_err, " -out arg        output file\n");
 | 
			
		||||
		BIO_printf(bio_err, " -passout arg    output file pass phrase source\n");
 | 
			
		||||
		BIO_printf(bio_err, " -engine e       use engine e, possibly a hardware device.\n");
 | 
			
		||||
		BIO_printf(bio_err, " -des            encrypt PEM output with cbc des\n");
 | 
			
		||||
		BIO_printf(bio_err, " -des3           encrypt PEM output with ede cbc des using 168 bit key\n");
 | 
			
		||||
#ifndef OPENSSL_NO_IDEA
 | 
			
		||||
		BIO_printf(bio_err, " -idea           encrypt PEM output with cbc idea\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_AES
 | 
			
		||||
		BIO_printf(bio_err, " -aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf(bio_err, "                 encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bio_err, " -text           print the key in text\n");
 | 
			
		||||
		BIO_printf(bio_err, " -noout          don't print key out\n");
 | 
			
		||||
		BIO_printf(bio_err, " -pub [compressed | hybrid | uncompressed] \n");
 | 
			
		||||
		BIO_printf(bio_err, "         compressed     print the public key in compressed form ( default )\n");   
 | 
			
		||||
		BIO_printf(bio_err, "         hybrid         print the public key in hybrid form\n");
 | 
			
		||||
 		BIO_printf(bio_err, "         uncompressed   print the public key in uncompressed form\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
 | 
			
		||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) 
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	in = BIO_new(BIO_s_file());
 | 
			
		||||
	out = BIO_new(BIO_s_file());
 | 
			
		||||
	if ((in == NULL) || (out == NULL))
 | 
			
		||||
	{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (infile == NULL)
 | 
			
		||||
		BIO_set_fp(in,stdin,BIO_NOCLOSE);
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		if (BIO_read_filename(in,infile) <= 0)
 | 
			
		||||
		{
 | 
			
		||||
			perror(infile);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	BIO_printf(bio_err,"read ECDSA key\n");
 | 
			
		||||
	if (informat == FORMAT_ASN1) 
 | 
			
		||||
	{
 | 
			
		||||
		if (pubin) 
 | 
			
		||||
			ecdsa = d2i_ECDSA_PUBKEY_bio(in, NULL);
 | 
			
		||||
		else 
 | 
			
		||||
			ecdsa = d2i_ECDSAPrivateKey_bio(in, NULL);
 | 
			
		||||
	} else if (informat == FORMAT_PEM) 
 | 
			
		||||
	{
 | 
			
		||||
		if (pubin) 
 | 
			
		||||
			ecdsa = PEM_read_bio_ECDSA_PUBKEY(in, NULL, NULL, NULL);
 | 
			
		||||
		else 
 | 
			
		||||
			ecdsa = PEM_read_bio_ECDSAPrivateKey(in, NULL, NULL, passin);
 | 
			
		||||
	} else
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "bad input format specified for key\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
	if (ecdsa == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err,"unable to load Key\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (outfile == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_set_fp(out, stdout, BIO_NOCLOSE);
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		{
 | 
			
		||||
			BIO *tmpbio = BIO_new(BIO_f_linebuffer());
 | 
			
		||||
			out = BIO_push(tmpbio, out);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		if (BIO_write_filename(out, outfile) <= 0)
 | 
			
		||||
		{
 | 
			
		||||
			perror(outfile);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (text) 
 | 
			
		||||
		if (!ECDSA_print(out, ecdsa, 0))
 | 
			
		||||
		{
 | 
			
		||||
			perror(outfile);
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (pub)
 | 
			
		||||
	{
 | 
			
		||||
		fprintf(stdout, "Public Key (");
 | 
			
		||||
		if (point_form == POINT_CONVERSION_COMPRESSED)
 | 
			
		||||
			fprintf(stdout, "COMPRESSED");
 | 
			
		||||
		else if (point_form == POINT_CONVERSION_UNCOMPRESSED)
 | 
			
		||||
			fprintf(stdout, "UNCOMPRESSED");
 | 
			
		||||
		else if (point_form == POINT_CONVERSION_HYBRID)
 | 
			
		||||
			fprintf(stdout, "HYBRID");
 | 
			
		||||
		fprintf(stdout, ")=");
 | 
			
		||||
		buf_len = EC_POINT_point2oct(ecdsa->group, EC_GROUP_get0_generator(ecdsa->group),
 | 
			
		||||
					     point_form, NULL, 0, NULL);
 | 
			
		||||
		if (!buf_len)
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"invalid public key length\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		if ((tmp_bn = BN_new()) == NULL ||
 | 
			
		||||
		    (buffer = OPENSSL_malloc(buf_len)) == NULL) goto end;
 | 
			
		||||
		if (!EC_POINT_point2oct(ecdsa->group, EC_GROUP_get0_generator(ecdsa->group),
 | 
			
		||||
					     point_form, buffer, buf_len, NULL) ||
 | 
			
		||||
		    !BN_bin2bn(buffer, buf_len, tmp_bn))
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"can not encode public key\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			OPENSSL_free(buffer);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		BN_print(out, tmp_bn);
 | 
			
		||||
		fprintf(stdout,"\n");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (noout) 
 | 
			
		||||
		goto end;
 | 
			
		||||
	BIO_printf(bio_err, "writing ECDSA key\n");
 | 
			
		||||
	if (outformat == FORMAT_ASN1) 
 | 
			
		||||
	{
 | 
			
		||||
		if(pubin || pubout) 
 | 
			
		||||
			i = i2d_ECDSA_PUBKEY_bio(out, ecdsa);
 | 
			
		||||
		else 
 | 
			
		||||
			i = i2d_ECDSAPrivateKey_bio(out, ecdsa);
 | 
			
		||||
	} else if (outformat == FORMAT_PEM) 
 | 
			
		||||
	{
 | 
			
		||||
		if(pubin || pubout)
 | 
			
		||||
			i = PEM_write_bio_ECDSA_PUBKEY(out, ecdsa);
 | 
			
		||||
		else 
 | 
			
		||||
			i = PEM_write_bio_ECDSAPrivateKey(out, ecdsa, enc,
 | 
			
		||||
							NULL, 0, NULL, passout);
 | 
			
		||||
	} else 
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "bad output format specified for outfile\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
	if (!i)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "unable to write private key\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
		ret=0;
 | 
			
		||||
end:
 | 
			
		||||
	if (in) 	BIO_free(in);
 | 
			
		||||
	if (out)	BIO_free_all(out);
 | 
			
		||||
	if (ecdsa) 	ECDSA_free(ecdsa);
 | 
			
		||||
	if (tmp_bn)	BN_free(tmp_bn);
 | 
			
		||||
	if (passin) 	OPENSSL_free(passin);
 | 
			
		||||
	if (passout) 	OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,660 +0,0 @@
 | 
			
		||||
/* apps/ecdsaparam.c */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 * are met:
 | 
			
		||||
 *
 | 
			
		||||
 * 1. Redistributions of source code must retain the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer. 
 | 
			
		||||
 *
 | 
			
		||||
 * 2. Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer in
 | 
			
		||||
 *    the documentation and/or other materials provided with the
 | 
			
		||||
 *    distribution.
 | 
			
		||||
 *
 | 
			
		||||
 * 3. All advertising materials mentioning features or use of this
 | 
			
		||||
 *    software must display the following acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 | 
			
		||||
 *    endorse or promote products derived from this software without
 | 
			
		||||
 *    prior written permission. For written permission, please contact
 | 
			
		||||
 *    openssl-core@openssl.org.
 | 
			
		||||
 *
 | 
			
		||||
 * 5. Products derived from this software may not be called "OpenSSL"
 | 
			
		||||
 *    nor may "OpenSSL" appear in their names without prior written
 | 
			
		||||
 *    permission of the OpenSSL Project.
 | 
			
		||||
 *
 | 
			
		||||
 * 6. Redistributions of any form whatsoever must retain the following
 | 
			
		||||
 *    acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
			
		||||
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 | 
			
		||||
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 | 
			
		||||
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 | 
			
		||||
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 | 
			
		||||
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
			
		||||
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 | 
			
		||||
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 | 
			
		||||
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 | 
			
		||||
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 * ====================================================================
 | 
			
		||||
 *
 | 
			
		||||
 * This product includes cryptographic software written by Eric Young
 | 
			
		||||
 * (eay@cryptsoft.com).  This product includes software written by Tim
 | 
			
		||||
 * Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 | 
			
		||||
 * All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * This package is an SSL implementation written
 | 
			
		||||
 * by Eric Young (eay@cryptsoft.com).
 | 
			
		||||
 * The implementation was written so as to conform with Netscapes SSL.
 | 
			
		||||
 * 
 | 
			
		||||
 * This library is free for commercial and non-commercial use as long as
 | 
			
		||||
 * the following conditions are aheared to.  The following conditions
 | 
			
		||||
 * apply to all code found in this distribution, be it the RC4, RSA,
 | 
			
		||||
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 | 
			
		||||
 * included with this distribution is covered by the same copyright terms
 | 
			
		||||
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright remains Eric Young's, and as such any Copyright notices in
 | 
			
		||||
 * the code are not to be removed.
 | 
			
		||||
 * If this package is used in a product, Eric Young should be given attribution
 | 
			
		||||
 * as the author of the parts of the library used.
 | 
			
		||||
 * This can be in the form of a textual message at program startup or
 | 
			
		||||
 * in documentation (online or textual) provided with the package.
 | 
			
		||||
 * 
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 * are met:
 | 
			
		||||
 * 1. Redistributions of source code must retain the copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 * 2. Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *    documentation and/or other materials provided with the distribution.
 | 
			
		||||
 * 3. All advertising materials mentioning features or use of this software
 | 
			
		||||
 *    must display the following acknowledgement:
 | 
			
		||||
 *    "This product includes cryptographic software written by
 | 
			
		||||
 *     Eric Young (eay@cryptsoft.com)"
 | 
			
		||||
 *    The word 'cryptographic' can be left out if the rouines from the library
 | 
			
		||||
 *    being used are not cryptographic related :-).
 | 
			
		||||
 * 4. If you include any Windows specific code (or a derivative thereof) from 
 | 
			
		||||
 *    the apps directory (application code) you must include an acknowledgement:
 | 
			
		||||
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 | 
			
		||||
 * 
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 | 
			
		||||
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
			
		||||
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 | 
			
		||||
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 | 
			
		||||
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 | 
			
		||||
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 | 
			
		||||
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
			
		||||
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 | 
			
		||||
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 | 
			
		||||
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
			
		||||
 * SUCH DAMAGE.
 | 
			
		||||
 * 
 | 
			
		||||
 * The licence and distribution terms for any publically available version or
 | 
			
		||||
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 | 
			
		||||
 * copied and put under another distribution licence
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/bio.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
#include <openssl/ec.h>
 | 
			
		||||
#include <openssl/ecdsa.h>
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG	ecdsaparam_main
 | 
			
		||||
 | 
			
		||||
/* -inform arg	  	- input format - default PEM (DER or PEM)
 | 
			
		||||
 * -outform arg 	- output format - default PEM
 | 
			
		||||
 * -in arg		- input file  - default stdin
 | 
			
		||||
 * -out arg		- output file - default stdout
 | 
			
		||||
 * -noout
 | 
			
		||||
 * -text
 | 
			
		||||
 * -check               - validate the ec parameters
 | 
			
		||||
 * -C
 | 
			
		||||
 * -noout
 | 
			
		||||
 * -genkey		- generate a private public keypair based on the supplied curve
 | 
			
		||||
 * -named_curve		- use the curve oid instead of the parameters
 | 
			
		||||
 * -NIST_192		- use the NIST recommended curve parameters over a 192 bit prime field
 | 
			
		||||
 * -NIST_224		- use the NIST recommended curve parameters over a 224 bit prime field
 | 
			
		||||
 * -NIST_256		- use the NIST recommended curve parameters over a 256 bit prime field
 | 
			
		||||
 * -NIST_384		- use the NIST recommended curve parameters over a 384 bit prime field
 | 
			
		||||
 * -NIST_521		- use the NIST recommended curve parameters over a 521 bit prime field
 | 
			
		||||
 * -X9_62_192v1		- use the X9_62 192v1 example curve over a 192 bit prime field
 | 
			
		||||
 * -X9_62_192v2		- use the X9_62 192v2 example curve over a 192 bit prime field
 | 
			
		||||
 * -X9_62_192v3		- use the X9_62 192v3 example curve over a 192 bit prime field
 | 
			
		||||
 * -X9_62_239v1		- use the X9_62 239v1 example curve over a 239 bit prime field
 | 
			
		||||
 * -X9_62_239v2		- use the X9_62 239v2 example curve over a 239 bit prime field
 | 
			
		||||
 * -X9_62_239v3		- use the X9_62 239v3 example curve over a 239 bit prime field
 | 
			
		||||
 * -X9_62_256v1		- use the X9_62 239v1 example curve over a 256 bit prime field
 | 
			
		||||
 * -SECG_PRIME_112R1    - use the SECG 112r1 recommended curve over a 112 bit prime field
 | 
			
		||||
 * -SECG_PRIME_112R2    - use the SECG 112r2 recommended curve over a 112 bit prime field
 | 
			
		||||
 * -SECG_PRIME_128R1    - use the SECG 128r1 recommended curve over a 128 bit prime field
 | 
			
		||||
 * -SECG_PRIME_128R2    - use the SECG 128r2 recommended curve over a 128 bit prime field
 | 
			
		||||
 * -SECG_PRIME_160K1    - use the SECG 160k1 recommended curve over a 160 bit prime field
 | 
			
		||||
 * -SECG_PRIME_160R1    - use the SECG 160r1 recommended curve over a 160 bit prime field
 | 
			
		||||
 * -SECG_PRIME_160R2    - use the SECG 160r2 recommended curve over a 160 bit prime field
 | 
			
		||||
 * -SECG_PRIME_192K1    - use the SECG 192k1 recommended curve over a 192 bit prime field
 | 
			
		||||
 * -SECG_PRIME_192R1    - use the SECG 192r1 recommended curve over a 192 bit prime field
 | 
			
		||||
 * -SECG_PRIME_224K1    - use the SECG 224k1 recommended curve over a 224 bit prime field
 | 
			
		||||
 * -SECG_PRIME_224R1    - use the SECG 224r1 recommended curve over a 224 bit prime field
 | 
			
		||||
 * -SECG_PRIME_256K1    - use the SECG 256k1 recommended curve over a 256 bit prime field
 | 
			
		||||
 * -SECG_PRIME_256R1    - use the SECG 256r1 recommended curve over a 256 bit prime field
 | 
			
		||||
 * -SECG_PRIME_384R1    - use the SECG 384r1 recommended curve over a 384 bit prime field
 | 
			
		||||
 * -SECG_PRIME_521R1    - use the SECG 521r1 recommended curve over a 521 bit prime field
 | 
			
		||||
 * -WTLS_6              - use the WAP/WTLS recommended curve number 6 over a 112 bit field
 | 
			
		||||
 * -WTLS_8              - use the WAP/WTLS recommended curve number 8 over a 112 bit field
 | 
			
		||||
 * -WTLS_9              - use the WAP/WTLS recommended curve number 9 over a 160 bit field
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
	ENGINE 	*e = NULL;
 | 
			
		||||
	ECDSA 	*ecdsa = NULL;
 | 
			
		||||
	int 	i, badops = 0, text = 0;
 | 
			
		||||
	BIO 	*in = NULL, *out = NULL;
 | 
			
		||||
	int 	informat, outformat, noout = 0, C = 0, ret = 1;
 | 
			
		||||
	char 	*infile, *outfile, *prog, *inrand = NULL;
 | 
			
		||||
	int 	genkey = 0;
 | 
			
		||||
	int	check = 0;
 | 
			
		||||
	int 	need_rand = 0;
 | 
			
		||||
	char 	*engine=NULL;
 | 
			
		||||
	int	curve_type = EC_GROUP_NO_CURVE;
 | 
			
		||||
	int	named_curve = 0;
 | 
			
		||||
	BIGNUM	*tmp_1 = NULL, *tmp_2 = NULL, *tmp_3 = NULL, *tmp_4 = NULL, *tmp_5 = NULL,
 | 
			
		||||
		*tmp_6 = NULL, *tmp_7 = NULL;
 | 
			
		||||
	BN_CTX	*ctx = NULL;
 | 
			
		||||
	EC_POINT *point = NULL;
 | 
			
		||||
	unsigned char *data = 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;
 | 
			
		||||
 | 
			
		||||
	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, "-engine") == 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine = *(++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,"-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, "-named_curve") == 0)
 | 
			
		||||
			named_curve = 1;
 | 
			
		||||
		else if (strcmp(*argv, "-NIST_192") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_NIST_PRIME_192;
 | 
			
		||||
		else if (strcmp(*argv, "-NIST_224") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_NIST_PRIME_224;
 | 
			
		||||
		else if (strcmp(*argv, "-NIST_256") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_NIST_PRIME_256;
 | 
			
		||||
		else if (strcmp(*argv, "-NIST_384") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_NIST_PRIME_384;
 | 
			
		||||
		else if (strcmp(*argv, "-NIST_521") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_NIST_PRIME_521;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_192v1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_192V1;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_192v2") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_192V2;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_192v3") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_192V3;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_239v1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_239V1;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_239v2") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_239V2;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_239v3") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_239V3;
 | 
			
		||||
		else if (strcmp(*argv, "-X9_62_256v1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_X9_62_PRIME_256V1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_112R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_112R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_112R2") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_112R2;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_128R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_128R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_128R2") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_128R2;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_160K1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_160K1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_160R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_160R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_160R2") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_160R2;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_192K1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_192K1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_192R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_192R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_224K1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_224K1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_224R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_224R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_256K1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_256K1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_256R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_256R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_384R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_384R1;
 | 
			
		||||
		else if (strcmp(*argv, "-SECG_PRIME_521R1") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_SECG_PRIME_521R1;
 | 
			
		||||
		else if (strcmp(*argv, "-WTLS_6") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_WTLS_6;
 | 
			
		||||
		else if (strcmp(*argv, "-WTLS_8") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_WTLS_8;
 | 
			
		||||
		else if (strcmp(*argv, "-WTLS_9") == 0)
 | 
			
		||||
			curve_type = EC_GROUP_WTLS_9;
 | 
			
		||||
		else if (strcmp(*argv, "-noout") == 0)
 | 
			
		||||
			noout=1;
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"unknown option %s\n",*argv);
 | 
			
		||||
			badops=1;
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		argc--;
 | 
			
		||||
		argv++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (badops)
 | 
			
		||||
	{
 | 
			
		||||
bad:
 | 
			
		||||
		BIO_printf(bio_err,"%s [options] [bits] <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," -out arg           output file\n");
 | 
			
		||||
		BIO_printf(bio_err," -text              print as text\n");
 | 
			
		||||
		BIO_printf(bio_err," -C                 Output C code\n");
 | 
			
		||||
		BIO_printf(bio_err," -check             validate the ec parameters\n");
 | 
			
		||||
		BIO_printf(bio_err," -noout             no output\n");
 | 
			
		||||
		BIO_printf(bio_err," -rand              files to use for random number input\n");
 | 
			
		||||
		BIO_printf(bio_err," -engine e          use engine e, possibly a hardware device.\n");
 | 
			
		||||
		BIO_printf(bio_err," -named_curve       use the curve oid instead of the parameters\n");
 | 
			
		||||
		BIO_printf(bio_err," -NIST_192          use the NIST recommended curve parameters over a 192 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -NIST_224          use the NIST recommended curve parameters over a 224 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -NIST_256          use the NIST recommended curve parameters over a 256 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -NIST_384          use the NIST recommended curve parameters over a 384 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -NIST_521          use the NIST recommended curve parameters over a 521 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_192v1       use the X9_62 192v1 example curve over a 192 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_192v2       use the X9_62 192v2 example curve over a 192 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_192v3       use the X9_62 192v3 example curve over a 192 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_239v1       use the X9_62 239v1 example curve over a 239 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_239v2       use the X9_62 239v2 example curve over a 239 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_239v3       use the X9_62 239v3 example curve over a 239 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -X9_62_256v1       use the X9_62 239v1 example curve over a 256 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_112R1  use the SECG 112r1 recommended curve over a 112 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_112R2  use the SECG 112r2 recommended curve over a 112 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_128R1  use the SECG 128r1 recommended curve over a 128 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_128R2  use the SECG 128r2 recommended curve over a 128 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_160K1  use the SECG 160k1 recommended curve over a 160 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_160R1  use the SECG 160r1 recommended curve over a 160 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_160R2  use the SECG 160r2 recommended curve over a 160 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_192K1  use the SECG 192k1 recommended curve over a 192 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_192R1  use the SECG 192r1 recommended curve over a 192 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_224K1  use the SECG 224k1 recommended curve over a 224 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_224R1  use the SECG 224r1 recommended curve over a 224 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_256K1  use the SECG 256k1 recommended curve over a 256 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_256R1  use the SECG 256r1 recommended curve over a 256 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_384R1  use the SECG 384r1 recommended curve over a 384 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -SECG_PRIME_521R1  use the SECG 521r1 recommended curve over a 521 bit prime field\n");
 | 
			
		||||
		BIO_printf(bio_err," -WTLS_6            use the WAP/WTLS recommended curve number 6 over a 112 bit field\n");
 | 
			
		||||
		BIO_printf(bio_err," -WTLS_8            use the WAP/WTLS recommended curve number 8 over a 112 bit field\n");
 | 
			
		||||
		BIO_printf(bio_err," -WTLS_9            use the WAP/WTLS recommended curve number 9 over a 112 bit field\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 (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 (curve_type != EC_GROUP_NO_CURVE)
 | 
			
		||||
	{
 | 
			
		||||
		if ((ecdsa = ECDSA_new()) == NULL)
 | 
			
		||||
			goto end;
 | 
			
		||||
		ecdsa->group = EC_GROUP_new_by_name(curve_type);
 | 
			
		||||
		if (named_curve)
 | 
			
		||||
			ECDSA_set_parameter_flags(ecdsa, ECDSA_FLAG_NAMED_CURVE);
 | 
			
		||||
	}
 | 
			
		||||
	else if (informat == FORMAT_ASN1)
 | 
			
		||||
		ecdsa = d2i_ECDSAParameters_bio(in,NULL);
 | 
			
		||||
	else if (informat == FORMAT_PEM)
 | 
			
		||||
		ecdsa = PEM_read_bio_ECDSAParameters(in, NULL, NULL, NULL);
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "bad input format specified\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
	if (ecdsa == NULL)
 | 
			
		||||
	{
 | 
			
		||||
		BIO_printf(bio_err, "unable to load ECDSA parameters\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (text)
 | 
			
		||||
	{
 | 
			
		||||
		ECDSAParameters_print(out, ecdsa);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (check)
 | 
			
		||||
	{
 | 
			
		||||
		if (ecdsa == NULL)
 | 
			
		||||
			BIO_printf(bio_err, "no elliptic curve parameters\n");
 | 
			
		||||
		BIO_printf(bio_err, "checking elliptic curve parameters: ");
 | 
			
		||||
		if (!EC_GROUP_check(ecdsa->group, NULL))
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err, "failed\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
			BIO_printf(bio_err, "ok\n");
 | 
			
		||||
			
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	if (C)
 | 
			
		||||
	{	/* TODO: characteristic two */
 | 
			
		||||
		int 	l, len, bits_p;
 | 
			
		||||
		if ((tmp_1 = BN_new()) == NULL || (tmp_2 = BN_new()) == NULL ||
 | 
			
		||||
		    (tmp_3 = BN_new()) == NULL || (tmp_4 = BN_new()) == NULL ||
 | 
			
		||||
		    (tmp_5 = BN_new()) == NULL || (tmp_6 = BN_new()) == NULL ||
 | 
			
		||||
                    (tmp_7 = BN_new()) == NULL || (ctx = BN_CTX_new()) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
			perror("OPENSSL_malloc");
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		if (!EC_GROUP_get_curve_GFp(ecdsa->group, tmp_1, tmp_2, tmp_3, ctx))
 | 
			
		||||
			goto end;
 | 
			
		||||
		if ((point = EC_GROUP_get0_generator(ecdsa->group)) == NULL)
 | 
			
		||||
			goto end;
 | 
			
		||||
		if (!EC_POINT_get_affine_coordinates_GFp(ecdsa->group, point, tmp_4, tmp_5, ctx))
 | 
			
		||||
			goto end;
 | 
			
		||||
		if (!EC_GROUP_get_order(ecdsa->group, tmp_6, ctx))
 | 
			
		||||
			goto end;
 | 
			
		||||
		if (!EC_GROUP_get_cofactor(ecdsa->group, tmp_7, ctx))
 | 
			
		||||
			goto end;
 | 
			
		||||
		
 | 
			
		||||
		len    = BN_num_bytes(tmp_1);
 | 
			
		||||
		bits_p = BN_num_bits(tmp_1);
 | 
			
		||||
		data=(unsigned char *)OPENSSL_malloc(len+20);
 | 
			
		||||
		if (data == NULL)
 | 
			
		||||
		{
 | 
			
		||||
			perror("OPENSSL_malloc");
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		l = BN_bn2bin(tmp_1, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_p[]={", bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n\n");
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(tmp_2, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_a[]={",bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n");
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(tmp_3, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_b[]={", bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n\n");
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(tmp_4, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_x[]={", bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n");
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(tmp_5, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_y[]={", bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n");
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(tmp_6, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_o[]={", bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n");
 | 
			
		||||
 | 
			
		||||
		l = BN_bn2bin(tmp_7, data);
 | 
			
		||||
		printf("static unsigned char ecdsa%d_c[]={", bits_p);
 | 
			
		||||
		for (i=0; i<l; i++)
 | 
			
		||||
		{
 | 
			
		||||
			if ((i%12) == 0) printf("\n\t");
 | 
			
		||||
			printf("0x%02X,",data[i]);
 | 
			
		||||
		}
 | 
			
		||||
		printf("\n\t};\n\n");
 | 
			
		||||
 | 
			
		||||
		/* FIXME:
 | 
			
		||||
		 * generated code should check for errors
 | 
			
		||||
		 */
 | 
			
		||||
 | 
			
		||||
		printf("ECDSA *get_ecdsa%d(void)\n\t{\n",bits_p);
 | 
			
		||||
		printf("\tint ok=0;\n");
 | 
			
		||||
		printf("\tECDSA    *ecdsa=NULL;\n");
 | 
			
		||||
		printf("\tEC_POINT *point=NULL;\n");
 | 
			
		||||
		printf("\tBIGNUM   *tmp_1=NULL,*tmp_2=NULL,*tmp_3=NULL;\n\n");
 | 
			
		||||
		printf("\tif ((ecdsa=ECDSA_new()) == NULL)\n");
 | 
			
		||||
		printf("\t\treturn(NULL);\n\n");
 | 
			
		||||
		printf("\t/* generate EC_GROUP structure */\n");
 | 
			
		||||
		printf("\tif ((tmp_1 = BN_bin2bn(ecdsa%d_p, sizeof(ecdsa%d_p), NULL)) == NULL) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif ((tmp_2 = BN_bin2bn(ecdsa%d_a, sizeof(ecdsa%d_a), NULL)) == NULL) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif ((tmp_3 = BN_bin2bn(ecdsa%d_b, sizeof(ecdsa%d_b), NULL)) == NULL) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif ((ecdsa->group = EC_GROUP_new_curve_GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL) goto err;\n\n");
 | 
			
		||||
		printf("\t/* build generator */\n");
 | 
			
		||||
		printf("\tif (!BN_bin2bn(ecdsa%d_x, sizeof(ecdsa%d_x), tmp_1)) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif (!BN_bin2bn(ecdsa%d_y, sizeof(ecdsa%d_y), tmp_2)) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif ((point = EC_POINT_new(ecdsa->group)) == NULL) goto err;\n");
 | 
			
		||||
		printf("\tif (!EC_POINT_set_affine_coordinates_GFp(ecdsa->group, point, tmp_1, tmp_2, NULL)) goto err;\n");
 | 
			
		||||
		printf("\t/* set generator, order and cofactor */\n");
 | 
			
		||||
		printf("\tif (!BN_bin2bn(ecdsa%d_o, sizeof(ecdsa%d_o), tmp_1)) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif (!BN_bin2bn(ecdsa%d_c, sizeof(ecdsa%d_c), tmp_2)) goto err;\n", bits_p, bits_p);
 | 
			
		||||
		printf("\tif (!EC_GROUP_set_generator(ecdsa->group, point, tmp_1, tmp_2)) goto err;\n");
 | 
			
		||||
		printf("\n\tok=1;\n");
 | 
			
		||||
		printf("err:\n");
 | 
			
		||||
		printf("\tif (tmp_1) BN_free(tmp_1);\n");
 | 
			
		||||
		printf("\tif (tmp_2) BN_free(tmp_2);\n");
 | 
			
		||||
		printf("\tif (tmp_3) BN_free(tmp_3);\n");
 | 
			
		||||
		printf("\tif (point) EC_POINT_free(point);\n");
 | 
			
		||||
		printf("\tif (!ok)\n");
 | 
			
		||||
		printf("\t\t{\n");
 | 
			
		||||
		printf("\t\tECDSA_free(ecdsa);\n");
 | 
			
		||||
		printf("\t\tecdsa = NULL;\n");
 | 
			
		||||
		printf("\t\t}\n");
 | 
			
		||||
		printf("\treturn(ecdsa);\n\t}\n");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	if (!noout)
 | 
			
		||||
	{
 | 
			
		||||
		if (outformat == FORMAT_ASN1)
 | 
			
		||||
			i = i2d_ECDSAParameters_bio(out, ecdsa);
 | 
			
		||||
		else if (outformat == FORMAT_PEM)
 | 
			
		||||
			i = PEM_write_bio_ECDSAParameters(out, ecdsa);
 | 
			
		||||
		else	
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err,"bad output format specified for outfile\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		if (!i)
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err, "unable to write ECDSA parameters\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if (genkey)
 | 
			
		||||
	{
 | 
			
		||||
		ECDSA *ecdsakey;
 | 
			
		||||
 | 
			
		||||
		assert(need_rand);
 | 
			
		||||
		if ((ecdsakey = ECDSAParameters_dup(ecdsa)) == NULL) goto end;
 | 
			
		||||
		if (!ECDSA_generate_key(ecdsakey)) goto end;
 | 
			
		||||
		if (outformat == FORMAT_ASN1)
 | 
			
		||||
			i = i2d_ECDSAPrivateKey_bio(out, ecdsakey);
 | 
			
		||||
		else if (outformat == FORMAT_PEM)
 | 
			
		||||
			i = PEM_write_bio_ECDSAPrivateKey(out, ecdsakey, NULL, NULL, 0, NULL, NULL);
 | 
			
		||||
		else	
 | 
			
		||||
		{
 | 
			
		||||
			BIO_printf(bio_err, "bad output format specified for outfile\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
		ECDSA_free(ecdsakey);
 | 
			
		||||
	}
 | 
			
		||||
	if (need_rand)
 | 
			
		||||
		app_RAND_write_file(NULL, bio_err);
 | 
			
		||||
	ret=0;
 | 
			
		||||
end:
 | 
			
		||||
	if (in != NULL) 	BIO_free(in);
 | 
			
		||||
	if (out != NULL) 	BIO_free_all(out);
 | 
			
		||||
	if (ecdsa != NULL) 	ECDSA_free(ecdsa);
 | 
			
		||||
	if (tmp_1)		BN_free(tmp_1);
 | 
			
		||||
	if (tmp_2)		BN_free(tmp_2);
 | 
			
		||||
	if (tmp_3)		BN_free(tmp_3);
 | 
			
		||||
	if (tmp_3)		BN_free(tmp_4);
 | 
			
		||||
	if (tmp_3)		BN_free(tmp_5);
 | 
			
		||||
	if (tmp_3)		BN_free(tmp_6);
 | 
			
		||||
	if (tmp_3)		BN_free(tmp_7);
 | 
			
		||||
	if (ctx)		BN_CTX_free(ctx);
 | 
			
		||||
	if (data)		OPENSSL_free(data);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										75
									
								
								apps/enc.c
									
									
									
									
									
								
							
							
						
						
									
										75
									
								
								apps/enc.c
									
									
									
									
									
								
							@@ -78,7 +78,7 @@ int set_hex(char *in,unsigned char *out,int size);
 | 
			
		||||
#define BSIZE	(8*1024)
 | 
			
		||||
#define	PROG	enc_main
 | 
			
		||||
 | 
			
		||||
void show_ciphers(const OBJ_NAME *name,void *bio_)
 | 
			
		||||
static void show_ciphers(const OBJ_NAME *name,void *bio_)
 | 
			
		||||
	{
 | 
			
		||||
	BIO *bio=bio_;
 | 
			
		||||
	static int n;
 | 
			
		||||
@@ -100,9 +100,11 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	static const char magic[]="Salted__";
 | 
			
		||||
	char mbuf[8];	/* should be 1 smaller than magic */
 | 
			
		||||
	char mbuf[sizeof magic-1];
 | 
			
		||||
	char *strbuf=NULL;
 | 
			
		||||
	unsigned char *buff=NULL,*bufsize=NULL;
 | 
			
		||||
	int bsize=BSIZE,verbose=0;
 | 
			
		||||
@@ -112,6 +114,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	unsigned char salt[PKCS5_SALT_LEN];
 | 
			
		||||
	char *str=NULL, *passarg = NULL, *pass = NULL;
 | 
			
		||||
	char *hkey=NULL,*hiv=NULL,*hsalt = NULL;
 | 
			
		||||
	char *md=NULL;
 | 
			
		||||
	int enc=1,printkey=0,i,base64=0;
 | 
			
		||||
	int debug=0,olb64=0,nosalt=0;
 | 
			
		||||
	const EVP_CIPHER *cipher=NULL,*c;
 | 
			
		||||
@@ -119,7 +122,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
 | 
			
		||||
#define PROG_NAME_SIZE  39
 | 
			
		||||
	char pname[PROG_NAME_SIZE+1];
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	const EVP_MD *dgst=NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -131,7 +137,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
	/* first check the program name */
 | 
			
		||||
	program_name(argv[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
	program_name(argv[0],pname,sizeof pname);
 | 
			
		||||
	if (strcmp(pname,"base64") == 0)
 | 
			
		||||
		base64=1;
 | 
			
		||||
 | 
			
		||||
@@ -163,11 +169,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passarg= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if	(strcmp(*argv,"-d") == 0)
 | 
			
		||||
			enc=0;
 | 
			
		||||
		else if	(strcmp(*argv,"-p") == 0)
 | 
			
		||||
@@ -216,7 +224,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				goto bad;
 | 
			
		||||
				}
 | 
			
		||||
			buf[0]='\0';
 | 
			
		||||
			fgets(buf,128,infile);
 | 
			
		||||
			fgets(buf,sizeof buf,infile);
 | 
			
		||||
			fclose(infile);
 | 
			
		||||
			i=strlen(buf);
 | 
			
		||||
			if ((i > 0) &&
 | 
			
		||||
@@ -247,6 +255,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			hiv= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-md") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			md= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
		else if	((argv[0][0] == '-') &&
 | 
			
		||||
			((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL))
 | 
			
		||||
			{
 | 
			
		||||
@@ -265,12 +278,16 @@ bad:
 | 
			
		||||
			BIO_printf(bio_err,"%-14s encrypt\n","-e");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s decrypt\n","-d");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s base64 encode/decode, depending on encryption flag\n","-a/-base64");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s key is the next argument\n","-k");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s key is the first line of the file argument\n","-kfile");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s passphrase is the next argument\n","-k");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s passphrase is the first line of the file argument\n","-kfile");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s the next argument is the md to use to create a key\n","-md");
 | 
			
		||||
			BIO_printf(bio_err,"%-14s   from a passphrase.  One of md2, md5, sha or sha1\n","");
 | 
			
		||||
			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 buffer size\n","-bufsize <n>");
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
			BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
			BIO_printf(bio_err,"Cipher Types\n");
 | 
			
		||||
			OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
 | 
			
		||||
@@ -284,7 +301,23 @@ bad:
 | 
			
		||||
		argv++;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (md && (dgst=EVP_get_digestbyname(md)) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err,"%s is an unsupported message digest type\n",md);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (dgst == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		if (in_FIPS_mode)
 | 
			
		||||
			dgst = EVP_sha1();
 | 
			
		||||
		else
 | 
			
		||||
			dgst = EVP_md5();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (bufsize != NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -363,7 +396,7 @@ bad:
 | 
			
		||||
			{
 | 
			
		||||
			char buf[200];
 | 
			
		||||
 | 
			
		||||
			sprintf(buf,"enter %s %s password:",
 | 
			
		||||
			BIO_snprintf(buf,sizeof buf,"enter %s %s password:",
 | 
			
		||||
				     OBJ_nid2ln(EVP_CIPHER_nid(cipher)),
 | 
			
		||||
				     (enc)?"encryption":"decryption");
 | 
			
		||||
			strbuf[0]='\0';
 | 
			
		||||
@@ -442,12 +475,12 @@ bad:
 | 
			
		||||
			else {
 | 
			
		||||
				if(enc) {
 | 
			
		||||
					if(hsalt) {
 | 
			
		||||
						if(!set_hex(hsalt,salt,PKCS5_SALT_LEN)) {
 | 
			
		||||
						if(!set_hex(hsalt,salt,sizeof salt)) {
 | 
			
		||||
							BIO_printf(bio_err,
 | 
			
		||||
								"invalid hex salt value\n");
 | 
			
		||||
							goto end;
 | 
			
		||||
						}
 | 
			
		||||
					} else if (RAND_pseudo_bytes(salt, PKCS5_SALT_LEN) < 0)
 | 
			
		||||
					} else if (RAND_pseudo_bytes(salt, sizeof salt) < 0)
 | 
			
		||||
						goto end;
 | 
			
		||||
					/* If -P option then don't bother writing */
 | 
			
		||||
					if((printkey != 2)
 | 
			
		||||
@@ -455,14 +488,14 @@ bad:
 | 
			
		||||
							 sizeof magic-1) != sizeof magic-1
 | 
			
		||||
					       || BIO_write(wbio,
 | 
			
		||||
							    (char *)salt,
 | 
			
		||||
							    PKCS5_SALT_LEN) != PKCS5_SALT_LEN)) {
 | 
			
		||||
							    sizeof salt) != sizeof salt)) {
 | 
			
		||||
						BIO_printf(bio_err,"error writing output file\n");
 | 
			
		||||
						goto end;
 | 
			
		||||
					}
 | 
			
		||||
				} else if(BIO_read(rbio,mbuf,sizeof mbuf) != sizeof mbuf
 | 
			
		||||
					  || BIO_read(rbio,
 | 
			
		||||
						      (unsigned char *)salt,
 | 
			
		||||
				    PKCS5_SALT_LEN) != PKCS5_SALT_LEN) {
 | 
			
		||||
				    sizeof salt) != sizeof salt) {
 | 
			
		||||
					BIO_printf(bio_err,"error reading input file\n");
 | 
			
		||||
					goto end;
 | 
			
		||||
				} else if(memcmp(mbuf,magic,sizeof magic-1)) {
 | 
			
		||||
@@ -473,7 +506,7 @@ bad:
 | 
			
		||||
				sptr = salt;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			EVP_BytesToKey(cipher,EVP_md5(),sptr,
 | 
			
		||||
			EVP_BytesToKey(cipher,dgst,sptr,
 | 
			
		||||
				(unsigned char *)str,
 | 
			
		||||
				strlen(str),1,key,iv);
 | 
			
		||||
			/* zero the complete buffer or the string
 | 
			
		||||
@@ -481,9 +514,14 @@ bad:
 | 
			
		||||
			 * bug picked up by
 | 
			
		||||
			 * Larry J. Hughes Jr. <hughes@indiana.edu> */
 | 
			
		||||
			if (str == strbuf)
 | 
			
		||||
				memset(str,0,SIZE);
 | 
			
		||||
				OPENSSL_cleanse(str,SIZE);
 | 
			
		||||
			else
 | 
			
		||||
				memset(str,0,strlen(str));
 | 
			
		||||
				OPENSSL_cleanse(str,strlen(str));
 | 
			
		||||
			}
 | 
			
		||||
		if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"invalid hex iv value\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if ((hiv == NULL) && (str == NULL))
 | 
			
		||||
			{
 | 
			
		||||
@@ -493,11 +531,6 @@ bad:
 | 
			
		||||
			BIO_printf(bio_err, "iv undefined\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"invalid hex iv value\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if ((hkey != NULL) && !set_hex(hkey,key,sizeof key))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"invalid hex key value\n");
 | 
			
		||||
@@ -524,7 +557,7 @@ bad:
 | 
			
		||||
			if (!nosalt)
 | 
			
		||||
				{
 | 
			
		||||
				printf("salt=");
 | 
			
		||||
				for (i=0; i<PKCS5_SALT_LEN; i++)
 | 
			
		||||
				for (i=0; i<sizeof salt; i++)
 | 
			
		||||
					printf("%02X",salt[i]);
 | 
			
		||||
				printf("\n");
 | 
			
		||||
				}
 | 
			
		||||
@@ -586,7 +619,7 @@ end:
 | 
			
		||||
	if (b64 != NULL) BIO_free(b64);
 | 
			
		||||
	if(pass) OPENSSL_free(pass);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
int set_hex(char *in, unsigned char *out, int size)
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,8 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -120,8 +122,8 @@ static int append_buf(char **buf, const char *s, int *size, int step)
 | 
			
		||||
		return 0;
 | 
			
		||||
 | 
			
		||||
	if (**buf != '\0')
 | 
			
		||||
		strcat(*buf, ", ");
 | 
			
		||||
	strcat(*buf, s);
 | 
			
		||||
		BUF_strlcat(*buf, ", ", *size);
 | 
			
		||||
	BUF_strlcat(*buf, s, *size);
 | 
			
		||||
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
@@ -516,5 +518,12 @@ end:
 | 
			
		||||
	sk_pop_free(post_cmds, identity);
 | 
			
		||||
	if (bio_out != NULL) BIO_free_all(bio_out);
 | 
			
		||||
	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();
 | 
			
		||||
	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)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	DH *dh=NULL;
 | 
			
		||||
	int ret=1,num=DEFBITS;
 | 
			
		||||
	int g=2;
 | 
			
		||||
	char *outfile=NULL;
 | 
			
		||||
	char *inrand=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	BIO *out=NULL;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
@@ -115,11 +119,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			g=3; */
 | 
			
		||||
		else if (strcmp(*argv,"-5") == 0)
 | 
			
		||||
			g=5;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			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," -3        - use 3 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");
 | 
			
		||||
#endif
 | 
			
		||||
		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,"             the random number generator\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	out=BIO_new(BIO_s_file());
 | 
			
		||||
	if (out == NULL)
 | 
			
		||||
@@ -198,7 +208,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (dh != NULL) DH_free(dh);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
 | 
			
		||||
 
 | 
			
		||||
@@ -77,7 +77,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	DSA *dsa=NULL;
 | 
			
		||||
	int ret=1;
 | 
			
		||||
	char *outfile=NULL;
 | 
			
		||||
@@ -85,7 +87,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	char *passargout = NULL, *passout = NULL;
 | 
			
		||||
	BIO *out=NULL,*in=NULL;
 | 
			
		||||
	const EVP_CIPHER *enc=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -111,11 +115,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargout= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
@@ -167,7 +173,9 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
 | 
			
		||||
		BIO_printf(bio_err,"                 encrypt PEM output with cbc aes\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		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,"           - load the file (or the files in the directory) into\n");
 | 
			
		||||
		BIO_printf(bio_err,"             the random number generator\n");
 | 
			
		||||
@@ -176,7 +184,9 @@ bad:
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
 | 
			
		||||
		BIO_printf(bio_err, "Error getting password\n");
 | 
			
		||||
@@ -246,6 +256,6 @@ end:
 | 
			
		||||
	if (dsa != NULL) DSA_free(dsa);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -81,7 +81,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	int ret=1;
 | 
			
		||||
	RSA *rsa=NULL;
 | 
			
		||||
	int i,num=DEFBITS;
 | 
			
		||||
@@ -90,7 +92,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	unsigned long f4=RSA_F4;
 | 
			
		||||
	char *outfile=NULL;
 | 
			
		||||
	char *passargout = NULL, *passout = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	char *inrand=NULL;
 | 
			
		||||
	BIO *out=NULL;
 | 
			
		||||
 | 
			
		||||
@@ -122,11 +126,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			f4=3;
 | 
			
		||||
		else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
 | 
			
		||||
			f4=RSA_F4;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			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," -f4             use F4 (0x10001) 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");
 | 
			
		||||
#endif
 | 
			
		||||
		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,"                 the random number generator\n");
 | 
			
		||||
@@ -191,7 +199,9 @@ bad:
 | 
			
		||||
		goto err;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (outfile == NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -258,7 +268,7 @@ err:
 | 
			
		||||
	if (ret != 0)
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
 | 
			
		||||
 
 | 
			
		||||
@@ -62,9 +62,7 @@ $	COPY CA.COM WRK_SSLAEXE:CA.COM/LOG
 | 
			
		||||
$	SET FILE/PROT=W:RE WRK_SSLAEXE:CA.COM
 | 
			
		||||
$	COPY CA.COM WRK_SSLVEXE:CA.COM/LOG
 | 
			
		||||
$	SET FILE/PROT=W:RE WRK_SSLVEXE:CA.COM
 | 
			
		||||
$	COPY OPENSSL-VMS.CNF WRK_SSLROOT:[000000]OPENSSL-VMS.CNF/LOG
 | 
			
		||||
$	SET FILE/PROT=W:R WRK_SSLROOT:[000000]OPENSSL-VMS.CNF
 | 
			
		||||
$	COPY OPENSSL.CNF WRK_SSLROOT:[000000]OPENSSL.CNF/LOG
 | 
			
		||||
$	COPY OPENSSL-VMS.CNF WRK_SSLROOT:[000000]OPENSSL.CNF/LOG
 | 
			
		||||
$	SET FILE/PROT=W:R WRK_SSLROOT:[000000]OPENSSL.CNF
 | 
			
		||||
$	SET ON
 | 
			
		||||
$
 | 
			
		||||
 
 | 
			
		||||
@@ -15,22 +15,10 @@ $!
 | 
			
		||||
$!  It was written so it would try to determine what "C" compiler to
 | 
			
		||||
$!  use or you can specify which "C" compiler to use.
 | 
			
		||||
$!
 | 
			
		||||
$!  Specify RSAREF as P1 to compile with the RSAREF library instead of
 | 
			
		||||
$!  the regular one.  If you specify NORSAREF it will compile with the
 | 
			
		||||
$!  regular RSAREF routines.  (Note: If you are in the United States
 | 
			
		||||
$!  you MUST compile with RSAREF unless you have a license from RSA).
 | 
			
		||||
$!
 | 
			
		||||
$!  Note: The RSAREF libraries are NOT INCLUDED and you have to
 | 
			
		||||
$!        download it from "ftp://ftp.rsa.com/rsaref".  You have to
 | 
			
		||||
$!        get the ".tar-Z" file as the ".zip" file dosen't have the
 | 
			
		||||
$!        directory structure stored.  You have to extract the file
 | 
			
		||||
$!        into the [.RSAREF] directory under the root directory as that
 | 
			
		||||
$!        is where the scripts will look for the files.
 | 
			
		||||
$!
 | 
			
		||||
$!  Specify DEBUG or NODEBUG as P2 to compile with or without debugger
 | 
			
		||||
$!  Specify DEBUG or NODEBUG as P1 to compile with or without debugger
 | 
			
		||||
$!  information.
 | 
			
		||||
$!
 | 
			
		||||
$!  Specify which compiler at P3 to try to compile under.
 | 
			
		||||
$!  Specify which compiler at P2 to try to compile under.
 | 
			
		||||
$!
 | 
			
		||||
$!	   VAXC	 For VAX C.
 | 
			
		||||
$!	   DECC	 For DEC C.
 | 
			
		||||
@@ -39,24 +27,18 @@ $!
 | 
			
		||||
$!  If you don't speficy a compiler, it will try to determine which
 | 
			
		||||
$!  "C" compiler to use.
 | 
			
		||||
$!
 | 
			
		||||
$!  P4, if defined, sets a TCP/IP library to use, through one of the following
 | 
			
		||||
$!  P3, if defined, sets a TCP/IP library to use, through one of the following
 | 
			
		||||
$!  keywords:
 | 
			
		||||
$!
 | 
			
		||||
$!	UCX		for UCX
 | 
			
		||||
$!	SOCKETSHR	for SOCKETSHR+NETLIB
 | 
			
		||||
$!	TCPIP		for TCPIP (post UCX)
 | 
			
		||||
$!
 | 
			
		||||
$!  P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
 | 
			
		||||
$!  P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
 | 
			
		||||
$!
 | 
			
		||||
$!  P6, if defined, sets a choice of programs to compile.
 | 
			
		||||
$!  P5, if defined, sets a choice of programs to compile.
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! Define USER_CCFLAGS
 | 
			
		||||
$!
 | 
			
		||||
$ @[-]vms_build_info.com
 | 
			
		||||
$ WRITE SYS$OUTPUT " Using USER_CCFLAGS = ", USER_CCFLAGS
 | 
			
		||||
$!
 | 
			
		||||
$! Define A TCP/IP Library That We Will Need To Link To.
 | 
			
		||||
$! (That Is, If We Need To Link To One.)
 | 
			
		||||
$!
 | 
			
		||||
@@ -105,15 +87,11 @@ $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
 | 
			
		||||
$!
 | 
			
		||||
$! Define The CRYPTO Library.
 | 
			
		||||
$!
 | 
			
		||||
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO'build_bits'.OLB
 | 
			
		||||
$!
 | 
			
		||||
$! Define The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE'build_bits'.OLB
 | 
			
		||||
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
 | 
			
		||||
$!
 | 
			
		||||
$! Define The SSL Library.
 | 
			
		||||
$!
 | 
			
		||||
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL'build_bits'.OLB
 | 
			
		||||
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
 | 
			
		||||
$!
 | 
			
		||||
$! Define The OBJ Directory.
 | 
			
		||||
$!
 | 
			
		||||
@@ -132,23 +110,6 @@ $! End The OBJ Directory Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Define The LIS Directory.
 | 
			
		||||
$!
 | 
			
		||||
$ LIS_DIR := SYS$DISK:[-.'ARCH'.LIS.APPS]
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If The OBJ Directory Exists.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (F$PARSE(LIS_DIR).EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  It Dosen't Exist, So Create It.
 | 
			
		||||
$!
 | 
			
		||||
$   CREATE/DIRECTORY 'LIS_DIR'
 | 
			
		||||
$!
 | 
			
		||||
$! End The LIS Directory Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Define The EXE Directory.
 | 
			
		||||
$!
 | 
			
		||||
$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS]
 | 
			
		||||
@@ -179,15 +140,15 @@ $!
 | 
			
		||||
$ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
 | 
			
		||||
	      "CA;PKCS7;CRL2P7;CRL;"+-
 | 
			
		||||
	      "RSA;RSAUTL;DSA;DSAPARAM;"+-
 | 
			
		||||
	      "X509;GENRSA;GENDSA;TERM_SOCK;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;"+-
 | 
			
		||||
	      "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP"
 | 
			
		||||
	      "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP;PRIME"
 | 
			
		||||
$ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,-
 | 
			
		||||
	       CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,-
 | 
			
		||||
	       RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,-
 | 
			
		||||
	       X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,TERM_SOCK.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,-
 | 
			
		||||
	       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,PRIME.OBJ
 | 
			
		||||
$ TCPIP_PROGRAMS = ",,"
 | 
			
		||||
$ IF COMPILER .EQS. "VAXC" THEN -
 | 
			
		||||
     TCPIP_PROGRAMS = ",OPENSSL,"
 | 
			
		||||
@@ -205,7 +166,7 @@ $!     TCPIP_PROGRAMS = ",S_SERVER,S_CLIENT,SESS_ID,CIPHERS,S_TIME,"
 | 
			
		||||
$!
 | 
			
		||||
$! Setup exceptional compilations
 | 
			
		||||
$!
 | 
			
		||||
$ COMPILEWITH_CC2 = ",S_SOCKET,S_SERVER,S_CLIENT,"
 | 
			
		||||
$ COMPILEWITH_CC2 = ",S_SERVER,S_CLIENT,"
 | 
			
		||||
$!
 | 
			
		||||
$ PHASE := LIB
 | 
			
		||||
$!
 | 
			
		||||
@@ -258,10 +219,6 @@ $! Create The Object File Name.
 | 
			
		||||
$!
 | 
			
		||||
$ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ"
 | 
			
		||||
$!
 | 
			
		||||
$! Create The Listing File Name.
 | 
			
		||||
$!
 | 
			
		||||
$ LIST_FILE = LIS_DIR + FILE_NAME + ".LIS"
 | 
			
		||||
$!
 | 
			
		||||
$! Create The Executable File Name.
 | 
			
		||||
$!
 | 
			
		||||
$ EXE_FILE = EXE_DIR + FILE_NAME + ".EXE"
 | 
			
		||||
@@ -275,7 +232,7 @@ $!
 | 
			
		||||
$!  Tell The User That The File Dosen't Exist.
 | 
			
		||||
$!
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT F$MESSAGE("%X10018290") + ".  The File ",SOURCE_FILE," Dosen't Exist."
 | 
			
		||||
$   WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist."
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!  Exit The Build.
 | 
			
		||||
@@ -300,9 +257,9 @@ $!
 | 
			
		||||
$ ON ERROR THEN GOTO NEXT_FILE
 | 
			
		||||
$ IF COMPILEWITH_CC2 - FILE_NAME .NES. COMPILEWITH_CC2
 | 
			
		||||
$ THEN
 | 
			
		||||
$   CC2/OBJECT='OBJECT_FILE'/LIST='LIST_FILE'/MACHINE_CODE 'SOURCE_FILE'
 | 
			
		||||
$   CC2/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
 | 
			
		||||
$ ELSE
 | 
			
		||||
$   CC/OBJECT='OBJECT_FILE'/LIST='LIST_FILE'/MACHINE_CODE 'SOURCE_FILE'
 | 
			
		||||
$   CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$ ON WARNING THEN GOTO NEXT_FILE
 | 
			
		||||
@@ -320,52 +277,7 @@ $   WRITE SYS$OUTPUT FILE_NAME," needs a TCP/IP library.  Can't link.  Skipping.
 | 
			
		||||
$   GOTO NEXT_FILE
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (RSAREF.EQS."TRUE")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Link With A Specific TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (TCPIP_LIB.NES."")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Link With The RSAREF Library And A Specific TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$     LINK /'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' /MAP='MAP_FILE' /FULL/CROSS -
 | 
			
		||||
	  'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
          'SSL_LIB'/LIBRARY,-
 | 
			
		||||
	  'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
	  'RSAREF_LIB'/LIBRARY, -
 | 
			
		||||
          'TCPIP_LIB', -
 | 
			
		||||
	  'OPT_FILE'/OPTION, -
 | 
			
		||||
	  SYS$DISK:[-]SSL_IDENT.OPT/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!    Link With The RSAREF Library And NO TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$     LINK /'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' /MAP='MAP_FILE' /FULL/CROSS -
 | 
			
		||||
	  'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
          'SSL_LIB'/LIBRARY, -
 | 
			
		||||
	  'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
	  'RSAREF_LIB'/LIBRARY, -
 | 
			
		||||
          'OPT_FILE'/OPTION, -
 | 
			
		||||
	  SYS$DISK:[-]SSL_IDENT.OPT/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$!  End The TCP/IP Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Else...
 | 
			
		||||
$!
 | 
			
		||||
$ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!  Don't Link With The RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! Link The Program.
 | 
			
		||||
$! Check To See If We Are To Link With A Specific TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (TCPIP_LIB.NES."")
 | 
			
		||||
@@ -373,14 +285,10 @@ $   THEN
 | 
			
		||||
$!
 | 
			
		||||
$! Don't Link With The RSAREF Routines And TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$       LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' /MAP='MAP_FILE' /FULL/CROSS -
 | 
			
		||||
$   LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
            'SSL_LIB'/LIBRARY, -
 | 
			
		||||
	    'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
            'TCPIP_LIB', -
 | 
			
		||||
	    'OPT_FILE'/OPTION, -
 | 
			
		||||
	  SYS$DISK:[-]SSL_IDENT.OPT/OPTION
 | 
			
		||||
 | 
			
		||||
        'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
        'TCPIP_LIB','OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$! Else...
 | 
			
		||||
$!
 | 
			
		||||
@@ -388,22 +296,15 @@ $   ELSE
 | 
			
		||||
$!
 | 
			
		||||
$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
 | 
			
		||||
$!
 | 
			
		||||
$       LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' /MAP='MAP_FILE' /FULL/CROSS -
 | 
			
		||||
$   LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
 | 
			
		||||
	'OBJECT_FILE''EXTRA_OBJ', -
 | 
			
		||||
            'SSL_LIB'/LIBRARY, -
 | 
			
		||||
	    'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
            'OPT_FILE'/OPTION, -
 | 
			
		||||
	  SYS$DISK:[-]SSL_IDENT.OPT/OPTION
 | 
			
		||||
$!
 | 
			
		||||
        'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
 | 
			
		||||
        'OPT_FILE'/OPTION
 | 
			
		||||
$!
 | 
			
		||||
$! End The TCP/IP Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The RSAREF Link Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Go Back And Do It Again.
 | 
			
		||||
$!
 | 
			
		||||
$ GOTO NEXT_FILE
 | 
			
		||||
@@ -531,7 +432,6 @@ $!  End The Option File Search.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! End The DEC C Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
@@ -568,32 +468,6 @@ $! End The Crypto Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! See If We Need The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (RSAREF.EQS."TRUE")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Look For The Library LIBRSAGLUE.OLB.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (F$SEARCH(RSAREF_LIB).EQS."")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell The User We Can't Find The LIBRSAGLUE.OLB Library.
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"."
 | 
			
		||||
$     WRITE SYS$OUTPUT "We Can't Link Without It."
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!    Since We Can't Link Without It, Exit.
 | 
			
		||||
$!
 | 
			
		||||
$     EXIT
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The RSAREF Library Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Look For The Library LIBSSL.OLB.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (F$SEARCH(SSL_LIB).EQS."")
 | 
			
		||||
@@ -624,87 +498,10 @@ $ CHECK_OPTIONS:
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If P1 Is Blank.
 | 
			
		||||
$!
 | 
			
		||||
$ P1 = "NORSAREF"
 | 
			
		||||
$ IF (P1.EQS."NORSAREF")
 | 
			
		||||
$ IF (P1.EQS."NODEBUG")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!   P1 Is NORSAREF, So Compile With The Regular RSA Libraries.
 | 
			
		||||
$!
 | 
			
		||||
$    RSAREF = "FALSE"
 | 
			
		||||
$!
 | 
			
		||||
$! Else...
 | 
			
		||||
$!
 | 
			
		||||
$ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Use The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P1.EQS."RSAREF")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Check To Make Sure We Have The RSAREF Source Code Directory.
 | 
			
		||||
$!
 | 
			
		||||
$     IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."")
 | 
			
		||||
$     THEN
 | 
			
		||||
$!
 | 
			
		||||
$!      We Don't Have The RSAREF Souce Code Directory, So Tell The
 | 
			
		||||
$!      User This.
 | 
			
		||||
$!
 | 
			
		||||
$       WRITE SYS$OUTPUT ""
 | 
			
		||||
$       WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code."
 | 
			
		||||
$       WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'.  You have to"
 | 
			
		||||
$       WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the"
 | 
			
		||||
$       WRITE SYS$OUTPUT "directory structure stored.  You have to extract the file"
 | 
			
		||||
$       WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory"
 | 
			
		||||
$       WRITE SYS$OUTPUT "as that is where the scripts will look for the files."
 | 
			
		||||
$       WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!      Time To Exit.
 | 
			
		||||
$!
 | 
			
		||||
$       EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!    Else...
 | 
			
		||||
$!
 | 
			
		||||
$     ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!      Compile Using The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$       RSAREF = "TRUE"
 | 
			
		||||
$!
 | 
			
		||||
$!    End The RSAREF Soure Directory Check.
 | 
			
		||||
$!
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE 
 | 
			
		||||
$!
 | 
			
		||||
$!    They Entered An Invalid Option..
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "The Option ",P1," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "     RSAREF   :  Compile With The RSAREF Library."
 | 
			
		||||
$     WRITE SYS$OUTPUT "     NORSAREF :  Compile With The Regular RSA Library."
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$!
 | 
			
		||||
$!    Time To EXIT.
 | 
			
		||||
$!
 | 
			
		||||
$     EXIT
 | 
			
		||||
$!
 | 
			
		||||
$!  End The Valid Arguement Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End P1 Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If P2 Is Blank.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P2.EQS."NODEBUG")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!   P2 Is NODEBUG, So Compile Without Debugger Information.
 | 
			
		||||
$!   P1 Is NODEBUG, So Compile Without Debugger Information.
 | 
			
		||||
$!
 | 
			
		||||
$    DEBUGGER  = "NODEBUG"
 | 
			
		||||
$    TRACEBACK = "NOTRACEBACK" 
 | 
			
		||||
@@ -719,7 +516,7 @@ $ ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Compile With Debugger Information.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P2.EQS."DEBUG")
 | 
			
		||||
$   IF (P1.EQS."DEBUG")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Compile With Debugger Information.
 | 
			
		||||
@@ -735,7 +532,7 @@ $!
 | 
			
		||||
$!    Tell The User Entered An Invalid Option..
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "The Option ",P2," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$     WRITE SYS$OUTPUT "The Option ",P1," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$     WRITE SYS$OUTPUT ""
 | 
			
		||||
$     WRITE SYS$OUTPUT "    DEBUG    :  Compile With The Debugger Information."
 | 
			
		||||
$     WRITE SYS$OUTPUT "    NODEBUG  :  Compile Without The Debugger Information."
 | 
			
		||||
@@ -749,13 +546,13 @@ $!  End The Valid Arguement Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The P2 Check.
 | 
			
		||||
$! End The P1 Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If P3 Is Blank.
 | 
			
		||||
$! Check To See If P2 Is Blank.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P3.EQS."")
 | 
			
		||||
$ IF (P2.EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  O.K., The User Didn't Specify A Compiler, Let's Try To
 | 
			
		||||
@@ -768,7 +565,7 @@ $   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like GNUC, Set To Use GNUC.
 | 
			
		||||
$!
 | 
			
		||||
$     P3 = "GNUC"
 | 
			
		||||
$     P2 = "GNUC"
 | 
			
		||||
$!
 | 
			
		||||
$!  Else...
 | 
			
		||||
$!
 | 
			
		||||
@@ -781,7 +578,7 @@ $     THEN
 | 
			
		||||
$!
 | 
			
		||||
$!      Looks Like DECC, Set To Use DECC.
 | 
			
		||||
$!
 | 
			
		||||
$       P3 = "DECC"
 | 
			
		||||
$       P2 = "DECC"
 | 
			
		||||
$!
 | 
			
		||||
$!    Else...
 | 
			
		||||
$!
 | 
			
		||||
@@ -789,7 +586,7 @@ $     ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!      Looks Like VAXC, Set To Use VAXC.
 | 
			
		||||
$!
 | 
			
		||||
$       P3 = "VAXC"
 | 
			
		||||
$       P2 = "VAXC"
 | 
			
		||||
$!
 | 
			
		||||
$!    End The VAXC Compiler Check.
 | 
			
		||||
$!
 | 
			
		||||
@@ -803,9 +600,9 @@ $!  End The Compiler Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If We Have A Option For P4.
 | 
			
		||||
$! Check To See If We Have A Option For P3.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P4.EQS."")
 | 
			
		||||
$ IF (P3.EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Find out what socket library we have available
 | 
			
		||||
@@ -815,7 +612,7 @@ $   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    We have SOCKETSHR, and it is my opinion that it's the best to use.
 | 
			
		||||
$!
 | 
			
		||||
$     P4 = "SOCKETSHR"
 | 
			
		||||
$     P3 = "SOCKETSHR"
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell the user
 | 
			
		||||
$!
 | 
			
		||||
@@ -835,7 +632,7 @@ $     THEN
 | 
			
		||||
$!
 | 
			
		||||
$!	Last resort: a UCX or UCX-compatible library
 | 
			
		||||
$!
 | 
			
		||||
$	P4 = "UCX"
 | 
			
		||||
$	P3 = "UCX"
 | 
			
		||||
$!
 | 
			
		||||
$!      Tell the user
 | 
			
		||||
$!
 | 
			
		||||
@@ -859,12 +656,12 @@ $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If The User Entered A Valid Paramter.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
 | 
			
		||||
$ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If The User Wanted DECC.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P3.EQS."DECC")
 | 
			
		||||
$   IF (P2.EQS."DECC")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like DECC, Set To Use DECC.
 | 
			
		||||
@@ -881,12 +678,12 @@ $     CC = "CC"
 | 
			
		||||
$     IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
 | 
			
		||||
	 THEN CC = "CC/DECC"
 | 
			
		||||
$     CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
 | 
			
		||||
           "/PREFIX=ALL" + -
 | 
			
		||||
	   "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS
 | 
			
		||||
           "/NOLIST/PREFIX=ALL" + -
 | 
			
		||||
	   "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS
 | 
			
		||||
$!
 | 
			
		||||
$!    Define The Linker Options File Name.
 | 
			
		||||
$!
 | 
			
		||||
$     OPT_FILE = "SYS$DISK:[]''arch'_DECC_OPTIONS.OPT"
 | 
			
		||||
$     OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
 | 
			
		||||
$!
 | 
			
		||||
$!  End DECC Check.
 | 
			
		||||
$!
 | 
			
		||||
@@ -894,7 +691,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Use VAXC.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P3.EQS."VAXC")
 | 
			
		||||
$   IF (P2.EQS."VAXC")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like VAXC, Set To Use VAXC.
 | 
			
		||||
@@ -913,8 +710,8 @@ $	WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
 | 
			
		||||
$	EXIT
 | 
			
		||||
$     ENDIF
 | 
			
		||||
$     IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
 | 
			
		||||
$     CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'" + -
 | 
			
		||||
	   "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS
 | 
			
		||||
$     CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
 | 
			
		||||
	   "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS
 | 
			
		||||
$     CCDEFS = CCDEFS + ",""VAXC"""
 | 
			
		||||
$!
 | 
			
		||||
$!    Define <sys> As SYS$COMMON:[SYSLIB]
 | 
			
		||||
@@ -923,7 +720,7 @@ $     DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
 | 
			
		||||
$!
 | 
			
		||||
$!    Define The Linker Options File Name.
 | 
			
		||||
$!
 | 
			
		||||
$     OPT_FILE = "SYS$DISK:[]''arch'_VAXC_OPTIONS.OPT"
 | 
			
		||||
$     OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
 | 
			
		||||
$!
 | 
			
		||||
$!  End VAXC Check
 | 
			
		||||
$!
 | 
			
		||||
@@ -931,7 +728,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Use GNU C.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (P3.EQS."GNUC")
 | 
			
		||||
$   IF (P2.EQS."GNUC")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Looks Like GNUC, Set To Use GNUC.
 | 
			
		||||
@@ -945,12 +742,12 @@ $!
 | 
			
		||||
$!    Use GNU C...
 | 
			
		||||
$!
 | 
			
		||||
$     IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC
 | 
			
		||||
$     CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'" + -
 | 
			
		||||
	   "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS
 | 
			
		||||
$     CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
 | 
			
		||||
	   "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS
 | 
			
		||||
$!
 | 
			
		||||
$!    Define The Linker Options File Name.
 | 
			
		||||
$!
 | 
			
		||||
$     OPT_FILE = "SYS$DISK:[]''arch'_GNUC_OPTIONS.OPT"
 | 
			
		||||
$     OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
 | 
			
		||||
$!
 | 
			
		||||
$!  End The GNU C Check.
 | 
			
		||||
$!
 | 
			
		||||
@@ -960,31 +757,6 @@ $!  Set up default defines
 | 
			
		||||
$!
 | 
			
		||||
$   CCDEFS = """FLAT_INC=1""," + CCDEFS
 | 
			
		||||
$!
 | 
			
		||||
$!  Check To See If We Are To Compile With RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$   IF (RSAREF.EQS."TRUE")
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Compile With RSAREF.
 | 
			
		||||
$!
 | 
			
		||||
$     CCDEFS = CCDEFS + ",""RSAref=1"""
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell The User This.
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT "Compiling With RSAREF Routines."
 | 
			
		||||
$!
 | 
			
		||||
$!    Else, We Don't Care.  Compile Without The RSAREF Library.
 | 
			
		||||
$!
 | 
			
		||||
$   ELSE
 | 
			
		||||
$!
 | 
			
		||||
$!    Tell The User We Are Compile Without The RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$     WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines.
 | 
			
		||||
$!
 | 
			
		||||
$!  End The RSAREF Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Else The User Entered An Invalid Arguement.
 | 
			
		||||
$!
 | 
			
		||||
$ ELSE
 | 
			
		||||
@@ -992,7 +764,7 @@ $!
 | 
			
		||||
$!  Tell The User We Don't Know What They Want.
 | 
			
		||||
$!
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P3," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P2," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "    VAXC  :  To Compile With VAX C."
 | 
			
		||||
$   WRITE SYS$OUTPUT "    DECC  :  To Compile With DEC C."
 | 
			
		||||
@@ -1006,12 +778,13 @@ $ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Time to check the contents, and to make sure we get the correct library.
 | 
			
		||||
$!
 | 
			
		||||
$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE"
 | 
			
		||||
$ IF P3.EQS."SOCKETSHR" .OR. P3.EQS."MULTINET" .OR. P3.EQS."UCX" -
 | 
			
		||||
     .OR. P3.EQS."TCPIP" .OR. P3.EQS."NONE"
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if SOCKETSHR was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."SOCKETSHR"
 | 
			
		||||
$   IF P3.EQS."SOCKETSHR"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use SOCKETSHR
 | 
			
		||||
@@ -1024,12 +797,12 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if MULTINET was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."MULTINET"
 | 
			
		||||
$   IF P3.EQS."MULTINET"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use UCX emulation.
 | 
			
		||||
$!
 | 
			
		||||
$     P4 = "UCX"
 | 
			
		||||
$     P3 = "UCX"
 | 
			
		||||
$!
 | 
			
		||||
$!    Done with MULTINET
 | 
			
		||||
$!
 | 
			
		||||
@@ -1037,7 +810,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if UCX was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."UCX"
 | 
			
		||||
$   IF P3.EQS."UCX"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use UCX.
 | 
			
		||||
@@ -1057,7 +830,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if TCPIP (post UCX) was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."TCPIP"
 | 
			
		||||
$   IF P3.EQS."TCPIP"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Set the library to use TCPIP.
 | 
			
		||||
@@ -1070,7 +843,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Check to see if NONE was chosen
 | 
			
		||||
$!
 | 
			
		||||
$   IF P4.EQS."NONE"
 | 
			
		||||
$   IF P3.EQS."NONE"
 | 
			
		||||
$   THEN
 | 
			
		||||
$!
 | 
			
		||||
$!    Do not use TCPIP.
 | 
			
		||||
@@ -1083,7 +856,7 @@ $   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Add TCP/IP type to CC definitions.
 | 
			
		||||
$!
 | 
			
		||||
$   CCDEFS = CCDEFS + ",TCPIP_TYPE_''P4'"
 | 
			
		||||
$   CCDEFS = CCDEFS + ",TCPIP_TYPE_''P3'"
 | 
			
		||||
$!
 | 
			
		||||
$!  Print info
 | 
			
		||||
$!
 | 
			
		||||
@@ -1096,7 +869,7 @@ $!
 | 
			
		||||
$!  Tell The User We Don't Know What They Want.
 | 
			
		||||
$!
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P4," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT "The Option ",P3," Is Invalid.  The Valid Options Are:"
 | 
			
		||||
$   WRITE SYS$OUTPUT ""
 | 
			
		||||
$   WRITE SYS$OUTPUT "    SOCKETSHR  :  To link with SOCKETSHR TCP/IP library."
 | 
			
		||||
$   WRITE SYS$OUTPUT "    UCX        :  To link with UCX TCP/IP library."
 | 
			
		||||
@@ -1127,7 +900,7 @@ $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
 | 
			
		||||
$!
 | 
			
		||||
$! Show user the result
 | 
			
		||||
$!
 | 
			
		||||
$ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
 | 
			
		||||
$ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC
 | 
			
		||||
$!
 | 
			
		||||
$! Special Threads For OpenVMS v7.1 Or Later
 | 
			
		||||
$!
 | 
			
		||||
@@ -1135,9 +908,9 @@ $! Written By:  Richard Levitte
 | 
			
		||||
$!              richard@levitte.org
 | 
			
		||||
$!
 | 
			
		||||
$!
 | 
			
		||||
$! Check To See If We Have A Option For P5.
 | 
			
		||||
$! Check To See If We Have A Option For P4.
 | 
			
		||||
$!
 | 
			
		||||
$ IF (P5.EQS."")
 | 
			
		||||
$ IF (P4.EQS."")
 | 
			
		||||
$ THEN
 | 
			
		||||
$!
 | 
			
		||||
$!  Get The Version Of VMS We Are Using.
 | 
			
		||||
@@ -1159,15 +932,15 @@ $!  End The VMS Version Check.
 | 
			
		||||
$!
 | 
			
		||||
$   ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! End The P5 Check.
 | 
			
		||||
$! End The P4 Check.
 | 
			
		||||
$!
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$! Check if the user wanted to compile just a subset of all the programs.
 | 
			
		||||
$!
 | 
			
		||||
$ IF P6 .NES. ""
 | 
			
		||||
$ IF P5 .NES. ""
 | 
			
		||||
$ THEN
 | 
			
		||||
$   PROGRAMS = P6
 | 
			
		||||
$   PROGRAMS = P5
 | 
			
		||||
$ ENDIF
 | 
			
		||||
$!
 | 
			
		||||
$!  Time To RETURN...
 | 
			
		||||
 
 | 
			
		||||
@@ -58,9 +58,9 @@
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG nseq_main
 | 
			
		||||
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		BIO_printf (bio_err, "-in file  input file\n");
 | 
			
		||||
		BIO_printf (bio_err, "-out file output file\n");
 | 
			
		||||
		BIO_printf (bio_err, "-toseq    output NS Sequence file\n");
 | 
			
		||||
		EXIT(1);
 | 
			
		||||
		OPENSSL_EXIT(1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (infile) {
 | 
			
		||||
@@ -162,6 +162,6 @@ end:
 | 
			
		||||
	BIO_free_all(out);
 | 
			
		||||
	NETSCAPE_CERT_SEQUENCE_free(seq);
 | 
			
		||||
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										112
									
								
								apps/ocsp.c
									
									
									
									
									
								
							
							
						
						
									
										112
									
								
								apps/ocsp.c
									
									
									
									
									
								
							@@ -55,31 +55,19 @@
 | 
			
		||||
 * Hudson (tjh@cryptsoft.com).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifndef OPENSSL_NO_OCSP
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/ocsp.h>
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/ssl.h>
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
 | 
			
		||||
/* Maximum leeway in validity period: default 5 minutes */
 | 
			
		||||
#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,
 | 
			
		||||
				STACK_OF(OCSP_CERTID) *ids);
 | 
			
		||||
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,
 | 
			
		||||
				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,
 | 
			
		||||
			STACK_OF(X509) *rother, unsigned long flags,
 | 
			
		||||
			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 int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port);
 | 
			
		||||
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 badarg = 0;
 | 
			
		||||
	int i;
 | 
			
		||||
	int ignore_err = 0;
 | 
			
		||||
	STACK *reqnames = NULL;
 | 
			
		||||
	STACK_OF(OCSP_CERTID) *ids = NULL;
 | 
			
		||||
 | 
			
		||||
	X509 *rca_cert = NULL;
 | 
			
		||||
	char *ridx_filename = NULL;
 | 
			
		||||
	char *rca_filename = NULL;
 | 
			
		||||
	TXT_DB *rdb = NULL;
 | 
			
		||||
	CA_DB *rdb = NULL;
 | 
			
		||||
	int nmin = 0, ndays = -1;
 | 
			
		||||
 | 
			
		||||
	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 if (!strcmp(*args, "-ignore_err"))
 | 
			
		||||
			ignore_err = 1;
 | 
			
		||||
		else if (!strcmp(*args, "-noverify"))
 | 
			
		||||
			noverify = 1;
 | 
			
		||||
		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, "-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, "-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, "-req_text          print text form of request\n");
 | 
			
		||||
		BIO_printf (bio_err, "-resp_text         print text form of response\n");
 | 
			
		||||
@@ -543,18 +534,18 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		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, "-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, "-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_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, "-port num		 port to run responder on\n");
 | 
			
		||||
		BIO_printf (bio_err, "-index file	 certificate status index file\n");
 | 
			
		||||
		BIO_printf (bio_err, "-CA file		 CA certificate\n");
 | 
			
		||||
		BIO_printf (bio_err, "-rsigner file	 responder certificate to sign requests with\n");
 | 
			
		||||
		BIO_printf (bio_err, "-rkey file	 responder key to sign requests with\n");
 | 
			
		||||
		BIO_printf (bio_err, "-rsigner file	 responder certificate to sign responses with\n");
 | 
			
		||||
		BIO_printf (bio_err, "-rkey file	 responder key to sign responses with\n");
 | 
			
		||||
		BIO_printf (bio_err, "-rother file	 other certificates to include in response\n");
 | 
			
		||||
		BIO_printf (bio_err, "-resp_no_certs     don't include any certificates in response\n");
 | 
			
		||||
		BIO_printf (bio_err, "-nmin n	 	 number of minutes before next update\n");
 | 
			
		||||
@@ -613,11 +604,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			NULL, e, "CA certificate");
 | 
			
		||||
		if (rcertfile)
 | 
			
		||||
			{
 | 
			
		||||
			rother = load_certs(bio_err, sign_certfile, FORMAT_PEM,
 | 
			
		||||
			rother = load_certs(bio_err, rcertfile, FORMAT_PEM,
 | 
			
		||||
				NULL, e, "responder other certificates");
 | 
			
		||||
			if (!sign_other) goto end;
 | 
			
		||||
			if (!rother) goto end;
 | 
			
		||||
			}
 | 
			
		||||
		rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, NULL, NULL,
 | 
			
		||||
		rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, 0, NULL, NULL,
 | 
			
		||||
			"responder private key");
 | 
			
		||||
		if (!rkey)
 | 
			
		||||
			goto end;
 | 
			
		||||
@@ -663,7 +654,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				NULL, e, "signer certificates");
 | 
			
		||||
			if (!sign_other) goto end;
 | 
			
		||||
			}
 | 
			
		||||
		key = load_key(bio_err, keyfile, FORMAT_PEM, NULL, NULL,
 | 
			
		||||
		key = load_key(bio_err, keyfile, FORMAT_PEM, 0, NULL, NULL,
 | 
			
		||||
			"signer private key");
 | 
			
		||||
		if (!key)
 | 
			
		||||
			goto end;
 | 
			
		||||
@@ -676,6 +667,18 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
	if (req_text && req) OCSP_REQUEST_print(out, req, 0);
 | 
			
		||||
 | 
			
		||||
	if (reqout)
 | 
			
		||||
		{
 | 
			
		||||
		derbio = BIO_new_file(reqout, "wb");
 | 
			
		||||
		if(!derbio)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error opening file %s\n", reqout);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		i2d_OCSP_REQUEST_bio(derbio, req);
 | 
			
		||||
		BIO_free(derbio);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (ridx_filename && (!rkey || !rsigner || !rca_cert))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "Need a responder certificate, key and CA for this operation!\n");
 | 
			
		||||
@@ -684,22 +687,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
	if (ridx_filename && !rdb)
 | 
			
		||||
		{
 | 
			
		||||
		BIO *db_bio = NULL;
 | 
			
		||||
		db_bio = BIO_new_file(ridx_filename, "r");
 | 
			
		||||
		if (!db_bio)
 | 
			
		||||
			{
 | 
			
		||||
			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;
 | 
			
		||||
		rdb = load_index(ridx_filename, NULL);
 | 
			
		||||
		if (!rdb) goto end;
 | 
			
		||||
		if (!index_index(rdb)) goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (rdb)
 | 
			
		||||
@@ -710,7 +700,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		}
 | 
			
		||||
	else if (host)
 | 
			
		||||
		{
 | 
			
		||||
#ifndef OPENSSL_NO_SOCK
 | 
			
		||||
		cbio = BIO_new_connect(host);
 | 
			
		||||
#else
 | 
			
		||||
		BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
#endif
 | 
			
		||||
		if (!cbio)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error creating connect BIO\n");
 | 
			
		||||
@@ -720,7 +715,16 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		if (use_ssl == 1)
 | 
			
		||||
			{
 | 
			
		||||
			BIO *sbio;
 | 
			
		||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
			ctx = SSL_CTX_new(SSLv23_client_method());
 | 
			
		||||
#elif !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
			ctx = SSL_CTX_new(SSLv3_client_method());
 | 
			
		||||
#elif !defined(OPENSSL_NO_SSL2)
 | 
			
		||||
			ctx = SSL_CTX_new(SSLv2_client_method());
 | 
			
		||||
#else
 | 
			
		||||
			BIO_printf(bio_err, "SSL is disabled\n");
 | 
			
		||||
			goto end;
 | 
			
		||||
#endif
 | 
			
		||||
			SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
 | 
			
		||||
			sbio = BIO_new_ssl(ctx, 1);
 | 
			
		||||
			cbio = BIO_push(sbio, cbio);
 | 
			
		||||
@@ -782,6 +786,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(out, "Responder Error: %s (%ld)\n",
 | 
			
		||||
				OCSP_response_status_str(i), i);
 | 
			
		||||
		if (ignore_err)
 | 
			
		||||
			goto redo_accept;
 | 
			
		||||
		ret = 0;
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
@@ -809,6 +815,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
	if (!store)
 | 
			
		||||
		store = setup_verify(bio_err, CAfile, CApath);
 | 
			
		||||
	if (!store)
 | 
			
		||||
		goto end;
 | 
			
		||||
	if (verify_certfile)
 | 
			
		||||
		{
 | 
			
		||||
		verify_other = load_certs(bio_err, verify_certfile, FORMAT_PEM,
 | 
			
		||||
@@ -865,7 +873,7 @@ end:
 | 
			
		||||
	X509_free(cert);
 | 
			
		||||
	X509_free(rsigner);
 | 
			
		||||
	X509_free(rca_cert);
 | 
			
		||||
	TXT_DB_free(rdb);
 | 
			
		||||
	free_index(rdb);
 | 
			
		||||
	BIO_free_all(cbio);
 | 
			
		||||
	BIO_free_all(acbio);
 | 
			
		||||
	BIO_free(out);
 | 
			
		||||
@@ -885,7 +893,7 @@ end:
 | 
			
		||||
		SSL_CTX_free(ctx);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
 | 
			
		||||
@@ -1007,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,
 | 
			
		||||
			STACK_OF(X509) *rother, unsigned long flags,
 | 
			
		||||
			int nmin, int ndays)
 | 
			
		||||
@@ -1099,17 +1107,20 @@ 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;
 | 
			
		||||
	BIGNUM *bn = NULL;
 | 
			
		||||
	char *itmp, *row[DB_NUMBER],**rrow;
 | 
			
		||||
	for (i = 0; i < DB_NUMBER; i++) row[i] = NULL;
 | 
			
		||||
	bn = ASN1_INTEGER_to_BN(ser,NULL);
 | 
			
		||||
	if (BN_is_zero(bn))
 | 
			
		||||
		itmp = BUF_strdup("00");
 | 
			
		||||
	else
 | 
			
		||||
		itmp = BN_bn2hex(bn);
 | 
			
		||||
	row[DB_serial] = itmp;
 | 
			
		||||
	BN_free(bn);
 | 
			
		||||
	rrow=TXT_DB_get_by_index(db,DB_serial,row);
 | 
			
		||||
	rrow=TXT_DB_get_by_index(db->db,DB_serial,row);
 | 
			
		||||
	OPENSSL_free(itmp);
 | 
			
		||||
	return rrow;
 | 
			
		||||
	}
 | 
			
		||||
@@ -1122,7 +1133,11 @@ static BIO *init_responder(char *port)
 | 
			
		||||
	bufbio = BIO_new(BIO_f_buffer());
 | 
			
		||||
	if (!bufbio) 
 | 
			
		||||
		goto err;
 | 
			
		||||
#ifndef OPENSSL_NO_SOCK
 | 
			
		||||
	acbio = BIO_new_accept(port);
 | 
			
		||||
#else
 | 
			
		||||
	BIO_printf(bio_err, "Error setting up accept BIO - sockets not supported.\n");
 | 
			
		||||
#endif
 | 
			
		||||
	if (!acbio)
 | 
			
		||||
		goto err;
 | 
			
		||||
	BIO_set_accept_bios(acbio, bufbio);
 | 
			
		||||
@@ -1162,7 +1177,7 @@ static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port
 | 
			
		||||
 | 
			
		||||
	for(;;)
 | 
			
		||||
		{
 | 
			
		||||
		len = BIO_gets(cbio, inbuf, 1024);
 | 
			
		||||
		len = BIO_gets(cbio, inbuf, sizeof inbuf);
 | 
			
		||||
		if (len <= 0)
 | 
			
		||||
			return 1;
 | 
			
		||||
		/* Look for "POST" signalling start of query */
 | 
			
		||||
@@ -1209,3 +1224,4 @@ static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp)
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,13 @@
 | 
			
		||||
# This is mostly being used for generation of certificate requests.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
RANDFILE		= ${ENV::HOME}/.rnd
 | 
			
		||||
oid_file		= ${ENV::HOME}/.oid
 | 
			
		||||
# This definition stops the following lines choking if HOME isn't
 | 
			
		||||
# defined.
 | 
			
		||||
HOME			= .
 | 
			
		||||
RANDFILE		= $ENV::HOME/.rnd
 | 
			
		||||
 | 
			
		||||
# Extra OBJECT IDENTIFIER info:
 | 
			
		||||
#oid_file		= $ENV::HOME/.oid
 | 
			
		||||
oid_section		= new_oids
 | 
			
		||||
 | 
			
		||||
# To use this configuration file with the "-extfile" option of the
 | 
			
		||||
@@ -29,22 +34,35 @@ default_ca	= CA_default		# The default ca section
 | 
			
		||||
####################################################################
 | 
			
		||||
[ CA_default ]
 | 
			
		||||
 | 
			
		||||
dir		= ssl$root:[000000		# Where everything is kept
 | 
			
		||||
certs		= ${dir}.certs]			# Where the issued certs are kept
 | 
			
		||||
crl_dir		= ${dir}.certs]			# Where the issued crl are kept
 | 
			
		||||
database	= ${dir}.private]index.txt	# database index file.
 | 
			
		||||
new_certs_dir	= ${dir}.certs]			# default place for new certs.
 | 
			
		||||
dir		= sys\$disk:[.demoCA		# Where everything is kept
 | 
			
		||||
certs		= $dir.certs]		# Where the issued certs are kept
 | 
			
		||||
crl_dir		= $dir.crl]		# Where the issued crl are kept
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
certificate	= ${dir}]cacert.pem		# The CA certificate
 | 
			
		||||
serial		= ${dir}.private]serial.txt	# The current serial number
 | 
			
		||||
crl		= ${dir}]crl.pem 		# The current CRL
 | 
			
		||||
private_key	= ${dir}.private]cakey.pem	# The private key
 | 
			
		||||
RANDFILE	= ${dir}.private].rand		# private random number file
 | 
			
		||||
certificate	= $dir]cacert.pem 	# The CA certificate
 | 
			
		||||
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
 | 
			
		||||
private_key	= $dir.private]cakey.pem# The private key
 | 
			
		||||
RANDFILE	= $dir.private].rand	# private random number file
 | 
			
		||||
 | 
			
		||||
x509_extensions	= usr_cert		# The extentions to add to the cert
 | 
			
		||||
 | 
			
		||||
# Comment out the following two lines for the "traditional"
 | 
			
		||||
# (and highly broken) format.
 | 
			
		||||
name_opt 	= ca_default		# Subject Name options
 | 
			
		||||
cert_opt 	= ca_default		# Certificate field options
 | 
			
		||||
 | 
			
		||||
# Extension copying option: use with caution.
 | 
			
		||||
# copy_extensions = copy
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
# crlnumber must also be commented out to leave a V1 CRL.
 | 
			
		||||
# crl_extensions	= crl_ext
 | 
			
		||||
 | 
			
		||||
default_days	= 365			# how long to certify for
 | 
			
		||||
@@ -60,8 +78,8 @@ policy		= policy_match
 | 
			
		||||
# For the CA policy
 | 
			
		||||
[ policy_match ]
 | 
			
		||||
countryName		= match
 | 
			
		||||
stateOrProvinceName	= supplied
 | 
			
		||||
organizationName	= supplied
 | 
			
		||||
stateOrProvinceName	= match
 | 
			
		||||
organizationName	= match
 | 
			
		||||
organizationalUnitName	= optional
 | 
			
		||||
commonName		= supplied
 | 
			
		||||
emailAddress		= optional
 | 
			
		||||
@@ -86,16 +104,19 @@ distinguished_name	= req_distinguished_name
 | 
			
		||||
attributes		= req_attributes
 | 
			
		||||
x509_extensions	= v3_ca	# The extentions to add to the self signed cert
 | 
			
		||||
 | 
			
		||||
# This sets the permitted types in a DirectoryString. There are several
 | 
			
		||||
# options. 
 | 
			
		||||
# Passwords for private keys if not present they will be prompted for
 | 
			
		||||
# input_password = secret
 | 
			
		||||
# output_password = secret
 | 
			
		||||
 | 
			
		||||
# This sets a mask for permitted string types. There are several options. 
 | 
			
		||||
# default: PrintableString, T61String, BMPString.
 | 
			
		||||
# pkix	 : PrintableString, BMPString.
 | 
			
		||||
# utf8only: only UTF8Strings.
 | 
			
		||||
# nobmp : PrintableString, T61String (no BMPStrings).
 | 
			
		||||
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
 | 
			
		||||
# MASK:XXXX a literal mask value.
 | 
			
		||||
# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings
 | 
			
		||||
# so use this option with caution!
 | 
			
		||||
dirstring_type = nobmp
 | 
			
		||||
string_mask = nombstr
 | 
			
		||||
 | 
			
		||||
# req_extensions = v3_req # The extensions to add to a certificate request
 | 
			
		||||
 | 
			
		||||
@@ -124,7 +145,7 @@ commonName			= Common Name (eg, YOUR name)
 | 
			
		||||
commonName_max			= 64
 | 
			
		||||
 | 
			
		||||
emailAddress			= Email Address
 | 
			
		||||
emailAddress_max		= 40
 | 
			
		||||
emailAddress_max		= 64
 | 
			
		||||
 | 
			
		||||
# SET-ex3			= SET extension number 3
 | 
			
		||||
 | 
			
		||||
@@ -172,6 +193,9 @@ authorityKeyIdentifier=keyid,issuer:always
 | 
			
		||||
# This stuff is for subjectAltName and issuerAltname.
 | 
			
		||||
# Import the email address.
 | 
			
		||||
# subjectAltName=email:copy
 | 
			
		||||
# An alternative to produce certificates that aren't
 | 
			
		||||
# deprecated according to PKIX.
 | 
			
		||||
# subjectAltName=email:move
 | 
			
		||||
 | 
			
		||||
# Copy subject details
 | 
			
		||||
# issuerAltName=issuer:copy
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										122
									
								
								apps/openssl.c
									
									
									
									
									
								
							
							
						
						
									
										122
									
								
								apps/openssl.c
									
									
									
									
									
								
							@@ -114,6 +114,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#define OPENSSL_C /* tells apps.h to use complete apps_startup() */
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/bio.h>
 | 
			
		||||
#include <openssl/crypto.h>
 | 
			
		||||
#include <openssl/lhash.h>
 | 
			
		||||
@@ -121,12 +122,14 @@
 | 
			
		||||
#include <openssl/x509.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include <openssl/ssl.h>
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
#include <openssl/engine.h>
 | 
			
		||||
#endif
 | 
			
		||||
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include "progs.h"
 | 
			
		||||
#include "s_apps.h"
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/fips.h>
 | 
			
		||||
 | 
			
		||||
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
 | 
			
		||||
 * base prototypes (we cast each variable inside the function to the required
 | 
			
		||||
@@ -138,25 +141,14 @@ static unsigned long MS_CALLBACK hash(const void *a_void);
 | 
			
		||||
/* static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b); */
 | 
			
		||||
static int MS_CALLBACK cmp(const void *a_void,const void *b_void);
 | 
			
		||||
static LHASH *prog_init(void );
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
#if __INITIAL_POINTER_SIZE == 64
 | 
			
		||||
#pragma __required_pointer_size __save
 | 
			
		||||
#pragma __required_pointer_size 32
 | 
			
		||||
#endif
 | 
			
		||||
typedef char ** Argv_32;
 | 
			
		||||
#if __INITIAL_POINTER_SIZE == 64
 | 
			
		||||
#pragma __required_pointer_size __restore
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int do_cmd(LHASH *prog,int argc,char *argv[]);
 | 
			
		||||
CONF *config=NULL;
 | 
			
		||||
char *default_config_file=NULL;
 | 
			
		||||
 | 
			
		||||
/* Make sure there is only one when MONOLITH is defined */
 | 
			
		||||
#ifdef MONOLITH
 | 
			
		||||
CONF *config=NULL;
 | 
			
		||||
BIO *bio_err=NULL;
 | 
			
		||||
int in_FIPS_mode=0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -173,7 +165,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (type < 0 || type > CRYPTO_NUM_LOCKS)
 | 
			
		||||
	if (type < 0 || type >= CRYPTO_NUM_LOCKS)
 | 
			
		||||
		{
 | 
			
		||||
		errstr = "type out of bounds";
 | 
			
		||||
		goto err;
 | 
			
		||||
@@ -224,34 +216,48 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
int main(int Argc, Argv_32 argv32)
 | 
			
		||||
#else
 | 
			
		||||
int main(int Argc, char *Argv[])
 | 
			
		||||
#endif
 | 
			
		||||
	{
 | 
			
		||||
	ARGS arg;
 | 
			
		||||
#define PROG_NAME_SIZE	39
 | 
			
		||||
	char pname[PROG_NAME_SIZE+1];
 | 
			
		||||
	FUNCTION f,*fp;
 | 
			
		||||
	MS_STATIC char *prompt,buf[1024],config_name[256];
 | 
			
		||||
	MS_STATIC char *prompt,buf[1024];
 | 
			
		||||
	char *to_free=NULL;
 | 
			
		||||
	int n,i,ret=0;
 | 
			
		||||
	int argc;
 | 
			
		||||
	char **argv,*p;
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
#if __INITIAL_POINTER_SIZE == 64
 | 
			
		||||
	char **argv64;
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	LHASH *prog=NULL;
 | 
			
		||||
	long errline;
 | 
			
		||||
	int loop;  /* For checking if it's first round in the OpenSSL commandline loop */
 | 
			
		||||
 | 
			
		||||
	arg.data=NULL;
 | 
			
		||||
	arg.count=0;
 | 
			
		||||
 | 
			
		||||
	in_FIPS_mode = 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);
 | 
			
		||||
		}
 | 
			
		||||
		in_FIPS_mode = 1;
 | 
			
		||||
		if (getenv("OPENSSL_FIPS_MD5"))
 | 
			
		||||
			FIPS_allow_md5(1);
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */
 | 
			
		||||
		{
 | 
			
		||||
		if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))
 | 
			
		||||
@@ -276,23 +282,12 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL)
 | 
			
		||||
		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
			BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 | 
			
		||||
 | 
			
		||||
	/* Lets load up our environment a little */
 | 
			
		||||
	p=getenv("OPENSSL_CONF");
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		p=getenv("SSLEAY_CONF");
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		strcpy(config_name,X509_get_default_cert_area());
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
		strcat(config_name,"/");
 | 
			
		||||
#endif
 | 
			
		||||
		strcat(config_name,OPENSSL_CONF);
 | 
			
		||||
		p=config_name;
 | 
			
		||||
		}
 | 
			
		||||
		p=to_free=make_config_name();
 | 
			
		||||
 | 
			
		||||
	default_config_file=p;
 | 
			
		||||
 | 
			
		||||
@@ -308,23 +303,14 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
	prog=prog_init();
 | 
			
		||||
 | 
			
		||||
	/* first check the program name */
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
	program_name(argv32[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
#else
 | 
			
		||||
	program_name(Argv[0],pname,PROG_NAME_SIZE);
 | 
			
		||||
#endif
 | 
			
		||||
	program_name(Argv[0],pname,sizeof pname);
 | 
			
		||||
 | 
			
		||||
	f.name=pname;
 | 
			
		||||
	fp=(FUNCTION *)lh_retrieve(prog,&f);
 | 
			
		||||
	if (fp != NULL)
 | 
			
		||||
		{
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		argv32[0]=pname;
 | 
			
		||||
		ret=fp->func(Argc,argv32);
 | 
			
		||||
#else
 | 
			
		||||
		Argv[0]=pname;
 | 
			
		||||
		ret=fp->func(Argc,Argv);
 | 
			
		||||
#endif
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -333,51 +319,26 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
	if (Argc != 1)
 | 
			
		||||
		{
 | 
			
		||||
		Argc--;
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
		argv32++;
 | 
			
		||||
 #if __INITIAL_POINTER_SIZE == 64
 | 
			
		||||
		argv64=(char **)_malloc64(sizeof(char *)*Argc);  /* memory allocation in 64-bit address */
 | 
			
		||||
 | 
			
		||||
        	for (i=0;i<Argc;i++)
 | 
			
		||||
        	{
 | 
			
		||||
                	argv64[i]=argv32[i];  /* copying 32-bit Argv to 64-bit argv*/
 | 
			
		||||
        	}
 | 
			
		||||
 | 
			
		||||
		ret=do_cmd(prog,Argc,argv64);
 | 
			
		||||
		free(argv64);
 | 
			
		||||
 #else
 | 
			
		||||
		ret=do_cmd(prog,Argc,argv32);
 | 
			
		||||
 #endif
 | 
			
		||||
#else
 | 
			
		||||
		Argv++;
 | 
			
		||||
		ret=do_cmd(prog,Argc,Argv);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		if (ret < 0) ret=0;
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	/* ok, lets enter the old 'OpenSSL>' mode */
 | 
			
		||||
	loop=0;
 | 
			
		||||
	
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		ret=0;
 | 
			
		||||
		p=buf;
 | 
			
		||||
		n=1024;
 | 
			
		||||
		n=sizeof buf;
 | 
			
		||||
		i=0;
 | 
			
		||||
		for (;;)
 | 
			
		||||
			{
 | 
			
		||||
			p[0]='\0';
 | 
			
		||||
			if (i++)
 | 
			
		||||
				prompt=">";
 | 
			
		||||
			else 
 | 
			
		||||
			   if(loop == 0){  /* first round in this loop*/
 | 
			
		||||
				prompt="OpenSSL> ";
 | 
			
		||||
				loop++;
 | 
			
		||||
			   }
 | 
			
		||||
			   else 
 | 
			
		||||
				prompt="\nOpenSSL> ";
 | 
			
		||||
 | 
			
		||||
			else	prompt="OpenSSL> ";
 | 
			
		||||
			fputs(prompt,stdout);
 | 
			
		||||
			fflush(stdout);
 | 
			
		||||
			fgets(p,n,stdin);
 | 
			
		||||
@@ -404,6 +365,8 @@ int main(int Argc, char *Argv[])
 | 
			
		||||
	BIO_printf(bio_err,"bad exit\n");
 | 
			
		||||
	ret=1;
 | 
			
		||||
end:
 | 
			
		||||
	if (to_free)
 | 
			
		||||
		OPENSSL_free(to_free);
 | 
			
		||||
	if (config != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		NCONF_free(config);
 | 
			
		||||
@@ -420,14 +383,13 @@ end:
 | 
			
		||||
		BIO_free(bio_err);
 | 
			
		||||
		bio_err=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#define LIST_STANDARD_COMMANDS "list-standard-commands"
 | 
			
		||||
#define LIST_MESSAGE_DIGEST_COMMANDS "list-message-digest-commands"
 | 
			
		||||
#define LIST_CIPHER_COMMANDS "list-cipher-commands"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int do_cmd(LHASH *prog, int argc, char *argv[])
 | 
			
		||||
	{
 | 
			
		||||
	FUNCTION f,*fp;
 | 
			
		||||
 
 | 
			
		||||
@@ -6,15 +6,7 @@
 | 
			
		||||
# This definition stops the following lines choking if HOME isn't
 | 
			
		||||
# defined.
 | 
			
		||||
HOME			= .
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# From the instructions at http://www.free.lp.se/openssl/docs/openssl3.html#ss3.1,
 | 
			
		||||
# change the value of RANDFILE.  Also moved definition of dir up since RANDFILE
 | 
			
		||||
# depends on it.
 | 
			
		||||
#
 | 
			
		||||
#RANDFILE               = $ENV::HOME/.rnd
 | 
			
		||||
dir             = SSLROOT:[000000       # Where everything is kept
 | 
			
		||||
RANDFILE                = $dir.private]RANDFILE.;
 | 
			
		||||
RANDFILE		= $ENV::HOME/.rnd
 | 
			
		||||
 | 
			
		||||
# Extra OBJECT IDENTIFIER info:
 | 
			
		||||
#oid_file		= $ENV::HOME/.oid
 | 
			
		||||
@@ -41,19 +33,19 @@ default_ca	= CA_default		# The default ca section
 | 
			
		||||
 | 
			
		||||
####################################################################
 | 
			
		||||
[ CA_default ]
 | 
			
		||||
#
 | 
			
		||||
# From the instructions at http://www.free.lp.se/openssl/docs/openssl3.html#ss3.1,
 | 
			
		||||
# change the value of dir.
 | 
			
		||||
#
 | 
			
		||||
#dir            = sys\$disk:[.demoCA    # Where everything is kept
 | 
			
		||||
dir             = SSLROOT:[000000       # Where everything is kept
 | 
			
		||||
 | 
			
		||||
dir		= ./demoCA		# Where everything is kept
 | 
			
		||||
certs		= $dir/certs		# Where the issued certs are kept
 | 
			
		||||
crl_dir		= $dir/crl		# Where the issued crl are kept
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
certificate	= $dir/cacert.pem 	# The CA certificate
 | 
			
		||||
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
 | 
			
		||||
private_key	= $dir/private/cakey.pem# The private key
 | 
			
		||||
RANDFILE	= $dir/private/.rand	# private random number file
 | 
			
		||||
@@ -70,6 +62,7 @@ cert_opt 	= ca_default		# Certificate field options
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
# crlnumber must also be commented out to leave a V1 CRL.
 | 
			
		||||
# crl_extensions	= crl_ext
 | 
			
		||||
 | 
			
		||||
default_days	= 365			# how long to certify for
 | 
			
		||||
@@ -186,11 +179,6 @@ basicConstraints=CA:FALSE
 | 
			
		||||
 | 
			
		||||
# and for everything including object signing:
 | 
			
		||||
# nsCertType = client, email, objsign
 | 
			
		||||
#
 | 
			
		||||
# From the instructions at http://www.free.lp.se/openssl/docs/openssl3.html#ss3.1,
 | 
			
		||||
# include server in the nsCertType.
 | 
			
		||||
#
 | 
			
		||||
nsCertType = client, email, objsign, server
 | 
			
		||||
 | 
			
		||||
# This is typical in keyUsage for a client certificate.
 | 
			
		||||
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,6 @@
 | 
			
		||||
# include <openssl/des.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_MD5CRYPT_1
 | 
			
		||||
# include <openssl/evp.h>
 | 
			
		||||
# include <openssl/md5.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -293,7 +292,7 @@ err:
 | 
			
		||||
	if (out)
 | 
			
		||||
		BIO_free_all(out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -506,6 +505,6 @@ err:
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
	fputs("Program not available.\n", stderr)
 | 
			
		||||
	EXIT(1);
 | 
			
		||||
	OPENSSL_EXIT(1);
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
    char *passin = NULL, *passout = NULL;
 | 
			
		||||
    char *inrand = NULL;
 | 
			
		||||
    char *CApath = NULL, *CAfile = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
    char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -252,11 +254,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			args++;	
 | 
			
		||||
			CAfile = *args;
 | 
			
		||||
		    } else badarg = 1;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		} else if (!strcmp(*args,"-engine")) {
 | 
			
		||||
		    if (args[1]) {
 | 
			
		||||
			args++;	
 | 
			
		||||
			engine = *args;
 | 
			
		||||
		    } else badarg = 1;
 | 
			
		||||
#endif
 | 
			
		||||
		} else badarg = 1;
 | 
			
		||||
 | 
			
		||||
	} else badarg = 1;
 | 
			
		||||
@@ -304,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, "-passin p     input 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");
 | 
			
		||||
#endif
 | 
			
		||||
	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,  "              the random number generator\n");
 | 
			
		||||
    	goto end;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
    e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    if(passarg) {
 | 
			
		||||
	if(export_cert) passargout = passarg;
 | 
			
		||||
@@ -399,7 +407,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
    CRYPTO_push_info("read MAC password");
 | 
			
		||||
#endif
 | 
			
		||||
	if(EVP_read_pw_string (macpass, 50, "Enter MAC Password:", export_cert))
 | 
			
		||||
	if(EVP_read_pw_string (macpass, sizeof macpass, "Enter MAC Password:", export_cert))
 | 
			
		||||
	{
 | 
			
		||||
    	    BIO_printf (bio_err, "Can't read Password\n");
 | 
			
		||||
    	    goto end;
 | 
			
		||||
@@ -427,7 +435,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	CRYPTO_push_info("process -export_cert");
 | 
			
		||||
	CRYPTO_push_info("reading private key");
 | 
			
		||||
#endif
 | 
			
		||||
	key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM,
 | 
			
		||||
	key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1,
 | 
			
		||||
		passin, e, "private key");
 | 
			
		||||
	if (!key) {
 | 
			
		||||
		goto export_end;
 | 
			
		||||
@@ -508,9 +516,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		    /* Exclude verified certificate */
 | 
			
		||||
		    for (i = 1; i < sk_X509_num (chain2) ; i++) 
 | 
			
		||||
			sk_X509_push(certs, sk_X509_value (chain2, i));
 | 
			
		||||
		}
 | 
			
		||||
		    /* Free first certificate */
 | 
			
		||||
		    X509_free(sk_X509_value(chain2, 0));
 | 
			
		||||
		    sk_X509_free(chain2);
 | 
			
		||||
		if (vret) {
 | 
			
		||||
		} else {
 | 
			
		||||
			BIO_printf (bio_err, "Error %s getting chain.\n",
 | 
			
		||||
					X509_verify_cert_error_string(vret));
 | 
			
		||||
			goto export_end;
 | 
			
		||||
@@ -537,8 +546,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	}
 | 
			
		||||
	sk_X509_pop_free(certs, X509_free);
 | 
			
		||||
	certs = NULL;
 | 
			
		||||
	/* ucert is part of certs so it is already freed */
 | 
			
		||||
	ucert = NULL;
 | 
			
		||||
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
	CRYPTO_pop_info();
 | 
			
		||||
@@ -546,11 +553,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if(!noprompt &&
 | 
			
		||||
		EVP_read_pw_string(pass, 50, "Enter Export Password:", 1)) {
 | 
			
		||||
		EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) {
 | 
			
		||||
	    BIO_printf (bio_err, "Can't read Password\n");
 | 
			
		||||
	    goto export_end;
 | 
			
		||||
        }
 | 
			
		||||
	if (!twopass) strcpy(macpass, pass);
 | 
			
		||||
	if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass);
 | 
			
		||||
	/* Turn certbags into encrypted authsafe */
 | 
			
		||||
	authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0,
 | 
			
		||||
								 iter, bags);
 | 
			
		||||
@@ -627,7 +634,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (certs) sk_X509_pop_free(certs, X509_free);
 | 
			
		||||
	if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
 | 
			
		||||
	if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
 | 
			
		||||
	if (ucert) X509_free(ucert);
 | 
			
		||||
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
	CRYPTO_pop_info();
 | 
			
		||||
@@ -644,7 +650,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifdef CRYPTO_MDEBUG
 | 
			
		||||
    CRYPTO_push_info("read import password");
 | 
			
		||||
#endif
 | 
			
		||||
    if(!noprompt && EVP_read_pw_string(pass, 50, "Enter Import Password:", 0)) {
 | 
			
		||||
    if(!noprompt && EVP_read_pw_string(pass, sizeof pass, "Enter Import Password:", 0)) {
 | 
			
		||||
	BIO_printf (bio_err, "Can't read Password\n");
 | 
			
		||||
	goto end;
 | 
			
		||||
    }
 | 
			
		||||
@@ -652,7 +658,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
    CRYPTO_pop_info();
 | 
			
		||||
#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(macver) {
 | 
			
		||||
@@ -698,7 +704,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
    if(passin) OPENSSL_free(passin);
 | 
			
		||||
    if(passout) OPENSSL_free(passout);
 | 
			
		||||
    apps_shutdown();
 | 
			
		||||
    EXIT(ret);
 | 
			
		||||
    OPENSSL_EXIT(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								apps/pkcs7.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								apps/pkcs7.c
									
									
									
									
									
								
							@@ -82,15 +82,19 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	PKCS7 *p7=NULL;
 | 
			
		||||
	int i,badops=0;
 | 
			
		||||
	BIO *in=NULL,*out=NULL;
 | 
			
		||||
	int informat,outformat;
 | 
			
		||||
	char *infile,*outfile,*prog;
 | 
			
		||||
	int print_certs=0,text=0,noout=0;
 | 
			
		||||
	int ret=0;
 | 
			
		||||
	int ret=1;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -98,6 +102,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		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;
 | 
			
		||||
 | 
			
		||||
	infile=NULL;
 | 
			
		||||
	outfile=NULL;
 | 
			
		||||
	informat=FORMAT_PEM;
 | 
			
		||||
@@ -134,11 +141,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			text=1;
 | 
			
		||||
		else if (strcmp(*argv,"-print_certs") == 0)
 | 
			
		||||
			print_certs=1;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			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," -text         print full details of certificates\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");
 | 
			
		||||
#endif
 | 
			
		||||
		ret = 1;
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	in=BIO_new(BIO_s_file());
 | 
			
		||||
	out=BIO_new(BIO_s_file());
 | 
			
		||||
@@ -301,5 +314,5 @@ end:
 | 
			
		||||
	if (in != NULL) BIO_free(in);
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										277
									
								
								apps/pkcs8.c
									
									
									
									
									
								
							
							
						
						
									
										277
									
								
								apps/pkcs8.c
									
									
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
/* pkcs8.c */
 | 
			
		||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
 | 
			
		||||
 * project 1999.
 | 
			
		||||
 * project 1999-2004.
 | 
			
		||||
 */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
@@ -63,13 +63,12 @@
 | 
			
		||||
#include <openssl/evp.h>
 | 
			
		||||
#include <openssl/pkcs12.h>
 | 
			
		||||
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#define PROG pkcs8_main
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
	{
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
	char **args, *infile = NULL, *outfile = NULL;
 | 
			
		||||
	char *passargin = NULL, *passargout = NULL;
 | 
			
		||||
@@ -86,7 +85,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	EVP_PKEY *pkey=NULL;
 | 
			
		||||
	char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
 | 
			
		||||
	int badarg = 0;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
 | 
			
		||||
 | 
			
		||||
@@ -99,43 +100,70 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
	OpenSSL_add_all_algorithms();
 | 
			
		||||
	args = argv + 1;
 | 
			
		||||
	while (!badarg && *args && *args[0] == '-') {
 | 
			
		||||
		if (!strcmp(*args,"-v2")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
	while (!badarg && *args && *args[0] == '-')
 | 
			
		||||
		{
 | 
			
		||||
		if (!strcmp(*args,"-v2"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				cipher=EVP_get_cipherbyname(*args);
 | 
			
		||||
				if(!cipher) {
 | 
			
		||||
				if (!cipher)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,
 | 
			
		||||
						 "Unknown cipher %s\n", *args);
 | 
			
		||||
					badarg = 1;
 | 
			
		||||
					}
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
		} else if (!strcmp(*args,"-v1")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*args,"-v1"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				pbe_nid=OBJ_txt2nid(*args);
 | 
			
		||||
				if(pbe_nid == NID_undef) {
 | 
			
		||||
				if (pbe_nid == NID_undef)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,
 | 
			
		||||
						 "Unknown PBE algorithm %s\n", *args);
 | 
			
		||||
					badarg = 1;
 | 
			
		||||
					}
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
		} else if (!strcmp(*args,"-inform")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*args,"-inform"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				informat=str2fmt(*args);
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
		} else if (!strcmp(*args,"-outform")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
				}
 | 
			
		||||
			else badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp(*args,"-outform"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				outformat=str2fmt(*args);
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
		} else if (!strcmp (*args, "-topk8")) topk8 = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-noiter")) iter = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-nocrypt")) nocrypt = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-nooct")) p8_broken = PKCS8_NO_OCTET;
 | 
			
		||||
		else if (!strcmp (*args, "-nsdb")) p8_broken = PKCS8_NS_DB;
 | 
			
		||||
		else if (!strcmp (*args, "-embed")) p8_broken = PKCS8_EMBEDDED_PARAM;
 | 
			
		||||
				}
 | 
			
		||||
			else badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp (*args, "-topk8"))
 | 
			
		||||
			topk8 = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-noiter"))
 | 
			
		||||
			iter = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-nocrypt"))
 | 
			
		||||
			nocrypt = 1;
 | 
			
		||||
		else if (!strcmp (*args, "-nooct"))
 | 
			
		||||
			p8_broken = PKCS8_NO_OCTET;
 | 
			
		||||
		else if (!strcmp (*args, "-nsdb"))
 | 
			
		||||
			p8_broken = PKCS8_NS_DB;
 | 
			
		||||
		else if (!strcmp (*args, "-embed"))
 | 
			
		||||
			p8_broken = PKCS8_EMBEDDED_PARAM;
 | 
			
		||||
		else if (!strcmp(*args,"-passin"))
 | 
			
		||||
			{
 | 
			
		||||
			if (!args[1]) goto bad;
 | 
			
		||||
@@ -146,26 +174,37 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (!args[1]) goto bad;
 | 
			
		||||
			passargout= *(++args);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*args,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (!args[1]) goto bad;
 | 
			
		||||
			engine= *(++args);
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp (*args, "-in")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
#endif
 | 
			
		||||
		else if (!strcmp (*args, "-in"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				infile = *args;
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
		} else if (!strcmp (*args, "-out")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
				}
 | 
			
		||||
			else badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (!strcmp (*args, "-out"))
 | 
			
		||||
			{
 | 
			
		||||
			if (args[1])
 | 
			
		||||
				{
 | 
			
		||||
				args++;
 | 
			
		||||
				outfile = *args;
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
		} else badarg = 1;
 | 
			
		||||
				}
 | 
			
		||||
			else badarg = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else badarg = 1;
 | 
			
		||||
		args++;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (badarg) {
 | 
			
		||||
	if (badarg)
 | 
			
		||||
		{
 | 
			
		||||
		bad:
 | 
			
		||||
		BIO_printf(bio_err, "Usage pkcs8 [options]\n");
 | 
			
		||||
		BIO_printf(bio_err, "where options are\n");
 | 
			
		||||
@@ -183,34 +222,48 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		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, "-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");
 | 
			
		||||
		return (1);
 | 
			
		||||
#endif
 | 
			
		||||
		return 1;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        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");
 | 
			
		||||
		return (1);
 | 
			
		||||
		return 1;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if ((pbe_nid == -1) && !cipher) pbe_nid = NID_pbeWithMD5AndDES_CBC;
 | 
			
		||||
	if ((pbe_nid == -1) && !cipher)
 | 
			
		||||
		pbe_nid = NID_pbeWithMD5AndDES_CBC;
 | 
			
		||||
 | 
			
		||||
	if (infile) {
 | 
			
		||||
		if (!(in = BIO_new_file(infile, "rb"))) {
 | 
			
		||||
	if (infile)
 | 
			
		||||
		{
 | 
			
		||||
		if (!(in = BIO_new_file(infile, "rb")))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,
 | 
			
		||||
				 "Can't open input file %s\n", infile);
 | 
			
		||||
			return (1);
 | 
			
		||||
			}
 | 
			
		||||
	} else in = BIO_new_fp (stdin, BIO_NOCLOSE);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		in = BIO_new_fp (stdin, BIO_NOCLOSE);
 | 
			
		||||
 | 
			
		||||
	if (outfile) {
 | 
			
		||||
		if (!(out = BIO_new_file (outfile, "wb"))) {
 | 
			
		||||
	if (outfile)
 | 
			
		||||
		{
 | 
			
		||||
		if (!(out = BIO_new_file (outfile, "wb")))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,
 | 
			
		||||
				 "Can't open output file %s\n", outfile);
 | 
			
		||||
			return (1);
 | 
			
		||||
			}
 | 
			
		||||
	} else {
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		out = BIO_new_fp (stdout, BIO_NOCLOSE);
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
			{
 | 
			
		||||
@@ -222,106 +275,149 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	if (topk8)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_free(in); /* Not needed in this section */
 | 
			
		||||
		pkey = load_key(bio_err, infile, informat, passin, e, "key");
 | 
			
		||||
		if (!pkey) {
 | 
			
		||||
			return (1);
 | 
			
		||||
		pkey = load_key(bio_err, infile, informat, 1,
 | 
			
		||||
			passin, e, "key");
 | 
			
		||||
		if (!pkey)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_free_all(out);
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
 | 
			
		||||
			BIO_printf(bio_err, "Error converting key\n", outfile);
 | 
			
		||||
		if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken)))
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Error converting key\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			return (1);
 | 
			
		||||
			EVP_PKEY_free(pkey);
 | 
			
		||||
			BIO_free_all(out);
 | 
			
		||||
			return 1;
 | 
			
		||||
			}
 | 
			
		||||
		if(nocrypt) {
 | 
			
		||||
			if(outformat == FORMAT_PEM) 
 | 
			
		||||
		if (nocrypt)
 | 
			
		||||
			{
 | 
			
		||||
			if (outformat == FORMAT_PEM) 
 | 
			
		||||
				PEM_write_bio_PKCS8_PRIV_KEY_INFO(out, p8inf);
 | 
			
		||||
			else if(outformat == FORMAT_ASN1)
 | 
			
		||||
			else if (outformat == FORMAT_ASN1)
 | 
			
		||||
				i2d_PKCS8_PRIV_KEY_INFO_bio(out, p8inf);
 | 
			
		||||
			else {
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "Bad format specified for key\n");
 | 
			
		||||
				PKCS8_PRIV_KEY_INFO_free(p8inf);
 | 
			
		||||
				EVP_PKEY_free(pkey);
 | 
			
		||||
				BIO_free_all(out);
 | 
			
		||||
				return (1);
 | 
			
		||||
				}
 | 
			
		||||
		} else {
 | 
			
		||||
			if(passout) p8pass = passout;
 | 
			
		||||
			else {
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			if (passout)
 | 
			
		||||
				p8pass = passout;
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				p8pass = pass;
 | 
			
		||||
				EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1);
 | 
			
		||||
				if (EVP_read_pw_string(pass, sizeof pass, "Enter Encryption Password:", 1))
 | 
			
		||||
					{
 | 
			
		||||
					PKCS8_PRIV_KEY_INFO_free(p8inf);
 | 
			
		||||
					EVP_PKEY_free(pkey);
 | 
			
		||||
					BIO_free_all(out);
 | 
			
		||||
					return (1);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			app_RAND_load_file(NULL, bio_err, 0);
 | 
			
		||||
			if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
 | 
			
		||||
					p8pass, strlen(p8pass),
 | 
			
		||||
					NULL, 0, iter, p8inf))) {
 | 
			
		||||
				BIO_printf(bio_err, "Error encrypting key\n",
 | 
			
		||||
								 outfile);
 | 
			
		||||
					NULL, 0, iter, p8inf)))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "Error encrypting key\n");
 | 
			
		||||
				ERR_print_errors(bio_err);
 | 
			
		||||
				PKCS8_PRIV_KEY_INFO_free(p8inf);
 | 
			
		||||
				EVP_PKEY_free(pkey);
 | 
			
		||||
				BIO_free_all(out);
 | 
			
		||||
				return (1);
 | 
			
		||||
				}
 | 
			
		||||
			app_RAND_write_file(NULL, bio_err);
 | 
			
		||||
			if(outformat == FORMAT_PEM) 
 | 
			
		||||
			if (outformat == FORMAT_PEM) 
 | 
			
		||||
				PEM_write_bio_PKCS8(out, p8);
 | 
			
		||||
			else if(outformat == FORMAT_ASN1)
 | 
			
		||||
			else if (outformat == FORMAT_ASN1)
 | 
			
		||||
				i2d_PKCS8_bio(out, p8);
 | 
			
		||||
			else {
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_err, "Bad format specified for key\n");
 | 
			
		||||
				PKCS8_PRIV_KEY_INFO_free(p8inf);
 | 
			
		||||
				EVP_PKEY_free(pkey);
 | 
			
		||||
				BIO_free_all(out);
 | 
			
		||||
				return (1);
 | 
			
		||||
				}
 | 
			
		||||
			X509_SIG_free(p8);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		PKCS8_PRIV_KEY_INFO_free (p8inf);
 | 
			
		||||
		EVP_PKEY_free(pkey);
 | 
			
		||||
		BIO_free_all(out);
 | 
			
		||||
		if(passin) OPENSSL_free(passin);
 | 
			
		||||
		if(passout) OPENSSL_free(passout);
 | 
			
		||||
		if (passin)
 | 
			
		||||
			OPENSSL_free(passin);
 | 
			
		||||
		if (passout)
 | 
			
		||||
			OPENSSL_free(passout);
 | 
			
		||||
		return (0);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(nocrypt) {
 | 
			
		||||
		if(informat == FORMAT_PEM) 
 | 
			
		||||
	if (nocrypt)
 | 
			
		||||
		{
 | 
			
		||||
		if (informat == FORMAT_PEM) 
 | 
			
		||||
			p8inf = PEM_read_bio_PKCS8_PRIV_KEY_INFO(in,NULL,NULL, NULL);
 | 
			
		||||
		else if(informat == FORMAT_ASN1)
 | 
			
		||||
		else if (informat == FORMAT_ASN1)
 | 
			
		||||
			p8inf = d2i_PKCS8_PRIV_KEY_INFO_bio(in, NULL);
 | 
			
		||||
		else {
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Bad format specified for key\n");
 | 
			
		||||
			return (1);
 | 
			
		||||
			}
 | 
			
		||||
	} else {
 | 
			
		||||
		if(informat == FORMAT_PEM) 
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		if (informat == FORMAT_PEM) 
 | 
			
		||||
			p8 = PEM_read_bio_PKCS8(in, NULL, NULL, NULL);
 | 
			
		||||
		else if(informat == FORMAT_ASN1)
 | 
			
		||||
		else if (informat == FORMAT_ASN1)
 | 
			
		||||
			p8 = d2i_PKCS8_bio(in, NULL);
 | 
			
		||||
		else {
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err, "Bad format specified for key\n");
 | 
			
		||||
			return (1);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (!p8) {
 | 
			
		||||
			BIO_printf (bio_err, "Error reading key\n", outfile);
 | 
			
		||||
		if (!p8)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf (bio_err, "Error reading key\n");
 | 
			
		||||
			ERR_print_errors(bio_err);
 | 
			
		||||
			return (1);
 | 
			
		||||
			}
 | 
			
		||||
		if(passin) p8pass = passin;
 | 
			
		||||
		else {
 | 
			
		||||
		if (passin)
 | 
			
		||||
			p8pass = passin;
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			p8pass = pass;
 | 
			
		||||
			EVP_read_pw_string(pass, 50, "Enter Password:", 0);
 | 
			
		||||
			EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0);
 | 
			
		||||
			}
 | 
			
		||||
		p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass));
 | 
			
		||||
		X509_SIG_free(p8);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (!p8inf) {
 | 
			
		||||
		BIO_printf(bio_err, "Error decrypting key\n", outfile);
 | 
			
		||||
	if (!p8inf)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "Error decrypting key\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		return (1);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
 | 
			
		||||
		BIO_printf(bio_err, "Error converting key\n", outfile);
 | 
			
		||||
	if (!(pkey = EVP_PKCS82PKEY(p8inf)))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "Error converting key\n");
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
		return (1);
 | 
			
		||||
		}
 | 
			
		||||
	
 | 
			
		||||
	if (p8inf->broken) {
 | 
			
		||||
	if (p8inf->broken)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "Warning: broken key encoding: ");
 | 
			
		||||
		switch (p8inf->broken) {
 | 
			
		||||
		switch (p8inf->broken)
 | 
			
		||||
			{
 | 
			
		||||
			case PKCS8_NO_OCTET:
 | 
			
		||||
			BIO_printf(bio_err, "No Octet String in PrivateKey\n");
 | 
			
		||||
			break;
 | 
			
		||||
@@ -341,11 +437,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	PKCS8_PRIV_KEY_INFO_free(p8inf);
 | 
			
		||||
	if(outformat == FORMAT_PEM) 
 | 
			
		||||
	if (outformat == FORMAT_PEM) 
 | 
			
		||||
		PEM_write_bio_PrivateKey(out, pkey, NULL, NULL, 0, NULL, passout);
 | 
			
		||||
	else if(outformat == FORMAT_ASN1)
 | 
			
		||||
	else if (outformat == FORMAT_ASN1)
 | 
			
		||||
		i2d_PrivateKey_bio(out, pkey);
 | 
			
		||||
	else {
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err, "Bad format specified for key\n");
 | 
			
		||||
			return (1);
 | 
			
		||||
		}
 | 
			
		||||
@@ -354,8 +451,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	EVP_PKEY_free(pkey);
 | 
			
		||||
	BIO_free_all(out);
 | 
			
		||||
	BIO_free(in);
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	if (passin)
 | 
			
		||||
		OPENSSL_free(passin);
 | 
			
		||||
	if (passout)
 | 
			
		||||
		OPENSSL_free(passout);
 | 
			
		||||
 | 
			
		||||
	return (0);
 | 
			
		||||
}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										118
									
								
								apps/prime.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								apps/prime.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,118 @@
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions
 | 
			
		||||
 * are met:
 | 
			
		||||
 *
 | 
			
		||||
 * 1. Redistributions of source code must retain the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer. 
 | 
			
		||||
 *
 | 
			
		||||
 * 2. Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *    notice, this list of conditions and the following disclaimer in
 | 
			
		||||
 *    the documentation and/or other materials provided with the
 | 
			
		||||
 *    distribution.
 | 
			
		||||
 *
 | 
			
		||||
 * 3. All advertising materials mentioning features or use of this
 | 
			
		||||
 *    software must display the following acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 | 
			
		||||
 *    endorse or promote products derived from this software without
 | 
			
		||||
 *    prior written permission. For written permission, please contact
 | 
			
		||||
 *    openssl-core@openssl.org.
 | 
			
		||||
 *
 | 
			
		||||
 * 5. Products derived from this software may not be called "OpenSSL"
 | 
			
		||||
 *    nor may "OpenSSL" appear in their names without prior written
 | 
			
		||||
 *    permission of the OpenSSL Project.
 | 
			
		||||
 *
 | 
			
		||||
 * 6. Redistributions of any form whatsoever must retain the following
 | 
			
		||||
 *    acknowledgment:
 | 
			
		||||
 *    "This product includes software developed by the OpenSSL Project
 | 
			
		||||
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
			
		||||
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 | 
			
		||||
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 | 
			
		||||
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 | 
			
		||||
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 | 
			
		||||
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
			
		||||
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 | 
			
		||||
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 | 
			
		||||
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 | 
			
		||||
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "apps.h"
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#undef PROG
 | 
			
		||||
#define PROG prime_main
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
    {
 | 
			
		||||
    int hex=0;
 | 
			
		||||
    int checks=20;
 | 
			
		||||
    BIGNUM *bn=NULL;
 | 
			
		||||
    BIO *bio_out=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 (bio_out == NULL)
 | 
			
		||||
	if ((bio_out=BIO_new(BIO_s_file())) != NULL)
 | 
			
		||||
	    {
 | 
			
		||||
	    BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
	    {
 | 
			
		||||
	    BIO *tmpbio = BIO_new(BIO_f_linebuffer());
 | 
			
		||||
	    bio_out = BIO_push(tmpbio, bio_out);
 | 
			
		||||
	    }
 | 
			
		||||
#endif
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
    --argc;
 | 
			
		||||
    ++argv;
 | 
			
		||||
    while (argc >= 1 && **argv == '-')
 | 
			
		||||
	{
 | 
			
		||||
	if(!strcmp(*argv,"-hex"))
 | 
			
		||||
	    hex=1;
 | 
			
		||||
	else if(!strcmp(*argv,"-checks"))
 | 
			
		||||
	    if(--argc < 1)
 | 
			
		||||
		goto bad;
 | 
			
		||||
	    else
 | 
			
		||||
		checks=atoi(*++argv);
 | 
			
		||||
	else
 | 
			
		||||
	    {
 | 
			
		||||
	    BIO_printf(bio_err,"Unknown option '%s'\n",*argv);
 | 
			
		||||
	bad:
 | 
			
		||||
	    BIO_printf(bio_err,"options are\n");
 | 
			
		||||
	    BIO_printf(bio_err,"%-14s hex\n","-hex");
 | 
			
		||||
	    BIO_printf(bio_err,"%-14s number of checks\n","-checks <n>");
 | 
			
		||||
	    exit(1);
 | 
			
		||||
	    }
 | 
			
		||||
	--argc;
 | 
			
		||||
	++argv;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    if(hex)
 | 
			
		||||
	BN_hex2bn(&bn,argv[0]);
 | 
			
		||||
    else
 | 
			
		||||
	BN_dec2bn(&bn,argv[0]);
 | 
			
		||||
 | 
			
		||||
    BN_print(bio_out,bn);
 | 
			
		||||
    BIO_printf(bio_out," is %sprime\n",
 | 
			
		||||
	       BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
    }
 | 
			
		||||
							
								
								
									
										16
									
								
								apps/progs.h
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								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 dsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int dsaparam_main(int argc,char *argv[]);
 | 
			
		||||
extern int ecdsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int ecdsaparam_main(int argc,char *argv[]);
 | 
			
		||||
extern int x509_main(int argc,char *argv[]);
 | 
			
		||||
extern int genrsa_main(int argc,char *argv[]);
 | 
			
		||||
extern int gendsa_main(int argc,char *argv[]);
 | 
			
		||||
@@ -37,7 +35,10 @@ extern int pkcs8_main(int argc,char *argv[]);
 | 
			
		||||
extern int spkac_main(int argc,char *argv[]);
 | 
			
		||||
extern int smime_main(int argc,char *argv[]);
 | 
			
		||||
extern int rand_main(int argc,char *argv[]);
 | 
			
		||||
extern int prime_main(int argc,char *argv[]);
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
extern int engine_main(int argc,char *argv[]);
 | 
			
		||||
#endif
 | 
			
		||||
extern int ocsp_main(int argc,char *argv[]);
 | 
			
		||||
 | 
			
		||||
#define FUNC_TYPE_GENERAL	1
 | 
			
		||||
@@ -80,12 +81,6 @@ FUNCTION functions[] = {
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"ecdsa",ecdsa_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"ecdsaparam",ecdsaparam_main},
 | 
			
		||||
#endif
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"x509",x509_main},
 | 
			
		||||
#ifndef OPENSSL_NO_RSA
 | 
			
		||||
@@ -100,7 +95,9 @@ FUNCTION functions[] = {
 | 
			
		||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"s_client",s_client_main},
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_SPEED
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"speed",speed_main},
 | 
			
		||||
#endif
 | 
			
		||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"s_time",s_time_main},
 | 
			
		||||
#endif
 | 
			
		||||
@@ -119,7 +116,10 @@ FUNCTION functions[] = {
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"spkac",spkac_main},
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"smime",smime_main},
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"rand",rand_main},
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"prime",prime_main},
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"engine",engine_main},
 | 
			
		||||
#endif
 | 
			
		||||
	{FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
 | 
			
		||||
#ifndef OPENSSL_NO_MD2
 | 
			
		||||
	{FUNC_TYPE_MD,"md2",dgst_main},
 | 
			
		||||
 
 | 
			
		||||
@@ -33,8 +33,6 @@ foreach (@ARGV)
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n";  }
 | 
			
		||||
	elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
 | 
			
		||||
	elsif ( ($_ =~ /^ecdsa$/) || ($_ =~ /^ecdsaparam$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_ECDSA\n${str}#endif\n";}
 | 
			
		||||
	elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
 | 
			
		||||
		{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
 | 
			
		||||
	elsif ( ($_ =~ /^pkcs12$/))
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								apps/rand.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/rand.c
									
									
									
									
									
								
							@@ -76,7 +76,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	int i, r, ret = 1;
 | 
			
		||||
	int badopt;
 | 
			
		||||
	char *outfile = NULL;
 | 
			
		||||
@@ -84,7 +86,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int base64 = 0;
 | 
			
		||||
	BIO *out = NULL;
 | 
			
		||||
	int num = -1;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -106,6 +110,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			else
 | 
			
		||||
				badopt = 1;
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(argv[i], "-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if ((argv[i+1] != NULL) && (engine == NULL))
 | 
			
		||||
@@ -113,6 +118,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			else
 | 
			
		||||
				badopt = 1;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(argv[i], "-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			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, "where options are\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");
 | 
			
		||||
#endif
 | 
			
		||||
		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");
 | 
			
		||||
		goto err;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	app_RAND_load_file(NULL, bio_err, (inrand != NULL));
 | 
			
		||||
	if (inrand != NULL)
 | 
			
		||||
@@ -213,5 +223,5 @@ err:
 | 
			
		||||
	if (out)
 | 
			
		||||
		BIO_free_all(out);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										182
									
								
								apps/req.c
									
									
									
									
									
								
							
							
						
						
									
										182
									
								
								apps/req.c
									
									
									
									
									
								
							@@ -73,6 +73,7 @@
 | 
			
		||||
#include <openssl/x509v3.h>
 | 
			
		||||
#include <openssl/objects.h>
 | 
			
		||||
#include <openssl/pem.h>
 | 
			
		||||
#include "../crypto/cryptlib.h"
 | 
			
		||||
 | 
			
		||||
#define SECTION		"req"
 | 
			
		||||
 | 
			
		||||
@@ -134,7 +135,6 @@ static int req_check_len(int len,int n_min,int n_max);
 | 
			
		||||
static int check_end(char *str, char *end);
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
static char *default_config_file=NULL;
 | 
			
		||||
static CONF *config=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
static CONF *req_conf=NULL;
 | 
			
		||||
static int batch=0;
 | 
			
		||||
@@ -142,7 +142,6 @@ static int batch=0;
 | 
			
		||||
#define TYPE_RSA	1
 | 
			
		||||
#define TYPE_DSA	2
 | 
			
		||||
#define TYPE_DH		3
 | 
			
		||||
#define TYPE_ECDSA	4
 | 
			
		||||
 | 
			
		||||
int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
@@ -152,10 +151,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	DSA *dsa_params=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	ECDSA *ecdsa_params = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	unsigned long nmflag = 0;
 | 
			
		||||
	unsigned long nmflag = 0, reqflag = 0;
 | 
			
		||||
	int ex=1,x509=0,days=30;
 | 
			
		||||
	X509 *x509ss=NULL;
 | 
			
		||||
	X509_REQ *req=NULL;
 | 
			
		||||
@@ -166,7 +162,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
 | 
			
		||||
	int nodes=0,kludge=0,newhdr=0,subject=0,pubkey=0;
 | 
			
		||||
	char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	char *extensions = NULL;
 | 
			
		||||
	char *req_exts = NULL;
 | 
			
		||||
	const EVP_CIPHER *cipher=NULL;
 | 
			
		||||
@@ -180,7 +178,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	const EVP_MD *md_alg=NULL,*digest=EVP_md5();
 | 
			
		||||
	unsigned long chtype = MBSTRING_ASC;
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
	MS_STATIC char config_name[256];
 | 
			
		||||
	char *to_free;
 | 
			
		||||
	long errline;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -214,11 +212,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			outformat=str2fmt(*(++argv));
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-key") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
@@ -322,60 +322,8 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				BIO_free(in);
 | 
			
		||||
				in=NULL;
 | 
			
		||||
				newkey=BN_num_bits(dsa_params->p);
 | 
			
		||||
				}
 | 
			
		||||
			else 
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
				if (strncmp("ecdsa:",p,4) == 0)
 | 
			
		||||
				{
 | 
			
		||||
				X509 *xtmp=NULL;
 | 
			
		||||
				EVP_PKEY *dtmp;
 | 
			
		||||
 | 
			
		||||
				pkey_type=TYPE_ECDSA;
 | 
			
		||||
				p+=6;
 | 
			
		||||
				if ((in=BIO_new_file(p,"r")) == NULL)
 | 
			
		||||
					{
 | 
			
		||||
					perror(p);
 | 
			
		||||
					goto end;
 | 
			
		||||
					}
 | 
			
		||||
				if ((ecdsa_params = PEM_read_bio_ECDSAParameters(in, NULL, NULL, NULL)) == NULL)
 | 
			
		||||
					{
 | 
			
		||||
					ERR_clear_error();
 | 
			
		||||
					(void)BIO_reset(in);
 | 
			
		||||
					if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
 | 
			
		||||
						{	
 | 
			
		||||
						BIO_printf(bio_err,"unable to load ECDSA parameters from file\n");
 | 
			
		||||
						goto end;
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
					if ((dtmp=X509_get_pubkey(xtmp)) == NULL) goto end;
 | 
			
		||||
					if (dtmp->type == EVP_PKEY_ECDSA)
 | 
			
		||||
						ecdsa_params = ECDSAParameters_dup(dtmp->pkey.ecdsa);
 | 
			
		||||
					EVP_PKEY_free(dtmp);
 | 
			
		||||
					X509_free(xtmp);
 | 
			
		||||
					if (ecdsa_params == NULL)
 | 
			
		||||
						{
 | 
			
		||||
						BIO_printf(bio_err,"Certificate does not contain ECDSA parameters\n");
 | 
			
		||||
						goto end;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				BIO_free(in);
 | 
			
		||||
				in=NULL;
 | 
			
		||||
				
 | 
			
		||||
				{
 | 
			
		||||
				BIGNUM *order = BN_new();
 | 
			
		||||
				
 | 
			
		||||
				if (!order)
 | 
			
		||||
					goto end;
 | 
			
		||||
				if (!EC_GROUP_get_order(ecdsa_params->group, order, NULL))
 | 
			
		||||
					goto end;
 | 
			
		||||
				newkey = BN_num_bits(order);
 | 
			
		||||
				BN_free(order);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
			else 
 | 
			
		||||
#endif
 | 
			
		||||
@@ -412,6 +360,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			if (!set_name_ex(&nmflag, *(++argv))) goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-reqopt") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			if (!set_cert_ex(&reqflag, *(++argv))) goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-subject") == 0)
 | 
			
		||||
			subject=1;
 | 
			
		||||
		else if (strcmp(*argv,"-text") == 0)
 | 
			
		||||
@@ -479,7 +432,9 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err," -verify        verify signature on REQ\n");
 | 
			
		||||
		BIO_printf(bio_err," -modulus       RSA modulus\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");
 | 
			
		||||
#endif
 | 
			
		||||
		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," -key file      use the private key contained in file\n");
 | 
			
		||||
@@ -490,7 +445,6 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err,"                the random number generator\n");
 | 
			
		||||
		BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n");
 | 
			
		||||
		BIO_printf(bio_err," -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n");
 | 
			
		||||
		BIO_printf(bio_err," -newkey ecdsa:file generate a new ECDSA key, parameters taken from CA in 'file'\n");
 | 
			
		||||
		BIO_printf(bio_err," -[digest]      Digest to sign with (md5, sha1, md2, mdc2, md4)\n");
 | 
			
		||||
		BIO_printf(bio_err," -config file   request template file.\n");
 | 
			
		||||
		BIO_printf(bio_err," -subj arg      set or modify request subject\n");
 | 
			
		||||
@@ -506,6 +460,7 @@ bad:
 | 
			
		||||
		BIO_printf(bio_err," -reqexts ..    specify request extension section (override value in config file)\n");
 | 
			
		||||
		BIO_printf(bio_err," -utf8          input characters are UTF8 (default ASCII)\n");
 | 
			
		||||
		BIO_printf(bio_err," -nameopt arg    - various certificate name options\n");
 | 
			
		||||
		BIO_printf(bio_err," -reqopt arg    - various request text options\n\n");
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -521,14 +476,7 @@ bad:
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		p=getenv("SSLEAY_CONF");
 | 
			
		||||
	if (p == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		strcpy(config_name,X509_get_default_cert_area());
 | 
			
		||||
#ifndef OPENSSL_SYS_VMS
 | 
			
		||||
		strcat(config_name,"/");
 | 
			
		||||
#endif
 | 
			
		||||
		strcat(config_name,OPENSSL_CONF);
 | 
			
		||||
		p=config_name;
 | 
			
		||||
		}
 | 
			
		||||
		p=to_free=make_config_name();
 | 
			
		||||
	default_config_file=p;
 | 
			
		||||
	config=NCONF_new(NULL);
 | 
			
		||||
	i=NCONF_load(config, p, &errline);
 | 
			
		||||
@@ -536,7 +484,7 @@ bad:
 | 
			
		||||
 | 
			
		||||
	if (template != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		long errline;
 | 
			
		||||
		long errline = -1;
 | 
			
		||||
 | 
			
		||||
		if( verbose )
 | 
			
		||||
			BIO_printf(bio_err,"Using configuration from %s\n",template);
 | 
			
		||||
@@ -675,11 +623,13 @@ bad:
 | 
			
		||||
	if ((in == NULL) || (out == NULL))
 | 
			
		||||
		goto end;
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (keyfile != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform, passin, e,
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform, 0, passin, e,
 | 
			
		||||
			"Private Key");
 | 
			
		||||
		if (!pkey)
 | 
			
		||||
			{
 | 
			
		||||
@@ -687,7 +637,7 @@ bad:
 | 
			
		||||
			   message */
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || EVP_PKEY_type(pkey->type) == EVP_PKEY_ECDSA)
 | 
			
		||||
		if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA)
 | 
			
		||||
			{
 | 
			
		||||
			char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
 | 
			
		||||
			if (randfile == NULL)
 | 
			
		||||
@@ -711,15 +661,14 @@ bad:
 | 
			
		||||
				newkey=DEFAULT_KEY_LENGTH;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		if (newkey < MIN_KEY_LENGTH && (pkey_type == TYPE_RSA || pkey_type == TYPE_DSA))
 | 
			
		||||
		/* TODO: appropriate minimal keylength for the different algorithm (esp. ECDSA) */
 | 
			
		||||
		if (newkey < MIN_KEY_LENGTH)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"private key length is too short,\n");
 | 
			
		||||
			BIO_printf(bio_err,"it needs to be at least %d bits, not %d\n",MIN_KEY_LENGTH,newkey);
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		BIO_printf(bio_err,"Generating a %d bit %s private key\n",
 | 
			
		||||
			newkey,(pkey_type == TYPE_RSA)?"RSA":(pkey_type == TYPE_DSA)?"DSA":"ECDSA");
 | 
			
		||||
			newkey,(pkey_type == TYPE_RSA)?"RSA":"DSA");
 | 
			
		||||
 | 
			
		||||
		if ((pkey=EVP_PKEY_new()) == NULL) goto end;
 | 
			
		||||
 | 
			
		||||
@@ -741,14 +690,6 @@ bad:
 | 
			
		||||
			dsa_params=NULL;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
			if (pkey_type == TYPE_ECDSA)
 | 
			
		||||
			{
 | 
			
		||||
			if (!ECDSA_generate_key(ecdsa_params)) goto end;
 | 
			
		||||
			if (!EVP_PKEY_assign_ECDSA(pkey, ecdsa_params)) goto end;
 | 
			
		||||
			ecdsa_params = NULL;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		app_RAND_write_file(randfile, bio_err);
 | 
			
		||||
 | 
			
		||||
@@ -854,10 +795,6 @@ loop:
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_DSA)
 | 
			
		||||
			digest=EVP_dss1();
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_ECDSA)
 | 
			
		||||
			digest=EVP_ecdsa();
 | 
			
		||||
#endif
 | 
			
		||||
		if (req == NULL)
 | 
			
		||||
			{
 | 
			
		||||
@@ -887,14 +824,16 @@ loop:
 | 
			
		||||
			if ((x509ss=X509_new()) == NULL) goto end;
 | 
			
		||||
 | 
			
		||||
			/* Set version to V3 */
 | 
			
		||||
			if(!X509_set_version(x509ss, 2)) goto end;
 | 
			
		||||
			if(extensions && !X509_set_version(x509ss, 2)) goto end;
 | 
			
		||||
			if (serial)
 | 
			
		||||
				{
 | 
			
		||||
				if (!X509_set_serialNumber(x509ss, serial)) goto end;
 | 
			
		||||
				}
 | 
			
		||||
			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;
 | 
			
		||||
@@ -1051,9 +990,9 @@ loop:
 | 
			
		||||
	if (text)
 | 
			
		||||
		{
 | 
			
		||||
		if (x509)
 | 
			
		||||
			X509_print(out,x509ss);
 | 
			
		||||
			X509_print_ex(out, x509ss, nmflag, reqflag);
 | 
			
		||||
		else	
 | 
			
		||||
			X509_REQ_print(out,req);
 | 
			
		||||
			X509_REQ_print_ex(out, req, nmflag, reqflag);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(subject) 
 | 
			
		||||
@@ -1123,6 +1062,10 @@ loop:
 | 
			
		||||
		}
 | 
			
		||||
	ex=0;
 | 
			
		||||
end:
 | 
			
		||||
#ifndef MONOLITH
 | 
			
		||||
	if(to_free)
 | 
			
		||||
		OPENSSL_free(to_free);
 | 
			
		||||
#endif
 | 
			
		||||
	if (ex)
 | 
			
		||||
		{
 | 
			
		||||
		ERR_print_errors(bio_err);
 | 
			
		||||
@@ -1139,12 +1082,9 @@ end:
 | 
			
		||||
	OBJ_cleanup();
 | 
			
		||||
#ifndef OPENSSL_NO_DSA
 | 
			
		||||
	if (dsa_params != NULL) DSA_free(dsa_params);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ECDSA
 | 
			
		||||
	if (ecdsa_params != NULL) ECDSA_free(ecdsa_params);
 | 
			
		||||
#endif
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ex);
 | 
			
		||||
	OPENSSL_EXIT(ex);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
 | 
			
		||||
@@ -1285,27 +1225,39 @@ start:		for (;;)
 | 
			
		||||
				}
 | 
			
		||||
			/* If OBJ not recognised ignore it */
 | 
			
		||||
			if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
 | 
			
		||||
			sprintf(buf,"%s_default",v->name);
 | 
			
		||||
			if (BIO_snprintf(buf,sizeof buf,"%s_default",v->name)
 | 
			
		||||
				>= sizeof buf)
 | 
			
		||||
			   {
 | 
			
		||||
			   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
			
		||||
			   return 0;
 | 
			
		||||
			   }
 | 
			
		||||
 | 
			
		||||
			if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
 | 
			
		||||
				{
 | 
			
		||||
				ERR_clear_error();
 | 
			
		||||
				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)
 | 
			
		||||
				{
 | 
			
		||||
				ERR_clear_error();
 | 
			
		||||
				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))
 | 
			
		||||
				{
 | 
			
		||||
				ERR_clear_error();
 | 
			
		||||
				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))
 | 
			
		||||
				{
 | 
			
		||||
				ERR_clear_error();
 | 
			
		||||
				n_max = -1;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			if (!add_DN_object(subj,v->value,def,value,nid,
 | 
			
		||||
				n_min,n_max, chtype))
 | 
			
		||||
@@ -1338,7 +1290,13 @@ start2:			for (;;)
 | 
			
		||||
				if ((nid=OBJ_txt2nid(type)) == NID_undef)
 | 
			
		||||
					goto start2;
 | 
			
		||||
 | 
			
		||||
				sprintf(buf,"%s_default",type);
 | 
			
		||||
				if (BIO_snprintf(buf,sizeof buf,"%s_default",type)
 | 
			
		||||
					>= sizeof buf)
 | 
			
		||||
				   {
 | 
			
		||||
				   BIO_printf(bio_err,"Name '%s' too long\n",v->name);
 | 
			
		||||
				   return 0;
 | 
			
		||||
				   }
 | 
			
		||||
 | 
			
		||||
				if ((def=NCONF_get_string(req_conf,attr_sect,buf))
 | 
			
		||||
					== NULL)
 | 
			
		||||
					{
 | 
			
		||||
@@ -1347,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))
 | 
			
		||||
					== NULL)
 | 
			
		||||
					{
 | 
			
		||||
@@ -1355,11 +1313,11 @@ start2:			for (;;)
 | 
			
		||||
					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))
 | 
			
		||||
					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))
 | 
			
		||||
					n_max = -1;
 | 
			
		||||
 | 
			
		||||
@@ -1441,8 +1399,8 @@ start:
 | 
			
		||||
	(void)BIO_flush(bio_err);
 | 
			
		||||
	if(value != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		strcpy(buf,value);
 | 
			
		||||
		strcat(buf,"\n");
 | 
			
		||||
		BUF_strlcpy(buf,value,sizeof buf);
 | 
			
		||||
		BUF_strlcat(buf,"\n",sizeof buf);
 | 
			
		||||
		BIO_printf(bio_err,"%s\n",value);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
@@ -1450,7 +1408,7 @@ start:
 | 
			
		||||
		buf[0]='\0';
 | 
			
		||||
		if (!batch)
 | 
			
		||||
			{
 | 
			
		||||
			fgets(buf,1024,stdin);
 | 
			
		||||
			fgets(buf,sizeof buf,stdin);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
@@ -1464,8 +1422,8 @@ start:
 | 
			
		||||
		{
 | 
			
		||||
		if ((def == NULL) || (def[0] == '\0'))
 | 
			
		||||
			return(1);
 | 
			
		||||
		strcpy(buf,def);
 | 
			
		||||
		strcat(buf,"\n");
 | 
			
		||||
		BUF_strlcpy(buf,def,sizeof buf);
 | 
			
		||||
		BUF_strlcat(buf,"\n",sizeof buf);
 | 
			
		||||
		}
 | 
			
		||||
	else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
 | 
			
		||||
 | 
			
		||||
@@ -1499,8 +1457,8 @@ start:
 | 
			
		||||
	(void)BIO_flush(bio_err);
 | 
			
		||||
	if (value != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		strcpy(buf,value);
 | 
			
		||||
		strcat(buf,"\n");
 | 
			
		||||
		BUF_strlcpy(buf,value,sizeof buf);
 | 
			
		||||
		BUF_strlcat(buf,"\n",sizeof buf);
 | 
			
		||||
		BIO_printf(bio_err,"%s\n",value);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
@@ -1508,7 +1466,7 @@ start:
 | 
			
		||||
		buf[0]='\0';
 | 
			
		||||
		if (!batch)
 | 
			
		||||
			{
 | 
			
		||||
			fgets(buf,1024,stdin);
 | 
			
		||||
			fgets(buf,sizeof buf,stdin);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
@@ -1522,8 +1480,8 @@ start:
 | 
			
		||||
		{
 | 
			
		||||
		if ((def == NULL) || (def[0] == '\0'))
 | 
			
		||||
			return(1);
 | 
			
		||||
		strcpy(buf,def);
 | 
			
		||||
		strcat(buf,"\n");
 | 
			
		||||
		BUF_strlcpy(buf,def,sizeof buf);
 | 
			
		||||
		BUF_strlcat(buf,"\n",sizeof buf);
 | 
			
		||||
		}
 | 
			
		||||
	else if ((buf[0] == '.') && (buf[1] == '\n')) return(1);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								apps/rsa.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								apps/rsa.c
									
									
									
									
									
								
							@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	char *infile,*outfile,*prog;
 | 
			
		||||
	char *passargin = NULL, *passargout = NULL;
 | 
			
		||||
	char *passin = NULL, *passout = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	int modulus=0;
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
@@ -156,11 +158,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			passargout= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-sgckey") == 0)
 | 
			
		||||
			sgckey=1;
 | 
			
		||||
		else if (strcmp(*argv,"-pubin") == 0)
 | 
			
		||||
@@ -212,13 +216,17 @@ bad:
 | 
			
		||||
		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," -pubout         output a public key\n");
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		BIO_printf(bio_err," -engine e       use engine e, possibly a hardware device.\n");
 | 
			
		||||
#endif
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	ERR_load_crypto_strings();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
 | 
			
		||||
		BIO_printf(bio_err, "Error getting passwords\n");
 | 
			
		||||
@@ -238,12 +246,12 @@ bad:
 | 
			
		||||
		if (pubin)
 | 
			
		||||
			pkey = load_pubkey(bio_err, infile,
 | 
			
		||||
				(informat == FORMAT_NETSCAPE && sgckey ?
 | 
			
		||||
					FORMAT_IISSGC : informat),
 | 
			
		||||
					FORMAT_IISSGC : informat), 1,
 | 
			
		||||
				passin, e, "Public Key");
 | 
			
		||||
		else
 | 
			
		||||
			pkey = load_key(bio_err, infile,
 | 
			
		||||
				(informat == FORMAT_NETSCAPE && sgckey ?
 | 
			
		||||
					FORMAT_IISSGC : informat),
 | 
			
		||||
					FORMAT_IISSGC : informat), 1,
 | 
			
		||||
				passin, e, "Private Key");
 | 
			
		||||
 | 
			
		||||
		if (pkey != NULL)
 | 
			
		||||
@@ -369,7 +377,7 @@ end:
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	if(passout) OPENSSL_free(passout);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
#else /* !OPENSSL_NO_RSA */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
	BIO *in = NULL, *out = NULL;
 | 
			
		||||
	char *infile = NULL, *outfile = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	char *keyfile = NULL;
 | 
			
		||||
	char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
 | 
			
		||||
	int keyform = FORMAT_PEM;
 | 
			
		||||
@@ -95,6 +97,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	EVP_PKEY *pkey = NULL;
 | 
			
		||||
	RSA *rsa = NULL;
 | 
			
		||||
	unsigned char *rsa_in = NULL, *rsa_out = NULL, pad;
 | 
			
		||||
	char *passargin = NULL, *passin = NULL;
 | 
			
		||||
	int rsa_inlen, rsa_outlen = 0;
 | 
			
		||||
	int keysize;
 | 
			
		||||
 | 
			
		||||
@@ -122,12 +125,17 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		} else if(!strcmp(*argv, "-inkey")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			keyfile = *(++argv);
 | 
			
		||||
		} else if (!strcmp(*argv,"-passin")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			passargin= *(++argv);
 | 
			
		||||
		} else if (strcmp(*argv,"-keyform") == 0) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			keyform=str2fmt(*(++argv));
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		} else if(!strcmp(*argv, "-engine")) {
 | 
			
		||||
			if (--argc < 1) badarg = 1;
 | 
			
		||||
			engine = *(++argv);
 | 
			
		||||
#endif
 | 
			
		||||
		} else if(!strcmp(*argv, "-pubin")) {
 | 
			
		||||
			key_type = KEY_PUBKEY;
 | 
			
		||||
		} else if(!strcmp(*argv, "-certin")) {
 | 
			
		||||
@@ -162,19 +170,25 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        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 */
 | 
			
		||||
	app_RAND_load_file(NULL, bio_err, 0);
 | 
			
		||||
	
 | 
			
		||||
	switch(key_type) {
 | 
			
		||||
		case KEY_PRIVKEY:
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform,
 | 
			
		||||
			NULL, e, "Private Key");
 | 
			
		||||
		pkey = load_key(bio_err, keyfile, keyform, 0,
 | 
			
		||||
			passin, e, "Private Key");
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case KEY_PUBKEY:
 | 
			
		||||
		pkey = load_pubkey(bio_err, keyfile, keyform,
 | 
			
		||||
		pkey = load_pubkey(bio_err, keyfile, keyform, 0,
 | 
			
		||||
			NULL, e, "Public Key");
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
@@ -284,6 +298,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	BIO_free_all(out);
 | 
			
		||||
	if(rsa_in) OPENSSL_free(rsa_in);
 | 
			
		||||
	if(rsa_out) OPENSSL_free(rsa_out);
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	return ret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -305,7 +320,10 @@ static void usage()
 | 
			
		||||
	BIO_printf(bio_err, "-encrypt        encrypt with public key\n");
 | 
			
		||||
	BIO_printf(bio_err, "-decrypt        decrypt with private key\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, "-passin arg    pass phrase source\n");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -112,6 +112,14 @@
 | 
			
		||||
#include <sys/types.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)
 | 
			
		||||
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
 | 
			
		||||
/* These definitions are borrowed from SOCKETSHR.	/Richard Levitte */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								apps/s_cb.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/s_cb.c
									
									
									
									
									
								
							@@ -134,7 +134,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
 | 
			
		||||
	err=	X509_STORE_CTX_get_error(ctx);
 | 
			
		||||
	depth=	X509_STORE_CTX_get_error_depth(ctx);
 | 
			
		||||
 | 
			
		||||
	X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256);
 | 
			
		||||
	X509_NAME_oneline(X509_get_subject_name(err_cert),buf,sizeof buf);
 | 
			
		||||
	BIO_printf(bio_err,"depth=%d %s\n",depth,buf);
 | 
			
		||||
	if (!ok)
 | 
			
		||||
		{
 | 
			
		||||
@@ -154,7 +154,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
 | 
			
		||||
	switch (ctx->error)
 | 
			
		||||
		{
 | 
			
		||||
	case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,256);
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,sizeof buf);
 | 
			
		||||
		BIO_printf(bio_err,"issuer= %s\n",buf);
 | 
			
		||||
		break;
 | 
			
		||||
	case X509_V_ERR_CERT_NOT_YET_VALID:
 | 
			
		||||
@@ -239,18 +239,16 @@ long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, int argi,
 | 
			
		||||
 | 
			
		||||
	if (cmd == (BIO_CB_READ|BIO_CB_RETURN))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(out,"read from %08X [%08lX] (%d bytes => %ld (0x%X))\n\n",
 | 
			
		||||
		BIO_printf(out,"read from %08X [%08lX] (%d bytes => %ld (0x%X))\n",
 | 
			
		||||
			bio,argp,argi,ret,ret);
 | 
			
		||||
		BIO_dump(out,argp,(int)ret);
 | 
			
		||||
		BIO_printf(out,"\n");
 | 
			
		||||
		return(ret);
 | 
			
		||||
		}
 | 
			
		||||
	else if (cmd == (BIO_CB_WRITE|BIO_CB_RETURN))
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(out,"write to %08X [%08lX] (%d bytes => %ld (0x%X))\n\n",
 | 
			
		||||
		BIO_printf(out,"write to %08X [%08lX] (%d bytes => %ld (0x%X))\n",
 | 
			
		||||
			bio,argp,argi,ret,ret);
 | 
			
		||||
		BIO_dump(out,argp,(int)ret);
 | 
			
		||||
		BIO_printf(out,"\n");
 | 
			
		||||
		}
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
@@ -268,7 +266,7 @@ void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret)
 | 
			
		||||
 | 
			
		||||
	if (where & SSL_CB_LOOP)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err,"%s:%s\n\n",str,SSL_state_string_long(s));
 | 
			
		||||
		BIO_printf(bio_err,"%s:%s\n",str,SSL_state_string_long(s));
 | 
			
		||||
		}
 | 
			
		||||
	else if (where & SSL_CB_ALERT)
 | 
			
		||||
		{
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										132
									
								
								apps/s_client.c
									
									
									
									
									
								
							
							
						
						
									
										132
									
								
								apps/s_client.c
									
									
									
									
									
								
							@@ -136,15 +136,15 @@ typedef unsigned int u_int;
 | 
			
		||||
#include <openssl/rand.h>
 | 
			
		||||
#include "s_apps.h"
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#include <conio.h>
 | 
			
		||||
#ifdef OPENSSL_SYS_WINCE
 | 
			
		||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
			
		||||
#ifdef fileno
 | 
			
		||||
#undef fileno
 | 
			
		||||
#endif
 | 
			
		||||
#define fileno(a) (int)_fileno(a)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
#include "term_sock.h"
 | 
			
		||||
#endif
 | 
			
		||||
      
 | 
			
		||||
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 | 
			
		||||
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 | 
			
		||||
#undef FIONBIO
 | 
			
		||||
@@ -217,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,"                 for those protocols that support it, where\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 'prot' defines which one to assume.  Currently,\n");
 | 
			
		||||
	BIO_printf(bio_err,"                 only \"smtp\" 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");
 | 
			
		||||
#endif
 | 
			
		||||
	BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
@@ -245,19 +247,17 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
 | 
			
		||||
	SSL_CTX *ctx=NULL;
 | 
			
		||||
	int ret=1,in_init=1,i,nbio_test=0;
 | 
			
		||||
	int smtp_starttls = 0;
 | 
			
		||||
	int starttls_proto = 0;
 | 
			
		||||
	int prexit = 0, vflags = 0;
 | 
			
		||||
	SSL_METHOD *meth=NULL;
 | 
			
		||||
	BIO *sbio;
 | 
			
		||||
	char *inrand=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine_id=NULL;
 | 
			
		||||
	ENGINE *e=NULL;
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
	struct timeval tv;
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
        int stdin_sock;
 | 
			
		||||
        TerminalSocket (TERM_SOCK_CREATE, &stdin_sock);
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
	struct timeval tv;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
@@ -411,15 +411,19 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			++argv;
 | 
			
		||||
			if (strcmp(*argv,"smtp") == 0)
 | 
			
		||||
				smtp_starttls = 1;
 | 
			
		||||
				starttls_proto = 1;
 | 
			
		||||
			else if (strcmp(*argv,"pop3") == 0)
 | 
			
		||||
				starttls_proto = 2;
 | 
			
		||||
			else
 | 
			
		||||
				goto bad;
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if	(strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine_id = *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
@@ -441,13 +445,20 @@ bad:
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	OpenSSL_add_ssl_algorithms();
 | 
			
		||||
	SSL_load_error_strings();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine_id, 1);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
 | 
			
		||||
		&& !RAND_status())
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n\n");
 | 
			
		||||
		BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n");
 | 
			
		||||
		}
 | 
			
		||||
	if (inrand != NULL)
 | 
			
		||||
		BIO_printf(bio_err,"%ld semi-random bytes loaded\n\n",
 | 
			
		||||
		BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
 | 
			
		||||
			app_RAND_load_files(inrand));
 | 
			
		||||
 | 
			
		||||
	if (bio_c_out == NULL)
 | 
			
		||||
@@ -463,11 +474,6 @@ bad:
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	OpenSSL_add_ssl_algorithms();
 | 
			
		||||
	SSL_load_error_strings();
 | 
			
		||||
 | 
			
		||||
        e = setup_engine(bio_err, engine_id, 1);
 | 
			
		||||
 | 
			
		||||
	ctx=SSL_CTX_new(meth);
 | 
			
		||||
	if (ctx == NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -524,7 +530,7 @@ re_start:
 | 
			
		||||
		SHUTDOWN(s);
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
	BIO_printf(bio_c_out,"CONNECTED(%08X)\n\n",s);
 | 
			
		||||
	BIO_printf(bio_c_out,"CONNECTED(%08X)\n",s);
 | 
			
		||||
 | 
			
		||||
#ifdef FIONBIO
 | 
			
		||||
	if (c_nbio)
 | 
			
		||||
@@ -565,11 +571,6 @@ re_start:
 | 
			
		||||
	SSL_set_connect_state(con);
 | 
			
		||||
 | 
			
		||||
	/* ok, lets connect */
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
        if (stdin_sock > SSL_get_fd(con))
 | 
			
		||||
            width=stdin_sock+1;
 | 
			
		||||
        else
 | 
			
		||||
#endif
 | 
			
		||||
	width=SSL_get_fd(con)+1;
 | 
			
		||||
 | 
			
		||||
	read_tty=1;
 | 
			
		||||
@@ -584,12 +585,18 @@ re_start:
 | 
			
		||||
	sbuf_off=0;
 | 
			
		||||
 | 
			
		||||
	/* This is an ugly hack that does a lot of assumptions */
 | 
			
		||||
	if (smtp_starttls)
 | 
			
		||||
	if (starttls_proto == 1)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_read(sbio,mbuf,BUFSIZZ);
 | 
			
		||||
		BIO_printf(sbio,"STARTTLS\r\n");
 | 
			
		||||
		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 (;;)
 | 
			
		||||
		{
 | 
			
		||||
@@ -610,11 +617,11 @@ re_start:
 | 
			
		||||
				print_stuff(bio_c_out,con,full_log);
 | 
			
		||||
				if (full_log > 0) full_log--;
 | 
			
		||||
 | 
			
		||||
				if (smtp_starttls)
 | 
			
		||||
				if (starttls_proto)
 | 
			
		||||
					{
 | 
			
		||||
					BIO_printf(bio_err,"%s",mbuf);
 | 
			
		||||
					/* We don't need to know any more */
 | 
			
		||||
					smtp_starttls = 0;
 | 
			
		||||
					starttls_proto = 0;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				if (reconnect)
 | 
			
		||||
@@ -633,15 +640,11 @@ re_start:
 | 
			
		||||
 | 
			
		||||
		if (!ssl_pending)
 | 
			
		||||
			{
 | 
			
		||||
#ifndef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
			if (tty_on)
 | 
			
		||||
				{
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                                if (read_tty)  FD_SET(stdin_sock,&readfds);
 | 
			
		||||
#else
 | 
			
		||||
				if (read_tty)  FD_SET(fileno(stdin),&readfds);
 | 
			
		||||
				if (write_tty) FD_SET(fileno(stdout),&writefds);
 | 
			
		||||
#endif
 | 
			
		||||
				}
 | 
			
		||||
			if (read_ssl)
 | 
			
		||||
				FD_SET(SSL_get_fd(con),&readfds);
 | 
			
		||||
@@ -664,8 +667,8 @@ re_start:
 | 
			
		||||
			 * will choke the compiler: if you do have a cast then
 | 
			
		||||
			 * you can either go for (int *) or (void *).
 | 
			
		||||
			 */
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
			/* Under Windows we make the assumption that we can
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
                        /* Under Windows/DOS we make the assumption that we can
 | 
			
		||||
			 * always write to the tty: therefore if we need to
 | 
			
		||||
			 * write to the tty we just fall through. Otherwise
 | 
			
		||||
			 * we timeout the select every second and see if there
 | 
			
		||||
@@ -679,7 +682,11 @@ re_start:
 | 
			
		||||
					tv.tv_usec = 0;
 | 
			
		||||
					i=select(width,(void *)&readfds,(void *)&writefds,
 | 
			
		||||
						 NULL,&tv);
 | 
			
		||||
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
					if(!i && (!_kbhit() || !read_tty) ) continue;
 | 
			
		||||
#else
 | 
			
		||||
					if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
 | 
			
		||||
#endif
 | 
			
		||||
				} else 	i=select(width,(void *)&readfds,(void *)&writefds,
 | 
			
		||||
					 NULL,NULL);
 | 
			
		||||
			}
 | 
			
		||||
@@ -763,8 +770,8 @@ re_start:
 | 
			
		||||
				goto shut;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VMS)
 | 
			
		||||
		/* Assume Windows can always write */
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
		/* Assume Windows/DOS can always write */
 | 
			
		||||
		else if (!ssl_pending && write_tty)
 | 
			
		||||
#else
 | 
			
		||||
		else if (!ssl_pending && FD_ISSET(fileno(stdout),&writefds))
 | 
			
		||||
@@ -822,7 +829,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
 | 
			
		||||
				read_tty=0;
 | 
			
		||||
				break;
 | 
			
		||||
			case SSL_ERROR_WANT_READ:
 | 
			
		||||
				BIO_printf(bio_c_out,"read R BLOCK\n\n");
 | 
			
		||||
				BIO_printf(bio_c_out,"read R BLOCK\n");
 | 
			
		||||
				write_tty=0;
 | 
			
		||||
				read_ssl=1;
 | 
			
		||||
				if ((read_tty == 0) && (write_ssl == 0))
 | 
			
		||||
@@ -844,25 +851,21 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
		else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
		else if (_kbhit())
 | 
			
		||||
#else
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                else if (FD_ISSET(stdin_sock,&readfds))
 | 
			
		||||
		else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
 | 
			
		||||
#endif
 | 
			
		||||
#else
 | 
			
		||||
		else if (FD_ISSET(fileno(stdin),&readfds))
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
			{
 | 
			
		||||
			if (crlf)
 | 
			
		||||
				{
 | 
			
		||||
				int j, lf_num;
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                                i=recv(stdin_sock,cbuf,BUFSIZZ/2,0);
 | 
			
		||||
#else
 | 
			
		||||
				i=read(fileno(stdin),cbuf,BUFSIZZ/2);
 | 
			
		||||
#endif
 | 
			
		||||
				lf_num = 0;
 | 
			
		||||
				/* both loops are skipped when i <= 0 */
 | 
			
		||||
				for (j = 0; j < i; j++)
 | 
			
		||||
@@ -881,11 +884,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
 | 
			
		||||
				assert(lf_num == 0);
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                                i=recv(stdin_sock,cbuf,BUFSIZZ,0);
 | 
			
		||||
#else
 | 
			
		||||
				i=read(fileno(stdin),cbuf,BUFSIZZ);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
			if ((!c_ign_eof) && ((i <= 0) || (cbuf[0] == 'Q')))
 | 
			
		||||
				{
 | 
			
		||||
@@ -921,19 +920,16 @@ end:
 | 
			
		||||
	if (con != NULL) SSL_free(con);
 | 
			
		||||
	if (con2 != NULL) SSL_free(con2);
 | 
			
		||||
	if (ctx != NULL) SSL_CTX_free(ctx);
 | 
			
		||||
	if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
 | 
			
		||||
	if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
 | 
			
		||||
	if (mbuf != NULL) { memset(mbuf,0,BUFSIZZ); OPENSSL_free(mbuf); }
 | 
			
		||||
	if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
 | 
			
		||||
	if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
 | 
			
		||||
	if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
 | 
			
		||||
	if (bio_c_out != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_free(bio_c_out);
 | 
			
		||||
		bio_c_out=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
        TerminalSocket (TERM_SOCK_DELETE, &stdin_sock);
 | 
			
		||||
#endif
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -962,11 +958,11 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
			for (i=0; i<sk_X509_num(sk); i++)
 | 
			
		||||
				{
 | 
			
		||||
				X509_NAME_oneline(X509_get_subject_name(
 | 
			
		||||
					sk_X509_value(sk,i)),buf,BUFSIZ);
 | 
			
		||||
					sk_X509_value(sk,i)),buf,sizeof buf);
 | 
			
		||||
				BIO_printf(bio,"%2d s:%s\n",i,buf);
 | 
			
		||||
				X509_NAME_oneline(X509_get_issuer_name(
 | 
			
		||||
					sk_X509_value(sk,i)),buf,BUFSIZ);
 | 
			
		||||
				BIO_printf(bio,"   i:%s\n\n",buf);
 | 
			
		||||
					sk_X509_value(sk,i)),buf,sizeof buf);
 | 
			
		||||
				BIO_printf(bio,"   i:%s\n",buf);
 | 
			
		||||
				if (c_showcerts)
 | 
			
		||||
					PEM_write_bio_X509(bio,sk_X509_value(sk,i));
 | 
			
		||||
				}
 | 
			
		||||
@@ -980,10 +976,10 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
			if (!(c_showcerts && got_a_chain)) /* Redundant if we showed the whole chain */
 | 
			
		||||
				PEM_write_bio_X509(bio,peer);
 | 
			
		||||
			X509_NAME_oneline(X509_get_subject_name(peer),
 | 
			
		||||
				buf,BUFSIZ);
 | 
			
		||||
				buf,sizeof buf);
 | 
			
		||||
			BIO_printf(bio,"subject=%s\n",buf);
 | 
			
		||||
			X509_NAME_oneline(X509_get_issuer_name(peer),
 | 
			
		||||
				buf,BUFSIZ);
 | 
			
		||||
				buf,sizeof buf);
 | 
			
		||||
			BIO_printf(bio,"issuer=%s\n",buf);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
@@ -1005,7 +1001,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio,"---\nNo client certificate CA names sent\n");
 | 
			
		||||
			}
 | 
			
		||||
		p=SSL_get_shared_ciphers(s,buf,BUFSIZ);
 | 
			
		||||
		p=SSL_get_shared_ciphers(s,buf,sizeof buf);
 | 
			
		||||
		if (p != NULL)
 | 
			
		||||
			{
 | 
			
		||||
			/* This works only for SSL 2.  In later protocol
 | 
			
		||||
@@ -1040,7 +1036,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
		}
 | 
			
		||||
	BIO_printf(bio,((s->hit)?"---\nReused, ":"---\nNew, "));
 | 
			
		||||
	c=SSL_get_current_cipher(s);
 | 
			
		||||
	BIO_printf(bio,"%s, Cipher is %s\n\n",
 | 
			
		||||
	BIO_printf(bio,"%s, Cipher is %s\n",
 | 
			
		||||
		SSL_CIPHER_get_version(c),
 | 
			
		||||
		SSL_CIPHER_get_name(c));
 | 
			
		||||
	if (peer != NULL) {
 | 
			
		||||
@@ -1051,7 +1047,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 | 
			
		||||
		EVP_PKEY_free(pktmp);
 | 
			
		||||
	}
 | 
			
		||||
	SSL_SESSION_print(bio,SSL_get_session(s));
 | 
			
		||||
	BIO_printf(bio,"---\n\n");
 | 
			
		||||
	BIO_printf(bio,"---\n");
 | 
			
		||||
	if (peer != NULL)
 | 
			
		||||
		X509_free(peer);
 | 
			
		||||
	/* flush, or debugging output gets mixed with http response */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										122
									
								
								apps/s_server.c
									
									
									
									
									
								
							
							
						
						
									
										122
									
								
								apps/s_server.c
									
									
									
									
									
								
							@@ -140,12 +140,12 @@ typedef unsigned int u_int;
 | 
			
		||||
#include <openssl/rand.h>
 | 
			
		||||
#include "s_apps.h"
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#include <conio.h>
 | 
			
		||||
#ifdef OPENSSL_SYS_WINCE
 | 
			
		||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
 | 
			
		||||
#ifdef fileno
 | 
			
		||||
#undef fileno
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
#include "term_sock.h"
 | 
			
		||||
#define fileno(a) (int)_fileno(a)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 | 
			
		||||
@@ -238,7 +238,9 @@ static int s_msg=0;
 | 
			
		||||
static int s_quiet=0;
 | 
			
		||||
 | 
			
		||||
static int hack=0;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
static char *engine_id=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
static const char *session_id_prefix=NULL;
 | 
			
		||||
 | 
			
		||||
#ifdef MONOLITH
 | 
			
		||||
@@ -263,7 +265,9 @@ static void s_server_init(void)
 | 
			
		||||
	s_msg=0;
 | 
			
		||||
	s_quiet=0;
 | 
			
		||||
	hack=0;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	engine_id=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -312,7 +316,9 @@ static void sv_usage(void)
 | 
			
		||||
	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,"                 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");
 | 
			
		||||
#endif
 | 
			
		||||
	BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
 | 
			
		||||
	BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
 | 
			
		||||
	}
 | 
			
		||||
@@ -324,10 +330,10 @@ static char **local_argv;
 | 
			
		||||
static int ebcdic_new(BIO *bi);
 | 
			
		||||
static int ebcdic_free(BIO *a);
 | 
			
		||||
static int ebcdic_read(BIO *b, char *out, int outl);
 | 
			
		||||
static int ebcdic_write(BIO *b, char *in, int inl);
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr);
 | 
			
		||||
static int ebcdic_write(BIO *b, const char *in, int inl);
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr);
 | 
			
		||||
static int ebcdic_gets(BIO *bp, char *buf, int size);
 | 
			
		||||
static int ebcdic_puts(BIO *bp, char *str);
 | 
			
		||||
static int ebcdic_puts(BIO *bp, const char *str);
 | 
			
		||||
 | 
			
		||||
#define BIO_TYPE_EBCDIC_FILTER	(18|0x0200)
 | 
			
		||||
static BIO_METHOD methods_ebcdic=
 | 
			
		||||
@@ -392,7 +398,7 @@ static int ebcdic_read(BIO *b, char *out, int outl)
 | 
			
		||||
	return(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int ebcdic_write(BIO *b, char *in, int inl)
 | 
			
		||||
static int ebcdic_write(BIO *b, const char *in, int inl)
 | 
			
		||||
{
 | 
			
		||||
	EBCDIC_OUTBUFF *wbuf;
 | 
			
		||||
	int ret=0;
 | 
			
		||||
@@ -425,7 +431,7 @@ static int ebcdic_write(BIO *b, char *in, int inl)
 | 
			
		||||
	return(ret);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
 | 
			
		||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr)
 | 
			
		||||
{
 | 
			
		||||
	long ret;
 | 
			
		||||
 | 
			
		||||
@@ -444,7 +450,7 @@ static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
 | 
			
		||||
 | 
			
		||||
static int ebcdic_gets(BIO *bp, char *buf, int size)
 | 
			
		||||
{
 | 
			
		||||
	int i, ret;
 | 
			
		||||
	int i, ret=0;
 | 
			
		||||
	if (bp->next_bio == NULL) return(0);
 | 
			
		||||
/*	return(BIO_gets(bp->next_bio,buf,size));*/
 | 
			
		||||
	for (i=0; i<size-1; ++i)
 | 
			
		||||
@@ -463,7 +469,7 @@ static int ebcdic_gets(BIO *bp, char *buf, int size)
 | 
			
		||||
	return (ret < 0 && i == 0) ? ret : i;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int ebcdic_puts(BIO *bp, char *str)
 | 
			
		||||
static int ebcdic_puts(BIO *bp, const char *str)
 | 
			
		||||
{
 | 
			
		||||
	if (bp->next_bio == NULL) return(0);
 | 
			
		||||
	return ebcdic_write(bp, str, strlen(str));
 | 
			
		||||
@@ -486,7 +492,9 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
	int no_tmp_rsa=0,no_dhe=0,nocert=0;
 | 
			
		||||
	int state=0;
 | 
			
		||||
	SSL_METHOD *meth=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	char *inrand=NULL;
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 | 
			
		||||
@@ -661,11 +669,13 @@ int MAIN(int argc, char *argv[])
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			session_id_prefix = *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine_id= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-rand") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
@@ -687,6 +697,13 @@ bad:
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	SSL_load_error_strings();
 | 
			
		||||
	OpenSSL_add_ssl_algorithms();
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine_id, 1);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
 | 
			
		||||
		&& !RAND_status())
 | 
			
		||||
		{
 | 
			
		||||
@@ -709,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)
 | 
			
		||||
#endif
 | 
			
		||||
		{
 | 
			
		||||
@@ -719,11 +736,6 @@ bad:
 | 
			
		||||
		s_dkey_file=NULL;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	SSL_load_error_strings();
 | 
			
		||||
	OpenSSL_add_ssl_algorithms();
 | 
			
		||||
 | 
			
		||||
        e = setup_engine(bio_err, engine_id, 1);
 | 
			
		||||
 | 
			
		||||
	ctx=SSL_CTX_new(meth);
 | 
			
		||||
	if (ctx == NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -831,7 +843,7 @@ bad:
 | 
			
		||||
			goto end;
 | 
			
		||||
			}
 | 
			
		||||
		RSA_free(rsa);
 | 
			
		||||
		BIO_printf(bio_s_out,"\n\n");
 | 
			
		||||
		BIO_printf(bio_s_out,"\n");
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
@@ -864,7 +876,7 @@ end:
 | 
			
		||||
		bio_s_out=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
 | 
			
		||||
@@ -887,7 +899,7 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
 | 
			
		||||
	BIO_printf(bio,"%4d session cache misses\n",SSL_CTX_sess_misses(ssl_ctx));
 | 
			
		||||
	BIO_printf(bio,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ssl_ctx));
 | 
			
		||||
	BIO_printf(bio,"%4d callback cache hits\n",SSL_CTX_sess_cb_hits(ssl_ctx));
 | 
			
		||||
	BIO_printf(bio,"%4d cache full overflows (%d allowed)\n\n",
 | 
			
		||||
	BIO_printf(bio,"%4d cache full overflows (%d allowed)\n",
 | 
			
		||||
		SSL_CTX_sess_cache_full(ssl_ctx),
 | 
			
		||||
		SSL_CTX_sess_get_cache_size(ssl_ctx));
 | 
			
		||||
	}
 | 
			
		||||
@@ -901,14 +913,9 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
	unsigned long l;
 | 
			
		||||
	SSL *con=NULL;
 | 
			
		||||
	BIO *sbio;
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
	struct timeval tv;
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
        int stdin_sock;
 | 
			
		||||
 | 
			
		||||
        TerminalSocket (TERM_SOCK_CREATE, &stdin_sock);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if ((buf=OPENSSL_malloc(bufsize)) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -968,11 +975,6 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
		SSL_set_msg_callback_arg(con, bio_s_out);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
        if (stdin_sock > s)
 | 
			
		||||
            width = stdin_sock + 1;
 | 
			
		||||
        else
 | 
			
		||||
#endif
 | 
			
		||||
	width=s+1;
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
@@ -985,12 +987,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
		if (!read_from_sslcon)
 | 
			
		||||
			{
 | 
			
		||||
			FD_ZERO(&readfds);
 | 
			
		||||
#ifndef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                        FD_SET(stdin_sock,&readfds);
 | 
			
		||||
#else
 | 
			
		||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
			FD_SET(fileno(stdin),&readfds);
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
			FD_SET(s,&readfds);
 | 
			
		||||
			/* Note: under VMS with SOCKETSHR the second parameter is
 | 
			
		||||
@@ -999,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
 | 
			
		||||
			 * go for (int *) or (void *).
 | 
			
		||||
			 */
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
			/* Under Windows we can't select on stdin: only
 | 
			
		||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
 | 
			
		||||
                        /* Under DOS (non-djgpp) and Windows we can't select on stdin: only
 | 
			
		||||
			 * on sockets. As a workaround we timeout the select every
 | 
			
		||||
			 * second and check for any keypress. In a proper Windows
 | 
			
		||||
			 * application we wouldn't do this because it is inefficient.
 | 
			
		||||
@@ -1014,11 +1012,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
#else
 | 
			
		||||
			i=select(width,(void *)&readfds,NULL,NULL,NULL);
 | 
			
		||||
			if (i <= 0) continue;
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                        if (FD_ISSET(stdin_sock,&readfds))
 | 
			
		||||
#else
 | 
			
		||||
			if (FD_ISSET(fileno(stdin),&readfds))
 | 
			
		||||
#endif
 | 
			
		||||
				read_from_terminal = 1;
 | 
			
		||||
#endif
 | 
			
		||||
			if (FD_ISSET(s,&readfds))
 | 
			
		||||
@@ -1030,11 +1024,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
				{
 | 
			
		||||
				int j, lf_num;
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                                i=recv(stdin_sock, buf, bufsize/2, 0);
 | 
			
		||||
#else
 | 
			
		||||
				i=read(fileno(stdin), buf, bufsize/2);
 | 
			
		||||
#endif
 | 
			
		||||
				lf_num = 0;
 | 
			
		||||
				/* both loops are skipped when i <= 0 */
 | 
			
		||||
				for (j = 0; j < i; j++)
 | 
			
		||||
@@ -1053,11 +1043,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
				assert(lf_num == 0);
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
                                i=recv(stdin_sock,buf,bufsize, 0);
 | 
			
		||||
#else
 | 
			
		||||
				i=read(fileno(stdin),buf,bufsize);
 | 
			
		||||
#endif
 | 
			
		||||
			if (!s_quiet)
 | 
			
		||||
				{
 | 
			
		||||
				if ((i <= 0) || (buf[0] == 'Q'))
 | 
			
		||||
@@ -1126,7 +1112,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
				case SSL_ERROR_WANT_WRITE:
 | 
			
		||||
				case SSL_ERROR_WANT_READ:
 | 
			
		||||
				case SSL_ERROR_WANT_X509_LOOKUP:
 | 
			
		||||
					BIO_printf(bio_s_out,"Write BLOCK\n\n");
 | 
			
		||||
					BIO_printf(bio_s_out,"Write BLOCK\n");
 | 
			
		||||
					break;
 | 
			
		||||
				case SSL_ERROR_SYSCALL:
 | 
			
		||||
				case SSL_ERROR_SSL:
 | 
			
		||||
@@ -1136,7 +1122,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
					goto err;
 | 
			
		||||
					/* break; */
 | 
			
		||||
				case SSL_ERROR_ZERO_RETURN:
 | 
			
		||||
					BIO_printf(bio_s_out,"DONE\n\n");
 | 
			
		||||
					BIO_printf(bio_s_out,"DONE\n");
 | 
			
		||||
					ret=1;
 | 
			
		||||
					goto err;
 | 
			
		||||
					}
 | 
			
		||||
@@ -1174,13 +1160,12 @@ again:
 | 
			
		||||
#endif
 | 
			
		||||
					write(fileno(stdout),buf,
 | 
			
		||||
						(unsigned int)i);
 | 
			
		||||
					BIO_printf(bio_s_out,"\n");
 | 
			
		||||
					if (SSL_pending(con)) goto again;
 | 
			
		||||
					break;
 | 
			
		||||
				case SSL_ERROR_WANT_WRITE:
 | 
			
		||||
				case SSL_ERROR_WANT_READ:
 | 
			
		||||
				case SSL_ERROR_WANT_X509_LOOKUP:
 | 
			
		||||
					BIO_printf(bio_s_out,"Read BLOCK\n\n");
 | 
			
		||||
					BIO_printf(bio_s_out,"Read BLOCK\n");
 | 
			
		||||
					break;
 | 
			
		||||
				case SSL_ERROR_SYSCALL:
 | 
			
		||||
				case SSL_ERROR_SSL:
 | 
			
		||||
@@ -1207,14 +1192,11 @@ err:
 | 
			
		||||
	BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
 | 
			
		||||
	if (buf != NULL)
 | 
			
		||||
		{
 | 
			
		||||
		memset(buf,0,bufsize);
 | 
			
		||||
		OPENSSL_cleanse(buf,bufsize);
 | 
			
		||||
		OPENSSL_free(buf);
 | 
			
		||||
		}
 | 
			
		||||
	if (ret >= 0)
 | 
			
		||||
		BIO_printf(bio_s_out,"ACCEPT\n");
 | 
			
		||||
#ifdef OPENSSL_SYS_VMS
 | 
			
		||||
        TerminalSocket (TERM_SOCK_DELETE, &stdin_sock);
 | 
			
		||||
#endif
 | 
			
		||||
	return(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -1262,22 +1244,28 @@ static int init_ssl_connection(SSL *con)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bio_s_out,"Client certificate\n");
 | 
			
		||||
		PEM_write_bio_X509(bio_s_out,peer);
 | 
			
		||||
		X509_NAME_oneline(X509_get_subject_name(peer),buf,BUFSIZ);
 | 
			
		||||
		X509_NAME_oneline(X509_get_subject_name(peer),buf,sizeof buf);
 | 
			
		||||
		BIO_printf(bio_s_out,"subject=%s\n",buf);
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(peer),buf,BUFSIZ);
 | 
			
		||||
		X509_NAME_oneline(X509_get_issuer_name(peer),buf,sizeof buf);
 | 
			
		||||
		BIO_printf(bio_s_out,"issuer=%s\n",buf);
 | 
			
		||||
		X509_free(peer);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (SSL_get_shared_ciphers(con,buf,BUFSIZ) != NULL)
 | 
			
		||||
	if (SSL_get_shared_ciphers(con,buf,sizeof buf) != NULL)
 | 
			
		||||
		BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf);
 | 
			
		||||
	str=SSL_CIPHER_get_name(SSL_get_current_cipher(con));
 | 
			
		||||
	BIO_printf(bio_s_out,"CIPHER is %s\n\n",(str != NULL)?str:"(NONE)");
 | 
			
		||||
	BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)");
 | 
			
		||||
	if (con->hit) BIO_printf(bio_s_out,"Reused session-id\n");
 | 
			
		||||
	if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
 | 
			
		||||
		TLS1_FLAGS_TLS_PADDING_BUG)
 | 
			
		||||
		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);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -1428,8 +1416,8 @@ static int www_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bio_s_out,"read R BLOCK\n\n");
 | 
			
		||||
#ifndef OPENSSL_SYS_MSDOS
 | 
			
		||||
				BIO_printf(bio_s_out,"read R BLOCK\n");
 | 
			
		||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(__DJGPP__)
 | 
			
		||||
				sleep(1);
 | 
			
		||||
#endif
 | 
			
		||||
				continue;
 | 
			
		||||
@@ -1654,7 +1642,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
 | 
			
		||||
							goto write_error;
 | 
			
		||||
						else
 | 
			
		||||
							{
 | 
			
		||||
							BIO_printf(bio_s_out,"rwrite W BLOCK\n\n");
 | 
			
		||||
							BIO_printf(bio_s_out,"rwrite W BLOCK\n");
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					else
 | 
			
		||||
 
 | 
			
		||||
@@ -83,9 +83,9 @@ typedef unsigned int u_int;
 | 
			
		||||
 | 
			
		||||
static struct hostent *GetHostByName(char *name);
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
static void sock_cleanup(void);
 | 
			
		||||
static void ssl_sock_cleanup(void);
 | 
			
		||||
#endif
 | 
			
		||||
static int sock_init(void);
 | 
			
		||||
static int ssl_sock_init(void);
 | 
			
		||||
static int init_client_ip(int *sock,unsigned char ip[4], int port);
 | 
			
		||||
static int init_server(int *sock, int port);
 | 
			
		||||
static int init_server_long(int *sock, int port,char *ip);
 | 
			
		||||
@@ -118,7 +118,7 @@ static LONG FAR PASCAL topHookProc(HWND hwnd, UINT message, WPARAM wParam,
 | 
			
		||||
		case WM_DESTROY:
 | 
			
		||||
		case WM_CLOSE:
 | 
			
		||||
			SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopWndProc);
 | 
			
		||||
			sock_cleanup();
 | 
			
		||||
			ssl_sock_cleanup();
 | 
			
		||||
			break;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -135,26 +135,34 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
 | 
			
		||||
#endif /* OPENSSL_SYS_WINDOWS */
 | 
			
		||||
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
static void sock_cleanup(void)
 | 
			
		||||
static void ssl_sock_cleanup(void)
 | 
			
		||||
	{
 | 
			
		||||
	if (wsa_init_done)
 | 
			
		||||
		{
 | 
			
		||||
		wsa_init_done=0;
 | 
			
		||||
#ifndef OPENSSL_SYS_WINCE
 | 
			
		||||
		WSACancelBlockingCall();
 | 
			
		||||
#endif
 | 
			
		||||
		WSACleanup();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int sock_init(void)
 | 
			
		||||
static int ssl_sock_init(void)
 | 
			
		||||
	{
 | 
			
		||||
#ifdef OPENSSL_SYS_WINDOWS
 | 
			
		||||
#ifdef WATT32
 | 
			
		||||
	extern int _watt_do_exit;
 | 
			
		||||
	_watt_do_exit = 0;
 | 
			
		||||
	dbug_init();
 | 
			
		||||
	if (sock_init())
 | 
			
		||||
		return (0);
 | 
			
		||||
#elif defined(OPENSSL_SYS_WINDOWS)
 | 
			
		||||
	if (!wsa_init_done)
 | 
			
		||||
		{
 | 
			
		||||
		int err;
 | 
			
		||||
	  
 | 
			
		||||
#ifdef SIGINT
 | 
			
		||||
		signal(SIGINT,(void (*)(int))sock_cleanup);
 | 
			
		||||
		signal(SIGINT,(void (*)(int))ssl_sock_cleanup);
 | 
			
		||||
#endif
 | 
			
		||||
		wsa_init_done=1;
 | 
			
		||||
		memset(&wsa_state,0,sizeof(wsa_state));
 | 
			
		||||
@@ -196,7 +204,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port)
 | 
			
		||||
	struct sockaddr_in them;
 | 
			
		||||
	int s,i;
 | 
			
		||||
 | 
			
		||||
	if (!sock_init()) return(0);
 | 
			
		||||
	if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
	memset((char *)&them,0,sizeof(them));
 | 
			
		||||
	them.sin_family=AF_INET;
 | 
			
		||||
@@ -261,7 +269,7 @@ static int init_server_long(int *sock, int port, char *ip)
 | 
			
		||||
	struct sockaddr_in server;
 | 
			
		||||
	int s= -1,i;
 | 
			
		||||
 | 
			
		||||
	if (!sock_init()) return(0);
 | 
			
		||||
	if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
	memset((char *)&server,0,sizeof(server));
 | 
			
		||||
	server.sin_family=AF_INET;
 | 
			
		||||
@@ -318,7 +326,7 @@ static int do_accept(int acc_sock, int *sock, char **host)
 | 
			
		||||
	int len;
 | 
			
		||||
/*	struct linger ling; */
 | 
			
		||||
 | 
			
		||||
	if (!sock_init()) return(0);
 | 
			
		||||
	if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_SYS_WINDOWS
 | 
			
		||||
redoit:
 | 
			
		||||
@@ -381,7 +389,7 @@ redoit:
 | 
			
		||||
			perror("OPENSSL_malloc");
 | 
			
		||||
			return(0);
 | 
			
		||||
			}
 | 
			
		||||
		strcpy(*host,h1->h_name);
 | 
			
		||||
		BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
 | 
			
		||||
 | 
			
		||||
		h2=GetHostByName(*host);
 | 
			
		||||
		if (h2 == NULL)
 | 
			
		||||
@@ -448,7 +456,7 @@ static int host_ip(char *str, unsigned char ip[4])
 | 
			
		||||
		{ /* do a gethostbyname */
 | 
			
		||||
		struct hostent *he;
 | 
			
		||||
 | 
			
		||||
		if (!sock_init()) return(0);
 | 
			
		||||
		if (!ssl_sock_init()) return(0);
 | 
			
		||||
 | 
			
		||||
		he=GetHostByName(str);
 | 
			
		||||
		if (he == NULL)
 | 
			
		||||
@@ -529,9 +537,12 @@ static struct hostent *GetHostByName(char *name)
 | 
			
		||||
		ret=gethostbyname(name);
 | 
			
		||||
		if (ret == NULL) return(NULL);
 | 
			
		||||
		/* else add to cache */
 | 
			
		||||
		strncpy(ghbn_cache[lowi].name,name,128);
 | 
			
		||||
		if(strlen(name) < sizeof ghbn_cache[0].name)
 | 
			
		||||
			{
 | 
			
		||||
			strcpy(ghbn_cache[lowi].name,name);
 | 
			
		||||
			memcpy((char *)&(ghbn_cache[lowi].ent),ret,sizeof(struct hostent));
 | 
			
		||||
			ghbn_cache[lowi].order=ghbn_miss+ghbn_hits;
 | 
			
		||||
			}
 | 
			
		||||
		return(ret);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,7 @@
 | 
			
		||||
#include OPENSSL_UNISTD
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
 | 
			
		||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 | 
			
		||||
#define TIMES
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -109,10 +109,6 @@
 | 
			
		||||
#include <sys/timeb.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _AIX
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(sun) || defined(__ultrix)
 | 
			
		||||
#define _POSIX_SOURCE
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
@@ -150,6 +146,8 @@
 | 
			
		||||
#undef BUFSIZZ
 | 
			
		||||
#define BUFSIZZ 1024*10
 | 
			
		||||
 | 
			
		||||
#define MYBUFSIZ 1024*8
 | 
			
		||||
 | 
			
		||||
#undef min
 | 
			
		||||
#undef max
 | 
			
		||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
 | 
			
		||||
@@ -324,6 +322,11 @@ static int parseArgs(int argc, char **argv)
 | 
			
		||||
		{
 | 
			
		||||
		if (--argc < 1) goto bad;
 | 
			
		||||
		s_www_path= *(++argv);
 | 
			
		||||
		if(strlen(s_www_path) > MYBUFSIZ-100)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bio_err,"-www option too long\n");
 | 
			
		||||
			badop=1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	else if(strcmp(*argv,"-bugs") == 0)
 | 
			
		||||
	    st_bugs=1;
 | 
			
		||||
@@ -484,7 +487,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	tm_Time_F(START);
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		if (finishtime < time(NULL)) break;
 | 
			
		||||
		if (finishtime < (long)time(NULL)) break;
 | 
			
		||||
#ifdef WIN32_STUFF
 | 
			
		||||
 | 
			
		||||
		if( flushWinMsgs(0) == -1 )
 | 
			
		||||
@@ -499,7 +502,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
		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));
 | 
			
		||||
			while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
 | 
			
		||||
				bytes_read+=i;
 | 
			
		||||
@@ -535,9 +538,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		}
 | 
			
		||||
	totalTime += tm_Time_F(STOP); /* Add the time for this iteration */
 | 
			
		||||
 | 
			
		||||
	i=(int)(time(NULL)-finishtime+maxTime);
 | 
			
		||||
	i=(int)((long)time(NULL)-finishtime+maxTime);
 | 
			
		||||
	printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,(long)time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
 | 
			
		||||
	/* Now loop and time connections using the same session id over and over */
 | 
			
		||||
 | 
			
		||||
@@ -554,7 +557,7 @@ next:
 | 
			
		||||
 | 
			
		||||
	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));
 | 
			
		||||
		while (SSL_read(scon,buf,sizeof(buf)) > 0)
 | 
			
		||||
			;
 | 
			
		||||
@@ -569,7 +572,7 @@ next:
 | 
			
		||||
	nConn = 0;
 | 
			
		||||
	totalTime = 0.0;
 | 
			
		||||
 | 
			
		||||
	finishtime=time(NULL)+maxTime;
 | 
			
		||||
	finishtime=(long)time(NULL)+maxTime;
 | 
			
		||||
 | 
			
		||||
	printf( "starting\n" );
 | 
			
		||||
	bytes_read=0;
 | 
			
		||||
@@ -577,7 +580,7 @@ next:
 | 
			
		||||
		
 | 
			
		||||
	for (;;)
 | 
			
		||||
		{
 | 
			
		||||
		if (finishtime < time(NULL)) break;
 | 
			
		||||
		if (finishtime < (long)time(NULL)) break;
 | 
			
		||||
 | 
			
		||||
#ifdef WIN32_STUFF
 | 
			
		||||
		if( flushWinMsgs(0) == -1 )
 | 
			
		||||
@@ -592,7 +595,7 @@ next:
 | 
			
		||||
 | 
			
		||||
		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));
 | 
			
		||||
			while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
 | 
			
		||||
				bytes_read+=i;
 | 
			
		||||
@@ -627,7 +630,7 @@ next:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
	printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,(long)time(NULL)-finishtime+maxTime,bytes_read/nConn);
 | 
			
		||||
 | 
			
		||||
	ret=0;
 | 
			
		||||
end:
 | 
			
		||||
@@ -639,7 +642,7 @@ end:
 | 
			
		||||
		tm_ctx=NULL;
 | 
			
		||||
		}
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
/***********************************************************************
 | 
			
		||||
 
 | 
			
		||||
@@ -273,7 +273,7 @@ end:
 | 
			
		||||
	if (out != NULL) BIO_free_all(out);
 | 
			
		||||
	if (x != NULL) SSL_SESSION_free(x);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static SSL_SESSION *load_sess_id(char *infile, int format)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								apps/smime.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								apps/smime.c
									
									
									
									
									
								
							@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int need_rand = 0;
 | 
			
		||||
	int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
 | 
			
		||||
        int keyform = FORMAT_PEM;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	args = argv + 1;
 | 
			
		||||
	ret = 1;
 | 
			
		||||
@@ -166,6 +168,10 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				flags |= PKCS7_BINARY;
 | 
			
		||||
		else if (!strcmp (*args, "-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"))
 | 
			
		||||
				store_flags |= X509_V_FLAG_CRL_CHECK;
 | 
			
		||||
		else if (!strcmp (*args, "-crl_check_all"))
 | 
			
		||||
@@ -176,11 +182,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				inrand = *args;
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
			need_rand = 1;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		} else if (!strcmp(*args,"-engine")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
				args++;
 | 
			
		||||
				engine = *args;
 | 
			
		||||
			} else badarg = 1;
 | 
			
		||||
#endif
 | 
			
		||||
		} else if (!strcmp(*args,"-passin")) {
 | 
			
		||||
			if (args[1]) {
 | 
			
		||||
				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, "-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");
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		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,  "-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");
 | 
			
		||||
@@ -339,7 +349,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        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");
 | 
			
		||||
@@ -428,7 +440,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	} else keyfile = NULL;
 | 
			
		||||
 | 
			
		||||
	if(keyfile) {
 | 
			
		||||
		key = load_key(bio_err, keyfile, keyform, passin, e,
 | 
			
		||||
		key = load_key(bio_err, keyfile, keyform, 0, passin, e,
 | 
			
		||||
			       "signing key file");
 | 
			
		||||
		if (!key) {
 | 
			
		||||
			goto end;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										27
									
								
								apps/speed.c
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								apps/speed.c
									
									
									
									
									
								
							@@ -58,6 +58,8 @@
 | 
			
		||||
 | 
			
		||||
/* most of this code has been pilfered from my libdes speed.c program */
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_SPEED
 | 
			
		||||
 | 
			
		||||
#undef SECONDS
 | 
			
		||||
#define SECONDS		3	
 | 
			
		||||
#define RSA_SECONDS	10
 | 
			
		||||
@@ -187,7 +189,8 @@
 | 
			
		||||
 | 
			
		||||
/* The following if from times(3) man page.  It may need to be changed */
 | 
			
		||||
#ifndef HZ
 | 
			
		||||
# ifdef _SC_CLK_TCK
 | 
			
		||||
# if defined(_SC_CLK_TCK) \
 | 
			
		||||
     && (!defined(OPENSSL_SYS_VMS) || __CTRL_VER >= 70000000)
 | 
			
		||||
#  define HZ ((double)sysconf(_SC_CLK_TCK))
 | 
			
		||||
# else
 | 
			
		||||
#  ifndef CLK_TCK
 | 
			
		||||
@@ -369,7 +372,9 @@ int MAIN(int, char **);
 | 
			
		||||
 | 
			
		||||
int MAIN(int argc, char **argv)
 | 
			
		||||
	{
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	ENGINE *e = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	unsigned char *buf=NULL,*buf2=NULL;
 | 
			
		||||
	int mret=1;
 | 
			
		||||
	long count=0,save_count=0;
 | 
			
		||||
@@ -589,6 +594,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			j--;	/* Otherwise, -elapsed gets confused with
 | 
			
		||||
				   an algorithm. */
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if	((argc > 0) && (strcmp(*argv,"-engine") == 0))
 | 
			
		||||
			{
 | 
			
		||||
			argc--;
 | 
			
		||||
@@ -605,6 +611,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			   means all of them should be run) */
 | 
			
		||||
			j--;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_FORK
 | 
			
		||||
		else if	((argc > 0) && (strcmp(*argv,"-multi") == 0))
 | 
			
		||||
			{
 | 
			
		||||
@@ -766,6 +773,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			{
 | 
			
		||||
			dsa_doit[R_DSA_512]=1;
 | 
			
		||||
			dsa_doit[R_DSA_1024]=1;
 | 
			
		||||
			dsa_doit[R_DSA_2048]=1;
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
@@ -861,10 +869,12 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
			BIO_printf(bio_err,"\n");
 | 
			
		||||
			BIO_printf(bio_err,"Available options:\n");
 | 
			
		||||
#ifdef TIMES
 | 
			
		||||
#if defined(TIMES) || defined(USE_TOD)
 | 
			
		||||
			BIO_printf(bio_err,"-elapsed        measure time in real time instead of CPU user time.\n");
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
			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,"-decrypt        time decryption instead of encryption (only EVP).\n");
 | 
			
		||||
			BIO_printf(bio_err,"-mr             produce machine readable output.\n");
 | 
			
		||||
@@ -997,6 +1007,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	c[D_CBC_RC5][0]=count;
 | 
			
		||||
	c[D_CBC_BF][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++)
 | 
			
		||||
		{
 | 
			
		||||
@@ -1022,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_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_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
 | 
			
		||||
	rsa_c[R_RSA_512][0]=count/2000;
 | 
			
		||||
@@ -1379,6 +1395,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
					EVP_DecryptInit_ex(&ctx,evp_cipher,NULL,key16,iv);
 | 
			
		||||
				else
 | 
			
		||||
					EVP_EncryptInit_ex(&ctx,evp_cipher,NULL,key16,iv);
 | 
			
		||||
				EVP_CIPHER_CTX_set_padding(&ctx, 0);
 | 
			
		||||
 | 
			
		||||
				Time_F(START);
 | 
			
		||||
				if(decrypt)
 | 
			
		||||
@@ -1392,6 +1409,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				else
 | 
			
		||||
					EVP_EncryptFinal_ex(&ctx,buf,&outl);
 | 
			
		||||
				d=Time_F(STOP);
 | 
			
		||||
				EVP_CIPHER_CTX_cleanup(&ctx);
 | 
			
		||||
				}
 | 
			
		||||
			if (evp_md)
 | 
			
		||||
				{
 | 
			
		||||
@@ -1728,7 +1746,7 @@ end:
 | 
			
		||||
			DSA_free(dsa_key[i]);
 | 
			
		||||
#endif
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(mret);
 | 
			
		||||
	OPENSSL_EXIT(mret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static void print_message(const char *s, long num, int length)
 | 
			
		||||
@@ -1781,7 +1799,7 @@ static char *sstrsep(char **string, const char *delim)
 | 
			
		||||
    if (**string == 0)
 | 
			
		||||
        return NULL;
 | 
			
		||||
 | 
			
		||||
    memset(isdelim, 0, 256);
 | 
			
		||||
    memset(isdelim, 0, sizeof isdelim);
 | 
			
		||||
    isdelim[0] = 1;
 | 
			
		||||
 | 
			
		||||
    while (*delim)
 | 
			
		||||
@@ -1938,3 +1956,4 @@ static int do_multi(int multi)
 | 
			
		||||
	return 1;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								apps/spkac.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								apps/spkac.c
									
									
									
									
									
								
							@@ -92,7 +92,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	CONF *conf = NULL;
 | 
			
		||||
	NETSCAPE_SPKI *spki = NULL;
 | 
			
		||||
	EVP_PKEY *pkey = NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	apps_startup();
 | 
			
		||||
 | 
			
		||||
@@ -141,11 +143,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			spksect= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
		else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			engine= *(++argv);
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
		else if (strcmp(*argv,"-noout") == 0)
 | 
			
		||||
			noout=1;
 | 
			
		||||
		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," -pubkey        output public key\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");
 | 
			
		||||
#endif
 | 
			
		||||
		goto end;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -181,12 +187,14 @@ bad:
 | 
			
		||||
		goto end;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if(keyfile) {
 | 
			
		||||
		pkey = load_key(bio_err,
 | 
			
		||||
				strcmp(keyfile, "-") ? keyfile : NULL,
 | 
			
		||||
				FORMAT_PEM, passin, e, "private key");
 | 
			
		||||
				FORMAT_PEM, 1, passin, e, "private key");
 | 
			
		||||
		if(!pkey) {
 | 
			
		||||
			goto end;
 | 
			
		||||
		}
 | 
			
		||||
@@ -295,5 +303,5 @@ end:
 | 
			
		||||
	EVP_PKEY_free(pkey);
 | 
			
		||||
	if(passin) OPENSSL_free(passin);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										581
									
								
								apps/term_sock.c
									
									
									
									
									
								
							
							
						
						
									
										581
									
								
								apps/term_sock.c
									
									
									
									
									
								
							@@ -1,581 +0,0 @@
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <netinet/in.h>
 | 
			
		||||
#include <inet.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <starlet.h>
 | 
			
		||||
#include <iodef.h>
 | 
			
		||||
#ifdef __alpha
 | 
			
		||||
#include <iosbdef.h>
 | 
			
		||||
#else
 | 
			
		||||
typedef struct _iosb {			/* Copied from IOSBDEF.H for Alpha  */
 | 
			
		||||
#pragma __nomember_alignment
 | 
			
		||||
    __union  {
 | 
			
		||||
        __struct  {
 | 
			
		||||
            unsigned short int iosb$w_status; /* Final I/O status           */
 | 
			
		||||
            __union  {
 | 
			
		||||
                __struct  {             /* 16-bit byte count variant        */
 | 
			
		||||
                    unsigned short int iosb$w_bcnt; /* 16-bit byte count    */
 | 
			
		||||
                    __union  {
 | 
			
		||||
                        unsigned int iosb$l_dev_depend; /* 32-bit device dependent info */
 | 
			
		||||
                        unsigned int iosb$l_pid; /* 32-bit pid              */
 | 
			
		||||
                        } iosb$r_l;
 | 
			
		||||
                    } iosb$r_bcnt_16;
 | 
			
		||||
                __struct  {             /* 32-bit byte count variant        */
 | 
			
		||||
                    unsigned int iosb$l_bcnt; /* 32-bit byte count (unaligned) */
 | 
			
		||||
                    unsigned short int iosb$w_dev_depend_high; /* 16-bit device dependent info */
 | 
			
		||||
                    } iosb$r_bcnt_32;
 | 
			
		||||
                } iosb$r_devdepend;
 | 
			
		||||
            } iosb$r_io_64;
 | 
			
		||||
        __struct  {
 | 
			
		||||
            __union  {
 | 
			
		||||
                unsigned int iosb$l_getxxi_status; /* Final GETxxI status   */
 | 
			
		||||
                unsigned int iosb$l_reg_status; /* Final $Registry status   */
 | 
			
		||||
                } iosb$r_l_status;
 | 
			
		||||
            unsigned int iosb$l_reserved; /* Reserved field                 */
 | 
			
		||||
            } iosb$r_get_64;
 | 
			
		||||
        } iosb$r_io_get;
 | 
			
		||||
    } IOSB;
 | 
			
		||||
 | 
			
		||||
#if !defined(__VAXC)
 | 
			
		||||
#define iosb$w_status iosb$r_io_get.iosb$r_io_64.iosb$w_status
 | 
			
		||||
#define iosb$w_bcnt iosb$r_io_get.iosb$r_io_64.iosb$r_devdepend.iosb$r_bcnt_16.iosb$w_bcnt
 | 
			
		||||
#define iosb$r_l        iosb$r_io_get.iosb$r_io_64.iosb$r_devdepend.iosb$r_bcnt_16.iosb$r_l
 | 
			
		||||
#define iosb$l_dev_depend iosb$r_l.iosb$l_dev_depend
 | 
			
		||||
#define iosb$l_pid iosb$r_l.iosb$l_pid
 | 
			
		||||
#define iosb$l_bcnt iosb$r_io_get.iosb$r_io_64.iosb$r_devdepend.iosb$r_bcnt_32.iosb$l_bcnt
 | 
			
		||||
#define iosb$w_dev_depend_high iosb$r_io_get.iosb$r_io_64.iosb$r_devdepend.iosb$r_bcnt_32.iosb$w_dev_depend_high
 | 
			
		||||
#define iosb$l_getxxi_status iosb$r_io_get.iosb$r_get_64.iosb$r_l_status.iosb$l_getxxi_status
 | 
			
		||||
#define iosb$l_reg_status iosb$r_io_get.iosb$r_get_64.iosb$r_l_status.iosb$l_reg_status
 | 
			
		||||
#endif          /* #if !defined(__VAXC) */
 | 
			
		||||
 | 
			
		||||
#endif					/* End of IOSBDEF */
 | 
			
		||||
 | 
			
		||||
#include <efndef.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <ssdef.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#include <descrip.h>
 | 
			
		||||
 | 
			
		||||
#include "term_sock.h"
 | 
			
		||||
 | 
			
		||||
#ifdef __alpha
 | 
			
		||||
static struct _iosb TerminalDeviceIosb;
 | 
			
		||||
#else
 | 
			
		||||
IOSB TerminalDeviceIosb;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static char TerminalDeviceBuff[255 + 2];
 | 
			
		||||
static int TerminalSocketPair[2] = {0, 0};
 | 
			
		||||
static unsigned short TerminalDeviceChan = 0;
 | 
			
		||||
 | 
			
		||||
static int CreateSocketPair (int, int, int, int *);
 | 
			
		||||
static void SocketPairTimeoutAst (int);
 | 
			
		||||
static int TerminalDeviceAst (int);
 | 
			
		||||
static void LogMessage (char *, ...);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Socket Pair Timeout Value (must be 0-59 seconds)
 | 
			
		||||
*/
 | 
			
		||||
#define SOCKET_PAIR_TIMEOUT_VALUE 20
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Socket Pair Timeout Block which is passed to timeout AST
 | 
			
		||||
*/
 | 
			
		||||
typedef struct _SocketPairTimeoutBlock {
 | 
			
		||||
    unsigned short SockChan1;
 | 
			
		||||
    unsigned short SockChan2;
 | 
			
		||||
    } SPTB;
 | 
			
		||||
 | 
			
		||||
#ifdef TERM_SOCK_TEST
 | 
			
		||||
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
/*                                                                            */
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
int main (int argc, char *argv[], char *envp[])
 | 
			
		||||
{
 | 
			
		||||
char TermBuff[80];
 | 
			
		||||
int TermSock,
 | 
			
		||||
    status,
 | 
			
		||||
    len;
 | 
			
		||||
 | 
			
		||||
LogMessage ("Enter 'q' or 'Q' to quit ...");
 | 
			
		||||
while (strcasecmp (TermBuff, "Q"))
 | 
			
		||||
    {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Create the terminal socket
 | 
			
		||||
    */
 | 
			
		||||
    status = TerminalSocket (TERM_SOCK_CREATE, &TermSock);
 | 
			
		||||
    if (status != TERM_SOCK_SUCCESS)
 | 
			
		||||
	exit (1);
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Process the terminal input
 | 
			
		||||
    */
 | 
			
		||||
    LogMessage ("Waiting on terminal I/O ...\n");
 | 
			
		||||
    len = recv (TermSock, TermBuff, sizeof (TermBuff), 0) ;
 | 
			
		||||
    TermBuff[len] = '\0';
 | 
			
		||||
    LogMessage ("Received terminal I/O [%s]", TermBuff);
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Delete the terminal socket
 | 
			
		||||
    */
 | 
			
		||||
    status = TerminalSocket (TERM_SOCK_DELETE, &TermSock);
 | 
			
		||||
    if (status != TERM_SOCK_SUCCESS)
 | 
			
		||||
	exit (1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
return 1;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif 
 | 
			
		||||
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
/*                                                                            */
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
int TerminalSocket (int FunctionCode, int *ReturnSocket)
 | 
			
		||||
{
 | 
			
		||||
int status;
 | 
			
		||||
$DESCRIPTOR (TerminalDeviceDesc, "SYS$COMMAND");
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Process the requested function code
 | 
			
		||||
*/
 | 
			
		||||
switch (FunctionCode)
 | 
			
		||||
   {
 | 
			
		||||
   case TERM_SOCK_CREATE:
 | 
			
		||||
	/*
 | 
			
		||||
	** Create a socket pair
 | 
			
		||||
	*/
 | 
			
		||||
	status = CreateSocketPair (AF_INET, SOCK_STREAM, 0, TerminalSocketPair);
 | 
			
		||||
	if (status == -1)
 | 
			
		||||
	    {
 | 
			
		||||
	    LogMessage ("TerminalSocket: CreateSocketPair () - %08X", status);
 | 
			
		||||
	    if (TerminalSocketPair[0])
 | 
			
		||||
		close (TerminalSocketPair[0]);
 | 
			
		||||
	    if (TerminalSocketPair[1])
 | 
			
		||||
		close (TerminalSocketPair[1]);
 | 
			
		||||
	    return (TERM_SOCK_FAILURE);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	** Assign a channel to the terminal device
 | 
			
		||||
	*/
 | 
			
		||||
	status = sys$assign (&TerminalDeviceDesc,
 | 
			
		||||
			     &TerminalDeviceChan, 
 | 
			
		||||
			     0, 0, 0);
 | 
			
		||||
	if (! (status & 1))
 | 
			
		||||
	    {
 | 
			
		||||
	    LogMessage ("TerminalSocket: SYS$ASSIGN () - %08X", status);
 | 
			
		||||
	    close (TerminalSocketPair[0]);
 | 
			
		||||
	    close (TerminalSocketPair[1]);
 | 
			
		||||
	    return (TERM_SOCK_FAILURE);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	** Queue an async IO to the terminal device
 | 
			
		||||
	*/
 | 
			
		||||
	status = sys$qio (EFN$C_ENF,
 | 
			
		||||
			  TerminalDeviceChan,
 | 
			
		||||
	                  IO$_READVBLK,
 | 
			
		||||
	                  &TerminalDeviceIosb, 
 | 
			
		||||
			  TerminalDeviceAst, 
 | 
			
		||||
			  0, 
 | 
			
		||||
	                  TerminalDeviceBuff,
 | 
			
		||||
	                  sizeof (TerminalDeviceBuff) - 2,
 | 
			
		||||
	                  0, 0, 0, 0);
 | 
			
		||||
	if (! (status & 1))
 | 
			
		||||
	    {
 | 
			
		||||
	    LogMessage ("TerminalSocket: SYS$QIO () - %08X", status);
 | 
			
		||||
	    close (TerminalSocketPair[0]);
 | 
			
		||||
	    close (TerminalSocketPair[1]);
 | 
			
		||||
	    return (TERM_SOCK_FAILURE);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	** Return the input side of the socket pair
 | 
			
		||||
	*/
 | 
			
		||||
	*ReturnSocket = TerminalSocketPair[1];
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
   case TERM_SOCK_DELETE:
 | 
			
		||||
	/*
 | 
			
		||||
	** Cancel any pending IO on the terminal channel
 | 
			
		||||
	*/
 | 
			
		||||
	status = sys$cancel (TerminalDeviceChan);
 | 
			
		||||
	if (! (status & 1))
 | 
			
		||||
	    {
 | 
			
		||||
	    LogMessage ("TerminalSocket: SYS$CANCEL () - %08X", status);
 | 
			
		||||
	    close (TerminalSocketPair[0]);
 | 
			
		||||
	    close (TerminalSocketPair[1]);
 | 
			
		||||
	    return (TERM_SOCK_FAILURE);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	** Deassign the terminal channel
 | 
			
		||||
	*/
 | 
			
		||||
	status = sys$dassgn (TerminalDeviceChan);
 | 
			
		||||
	if (! (status & 1))
 | 
			
		||||
	    {
 | 
			
		||||
	    LogMessage ("TerminalSocket: SYS$DASSGN () - %08X", status);
 | 
			
		||||
	    close (TerminalSocketPair[0]);
 | 
			
		||||
	    close (TerminalSocketPair[1]);
 | 
			
		||||
	    return (TERM_SOCK_FAILURE);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	** Close the terminal socket pair
 | 
			
		||||
	*/
 | 
			
		||||
	close (TerminalSocketPair[0]);
 | 
			
		||||
	close (TerminalSocketPair[1]);
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	** Return the initialized socket
 | 
			
		||||
	*/
 | 
			
		||||
	*ReturnSocket = 0;
 | 
			
		||||
	break;
 | 
			
		||||
 | 
			
		||||
    default:
 | 
			
		||||
	/*
 | 
			
		||||
	** Invalid function code
 | 
			
		||||
	*/
 | 
			
		||||
	LogMessage ("TerminalSocket: Invalid Function Code - %d", FunctionCode);
 | 
			
		||||
	return (TERM_SOCK_FAILURE);
 | 
			
		||||
	break;
 | 
			
		||||
    }	
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Return success
 | 
			
		||||
*/
 | 
			
		||||
return (TERM_SOCK_SUCCESS);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
/*                                                                            */
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
static int CreateSocketPair (
 | 
			
		||||
    int		SocketFamily,
 | 
			
		||||
    int		SocketType,
 | 
			
		||||
    int		SocketProtocol,
 | 
			
		||||
    int		*SocketPair)
 | 
			
		||||
{
 | 
			
		||||
struct dsc$descriptor AscTimeDesc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL};
 | 
			
		||||
static const char* LocalHostAddr = {"127.0.0.1"};
 | 
			
		||||
unsigned short TcpAcceptChan = 0,
 | 
			
		||||
	       TcpDeviceChan = 0;
 | 
			
		||||
unsigned long BinTimeBuff[2];
 | 
			
		||||
struct sockaddr_in sin;
 | 
			
		||||
char AscTimeBuff[32];
 | 
			
		||||
short LocalHostPort;
 | 
			
		||||
unsigned int status,
 | 
			
		||||
	     slen;
 | 
			
		||||
 | 
			
		||||
#ifdef __alpha
 | 
			
		||||
struct _iosb iosb;
 | 
			
		||||
#else
 | 
			
		||||
IOSB iosb;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int SockDesc1 = 0,
 | 
			
		||||
    SockDesc2 = 0;
 | 
			
		||||
SPTB sptb;
 | 
			
		||||
$DESCRIPTOR (TcpDeviceDesc, "TCPIP$DEVICE");
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Create a socket
 | 
			
		||||
*/
 | 
			
		||||
SockDesc1 = socket (SocketFamily, SocketType, 0);
 | 
			
		||||
if (SockDesc1 < 0)
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: socket () - %d", errno);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Initialize the socket information
 | 
			
		||||
*/
 | 
			
		||||
slen = sizeof (sin);
 | 
			
		||||
memset ((char *) &sin, 0, slen);
 | 
			
		||||
sin.sin_family = SocketFamily;
 | 
			
		||||
sin.sin_addr.s_addr = inet_addr (LocalHostAddr);
 | 
			
		||||
sin.sin_port = 0;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Bind the socket to the local IP
 | 
			
		||||
*/
 | 
			
		||||
status = bind (SockDesc1, (struct sockaddr *) &sin, slen);
 | 
			
		||||
if (status < 0)
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: bind () - %d", errno);
 | 
			
		||||
    close (SockDesc1);   
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Get the socket name so we can save the port number
 | 
			
		||||
*/
 | 
			
		||||
status = getsockname (SockDesc1, (struct sockaddr *) &sin, &slen);
 | 
			
		||||
if (status < 0)
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: getsockname () - %d", errno);
 | 
			
		||||
    close (SockDesc1); 
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
else
 | 
			
		||||
    LocalHostPort = sin.sin_port;			
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Setup a listen for the socket
 | 
			
		||||
*/
 | 
			
		||||
listen (SockDesc1, 5);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Get the binary (64-bit) time of the specified timeout value
 | 
			
		||||
*/
 | 
			
		||||
sprintf (AscTimeBuff, "0 0:0:%02d.00", SOCKET_PAIR_TIMEOUT_VALUE);
 | 
			
		||||
AscTimeDesc.dsc$w_length = strlen (AscTimeBuff);
 | 
			
		||||
AscTimeDesc.dsc$a_pointer = AscTimeBuff;
 | 
			
		||||
status = sys$bintim (&AscTimeDesc, BinTimeBuff);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: SYS$BINTIM () - %08X", status);
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Assign another channel to the TCP/IP device for the accept.
 | 
			
		||||
** This is the channel that ends up being connected to.
 | 
			
		||||
*/
 | 
			
		||||
status = sys$assign (&TcpDeviceDesc, &TcpDeviceChan, 0, 0, 0);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: SYS$ASSIGN () - %08X", status);
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Get the channel of the first socket for the accept
 | 
			
		||||
*/
 | 
			
		||||
TcpAcceptChan = decc$get_sdc (SockDesc1);		
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Perform the accept using $QIO so we can do this asynchronously
 | 
			
		||||
*/
 | 
			
		||||
status = sys$qio (EFN$C_ENF, 
 | 
			
		||||
		  TcpAcceptChan,
 | 
			
		||||
                  IO$_ACCESS | IO$M_ACCEPT,
 | 
			
		||||
                  &iosb,
 | 
			
		||||
		  0, 0, 0, 0, 0,
 | 
			
		||||
                  &TcpDeviceChan,
 | 
			
		||||
                  0, 0);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: SYS$QIO () - %08X", status);
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    sys$dassgn (TcpDeviceChan);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Create the second socket to do the connect
 | 
			
		||||
*/
 | 
			
		||||
SockDesc2 = socket (SocketFamily, SocketType, 0);
 | 
			
		||||
if (SockDesc2 < 0)
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: socket () - %d", errno);
 | 
			
		||||
    sys$cancel (TcpAcceptChan);
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    sys$dassgn (TcpDeviceChan);
 | 
			
		||||
    return (-1) ;
 | 
			
		||||
    } 
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Setup the Socket Pair Timeout Block
 | 
			
		||||
*/
 | 
			
		||||
sptb.SockChan1 = TcpAcceptChan;
 | 
			
		||||
sptb.SockChan2 = decc$get_sdc (SockDesc2);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Before we block on the connect, set a timer that can cancel I/O on our two 
 | 
			
		||||
** sockets if it never connects.
 | 
			
		||||
*/
 | 
			
		||||
status = sys$setimr (EFN$C_ENF, 
 | 
			
		||||
		     BinTimeBuff, 
 | 
			
		||||
		     SocketPairTimeoutAst, 
 | 
			
		||||
		     &sptb, 
 | 
			
		||||
		     0);
 | 
			
		||||
if (! (status & 1))
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: SYS$SETIMR () - %08X", status);
 | 
			
		||||
    sys$cancel (TcpAcceptChan);
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    close (SockDesc2);
 | 
			
		||||
    sys$dassgn (TcpDeviceChan);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Now issue the connect
 | 
			
		||||
*/
 | 
			
		||||
memset ((char *) &sin, 0, sizeof (sin)) ;
 | 
			
		||||
sin.sin_family = SocketFamily;
 | 
			
		||||
sin.sin_addr.s_addr = inet_addr (LocalHostAddr) ;
 | 
			
		||||
sin.sin_port = LocalHostPort ;
 | 
			
		||||
 | 
			
		||||
status = connect (SockDesc2, (struct sockaddr *) &sin, sizeof (sin));
 | 
			
		||||
if (status < 0 )
 | 
			
		||||
    {
 | 
			
		||||
    LogMessage ("CreateSocketPair: connect () - %d", errno);
 | 
			
		||||
    sys$cantim (&sptb, 0);
 | 
			
		||||
    sys$cancel (TcpAcceptChan);
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    close (SockDesc2);
 | 
			
		||||
    sys$dassgn (TcpDeviceChan);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Wait for the asynch $QIO to finish.  Note that if the I/O was aborted 
 | 
			
		||||
** (SS$_ABORT), then we probably canceled it from the AST routine - so log a 
 | 
			
		||||
** timeout.
 | 
			
		||||
*/
 | 
			
		||||
status = sys$synch (EFN$C_ENF, &iosb);
 | 
			
		||||
if (! (iosb.iosb$w_status & 1))
 | 
			
		||||
    {
 | 
			
		||||
    if (iosb.iosb$w_status == SS$_ABORT)
 | 
			
		||||
	LogMessage ("CreateSocketPair: SYS$QIO(iosb) timeout");
 | 
			
		||||
    else 
 | 
			
		||||
	{
 | 
			
		||||
        LogMessage ("CreateSocketPair: SYS$QIO(iosb) - %d", iosb.iosb$w_status);
 | 
			
		||||
        sys$cantim (&sptb, 0);
 | 
			
		||||
        }
 | 
			
		||||
    close (SockDesc1);
 | 
			
		||||
    close (SockDesc2);
 | 
			
		||||
    sys$dassgn (TcpDeviceChan);
 | 
			
		||||
    return (-1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Here we're successfully connected, so cancel the timer, convert the I/O 
 | 
			
		||||
** channel to a socket fd, close the listener socket and return the connected 
 | 
			
		||||
** pair.
 | 
			
		||||
*/
 | 
			
		||||
sys$cantim (&sptb, 0);
 | 
			
		||||
 | 
			
		||||
close (SockDesc1) ;
 | 
			
		||||
SocketPair[0] = SockDesc2 ;
 | 
			
		||||
SocketPair[1] = socket_fd (TcpDeviceChan);
 | 
			
		||||
 | 
			
		||||
return (0) ;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
/*                                                                            */
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
static void SocketPairTimeoutAst (int astparm)
 | 
			
		||||
{
 | 
			
		||||
SPTB *sptb = (SPTB *) astparm;
 | 
			
		||||
 | 
			
		||||
sys$cancel (sptb->SockChan2);			/* Cancel the connect() */
 | 
			
		||||
sys$cancel (sptb->SockChan1);			/* Cancel the accept() 	*/
 | 
			
		||||
 | 
			
		||||
return;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
/*                                                                            */
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
static int TerminalDeviceAst (int astparm)
 | 
			
		||||
{
 | 
			
		||||
int status;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Terminate the terminal buffer
 | 
			
		||||
*/
 | 
			
		||||
TerminalDeviceBuff[TerminalDeviceIosb.iosb$w_bcnt] = '\0';
 | 
			
		||||
strcat (TerminalDeviceBuff, "\n");
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Send the data read from the terminal device throught the socket pair
 | 
			
		||||
*/
 | 
			
		||||
send (TerminalSocketPair[0], TerminalDeviceBuff, TerminalDeviceIosb.iosb$w_bcnt + 1, 0);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Queue another async IO to the terminal device
 | 
			
		||||
*/
 | 
			
		||||
status = sys$qio (EFN$C_ENF,
 | 
			
		||||
         	  TerminalDeviceChan,
 | 
			
		||||
         	  IO$_READVBLK,
 | 
			
		||||
         	  &TerminalDeviceIosb, 
 | 
			
		||||
	 	  TerminalDeviceAst, 
 | 
			
		||||
	 	  0, 
 | 
			
		||||
         	  TerminalDeviceBuff,
 | 
			
		||||
         	  sizeof (TerminalDeviceBuff) - 1,
 | 
			
		||||
         	  0, 0, 0, 0);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Return status
 | 
			
		||||
*/
 | 
			
		||||
return status;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
/*                                                                            */
 | 
			
		||||
/*----------------------------------------------------------------------------*/
 | 
			
		||||
static void LogMessage (char *msg, ...)
 | 
			
		||||
{
 | 
			
		||||
char *Month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", 
 | 
			
		||||
                 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
 | 
			
		||||
static unsigned int pid = 0;
 | 
			
		||||
va_list args;
 | 
			
		||||
time_t CurTime;
 | 
			
		||||
struct tm *LocTime;
 | 
			
		||||
char MsgBuff[256];
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Get the process pid
 | 
			
		||||
*/
 | 
			
		||||
if (pid == 0)
 | 
			
		||||
    pid = getpid ();
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Convert the current time into local time
 | 
			
		||||
*/
 | 
			
		||||
CurTime = time (NULL);
 | 
			
		||||
LocTime = localtime (&CurTime);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Format the message buffer
 | 
			
		||||
*/
 | 
			
		||||
sprintf (MsgBuff, "%02d-%s-%04d %02d:%02d:%02d [%08X] %s\n",
 | 
			
		||||
         LocTime->tm_mday, Month[LocTime->tm_mon], (LocTime->tm_year + 1900),
 | 
			
		||||
         LocTime->tm_hour, LocTime->tm_min, LocTime->tm_sec, pid, msg);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Get any variable arguments and add them to the print of the message buffer 
 | 
			
		||||
*/
 | 
			
		||||
va_start (args, msg);
 | 
			
		||||
vfprintf (stderr, MsgBuff, args);
 | 
			
		||||
va_end (args);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Flush standard error output
 | 
			
		||||
*/
 | 
			
		||||
fsync (fileno (stderr));
 | 
			
		||||
 | 
			
		||||
return;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,21 +0,0 @@
 | 
			
		||||
#ifndef TERM_SOCK_H
 | 
			
		||||
#define TERM_SOCK_H
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Terminal Socket Function Codes
 | 
			
		||||
*/
 | 
			
		||||
#define TERM_SOCK_CREATE	1
 | 
			
		||||
#define TERM_SOCK_DELETE	2
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Terminal Socket Status Codes
 | 
			
		||||
*/
 | 
			
		||||
#define TERM_SOCK_FAILURE	0
 | 
			
		||||
#define TERM_SOCK_SUCCESS	1
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Terminal Socket Prototype
 | 
			
		||||
*/
 | 
			
		||||
int TerminalSocket (int FunctionCode, int *ReturnSocket);
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -86,7 +86,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
 | 
			
		||||
	X509_STORE *cert_ctx=NULL;
 | 
			
		||||
	X509_LOOKUP *lookup=NULL;
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
	char *engine=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	cert_ctx=X509_STORE_new();
 | 
			
		||||
	if (cert_ctx == NULL) goto end;
 | 
			
		||||
@@ -142,11 +144,13 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
				if (argc-- < 1) goto end;
 | 
			
		||||
				trustfile= *(++argv);
 | 
			
		||||
				}
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
			else if (strcmp(*argv,"-engine") == 0)
 | 
			
		||||
				{
 | 
			
		||||
				if (--argc < 1) goto end;
 | 
			
		||||
				engine= *(++argv);
 | 
			
		||||
				}
 | 
			
		||||
#endif
 | 
			
		||||
			else if (strcmp(*argv,"-help") == 0)
 | 
			
		||||
				goto end;
 | 
			
		||||
			else if (strcmp(*argv,"-ignore_critical") == 0)
 | 
			
		||||
@@ -170,7 +174,9 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifndef OPENSSL_NO_ENGINE
 | 
			
		||||
        e = setup_engine(bio_err, engine, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
 | 
			
		||||
	if (lookup == NULL) abort();
 | 
			
		||||
@@ -219,7 +225,11 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	ret=0;
 | 
			
		||||
end:
 | 
			
		||||
	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");
 | 
			
		||||
		for(i = 0; i < X509_PURPOSE_get_count(); i++) {
 | 
			
		||||
			X509_PURPOSE *ptmp;
 | 
			
		||||
@@ -232,7 +242,7 @@ end:
 | 
			
		||||
	sk_X509_pop_free(untrusted, X509_free);
 | 
			
		||||
	sk_X509_pop_free(trusted, X509_free);
 | 
			
		||||
	apps_shutdown();
 | 
			
		||||
	EXIT(ret);
 | 
			
		||||
	OPENSSL_EXIT(ret);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)
 | 
			
		||||
@@ -330,7 +340,8 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
 | 
			
		||||
	if (!ok)
 | 
			
		||||
		{
 | 
			
		||||
		X509_NAME_oneline(
 | 
			
		||||
				X509_get_subject_name(ctx->current_cert),buf,256);
 | 
			
		||||
				X509_get_subject_name(ctx->current_cert),buf,
 | 
			
		||||
				sizeof buf);
 | 
			
		||||
		printf("%s\n",buf);
 | 
			
		||||
		printf("error %d at %d depth lookup:%s\n",ctx->error,
 | 
			
		||||
			ctx->error_depth,
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user