1 module hunt.net.PemKeyCertOptions; 2 3 import hunt.net.KeyCertOptions; 4 5 /** 6 * 7 */ 8 class PemKeyCertOptions : KeyCertOptions { 9 private string _caCertFile; 10 private string _caPassword; 11 private string _certFile; 12 private string _certPassword; 13 private string _keyFile; 14 private string _keyPassword; 15 16 this() { 17 18 } 19 20 this(string certificate, string privateKey, string certPassword="", string keyPassword="") { 21 _certFile = certificate; 22 _certPassword = certPassword; 23 _keyFile = privateKey; 24 _keyPassword = keyPassword; 25 } 26 27 string getCaFile() { 28 return _caCertFile; 29 } 30 31 PemKeyCertOptions setCaFile(string file) { 32 _caCertFile = file; 33 return this; 34 } 35 36 string getCaPassword() { 37 return _caPassword; 38 } 39 40 PemKeyCertOptions setCaPassword(string password) { 41 _caPassword = password; 42 return this; 43 } 44 45 string getCertFile() { 46 return _certFile; 47 } 48 49 string getCertPassword() { 50 return _certPassword; 51 } 52 53 string getKeyFile() { 54 return _keyFile; 55 } 56 57 string getKeyPassword() { 58 return _keyPassword; 59 } 60 61 KeyCertOptions copy() { 62 PemKeyCertOptions options = new PemKeyCertOptions(_certFile, _keyFile, _certPassword, _keyPassword); 63 options._caCertFile = _caCertFile; 64 options._caPassword = _caPassword; 65 return options; 66 } 67 }