| 
									
										
										
										
											2016-08-12 15:01:18 -06:00
										 |  |  | # le-store-SPEC
 | 
					
						
							| 
									
										
										
										
											2016-08-12 15:07:04 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | The reference implementation, specification, template, and tests for creating an le-store- strategy. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The reference implementation is completely in-memory. | 
					
						
							| 
									
										
										
										
											2016-08-11 23:22:41 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | See [Help Wanted: Database Plugins (for saving certs)](https://github.com/Daplie/node-letsencrypt/issues/39) | 
					
						
							| 
									
										
										
										
											2016-08-12 15:21:35 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | API | 
					
						
							|  |  |  | === | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | * getOptions() | 
					
						
							|  |  |  | * accounts. | 
					
						
							|  |  |  |   * checkKeypair(opts, cb) | 
					
						
							|  |  |  |   * setKeypair(opts, keypair, cb) | 
					
						
							|  |  |  |   * check(opts, cb) | 
					
						
							|  |  |  |   * set(opts, reg, cb) | 
					
						
							|  |  |  | * certificates. | 
					
						
							|  |  |  |   * checkKeypair(opts, cb) | 
					
						
							|  |  |  |   * setKeypair(opts, keypair, cb) | 
					
						
							|  |  |  |   * check(opts, cb) | 
					
						
							| 
									
										
										
										
											2016-08-13 15:07:41 -06:00
										 |  |  |   * set(opts, certs, cb) | 
					
						
							| 
									
										
										
										
											2016-08-12 15:21:35 -06:00
										 |  |  | ``` | 
					
						
							| 
									
										
										
										
											2016-08-13 15:07:41 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | Keypairs | 
					
						
							|  |  |  | -------- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | For convenience, the keypair object will always contain **both** PEM and JWK | 
					
						
							|  |  |  | versions of the private and/or public keys when being passed to the `*Keypair` functions. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | **set** | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | `setKeypair` will always be called with `email` and **all three** forms of the keypair: | 
					
						
							|  |  |  | `privateKeyPem`, `publicKeyPem`, and `privateKeyJwk`. It's easy to generate `publicKeyJwk` | 
					
						
							|  |  |  | from `privateKeyJwk` because it is just a copy of the public fields `e` and `n`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | **check** | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | `checkKeypair` may be called with any of `email`, `accountId`, and `keypair` - which will | 
					
						
							|  |  |  | contain only `publicKeyPem` and `publicKeyJwk`. |