| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  | MODIFYING OPENSSL SOURCE | 
					
						
							|  |  |  | ======================== | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This document describes the way to add custom modifications to OpenSSL sources. | 
					
						
							| 
									
										
										
										
											2019-07-08 18:09:13 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |  If you are adding new public functions to the custom library build, you need to | 
					
						
							|  |  |  |  either add a prototype in one of the existing OpenSSL header files; | 
					
						
							| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  |  or provide a new header file and edit | 
					
						
							|  |  |  |  [Configurations/unix-Makefile.tmpl](Configurations/unix-Makefile.tmpl) | 
					
						
							|  |  |  |  to pick up that file. | 
					
						
							| 
									
										
										
										
											2019-07-08 18:09:13 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-22 19:27:27 +08:00
										 |  |  |  After that, perform the following steps: | 
					
						
							| 
									
										
										
										
											2019-07-08 18:09:13 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-04 00:20:07 +08:00
										 |  |  |     ./Configure -Werror --strict-warnings [your-options] | 
					
						
							| 
									
										
										
										
											2019-07-08 18:09:13 +08:00
										 |  |  |     make update | 
					
						
							|  |  |  |     make | 
					
						
							|  |  |  |     make test | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  |  `make update` ensures that your functions declarations are added to | 
					
						
							|  |  |  |  `util/libcrypto.num` or `util/libssl.num`. | 
					
						
							|  |  |  |  If you plan to submit the changes you made to OpenSSL | 
					
						
							|  |  |  |  (see [CONTRIBUTING.md](CONTRIBUTING.md)), it's worth running: | 
					
						
							| 
									
										
										
										
											2019-07-08 18:09:13 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     make doc-nits | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  |  after running `make update` to ensure that documentation has correct format. | 
					
						
							| 
									
										
										
										
											2019-07-08 18:09:13 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  |  `make update` also generates files related to OIDs (in the `crypto/objects/` | 
					
						
							|  |  |  |  folder) and errors. | 
					
						
							| 
									
										
										
										
											2022-09-22 19:27:27 +08:00
										 |  |  |  If a merge error occurs in one of these generated files, then the | 
					
						
							| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  |  generated files need to be removed and regenerated using `make update`. | 
					
						
							| 
									
										
										
										
											2022-09-22 19:27:27 +08:00
										 |  |  |  To aid in this process, the generated files can be committed separately | 
					
						
							| 
									
										
										
										
											2020-06-10 23:49:25 +08:00
										 |  |  |  so they can be removed easily. |