Class: IISSelfSigner
- Inherits:
-
Object
- Object
- IISSelfSigner
- Defined in:
- lib/IIS_self_signer.rb
Instance Method Summary collapse
-
#initialize(siteName, webSiteIdentifier = WebSiteIdentifier.new) ⇒ IISSelfSigner
constructor
A new instance of IISSelfSigner.
- #sign ⇒ Object
Constructor Details
#initialize(siteName, webSiteIdentifier = WebSiteIdentifier.new) ⇒ IISSelfSigner
Returns a new instance of IISSelfSigner.
5 6 7 8 |
# File 'lib/IIS_self_signer.rb', line 5 def initialize(siteName, webSiteIdentifier = WebSiteIdentifier.new) @siteName = siteName @webSiteIdentifier = webSiteIdentifier end |
Instance Method Details
#sign ⇒ Object
10 11 12 13 14 |
# File 'lib/IIS_self_signer.rb', line 10 def sign @siteId = @webSiteIdentifier.getId(@siteName) certName = @siteName+":#{(0..16).to_a.map{|a| rand(16).to_s(16)}.join}" `"C:\\Program Files (x86)\\IIS Resources\\SelfSSL\\selfssl.exe" /T /N:CN=#{certName} /S:#{@siteId} /Q` end |