Created
January 10, 2016 12:53
-
-
Save cmouse/bf4671c22d18d8a5c8df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
key = File.read("input.der").force_encoding('ascii-8bit') | |
# determine key size | |
File.open("ssl-parameters.dat", "wb") do |f| | |
f.write [4096, key.size].pack 'll' | |
f.write key | |
f.write [0].pack 'l' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment