summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/get_pubkey.rb
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2011-10-10 11:51:14 -0700
committerJeff McCune <jeff@puppetlabs.com>2011-10-10 11:51:14 -0700
commit07b2a3afd996fa367e2e1b3692b5b8eea3273af2 (patch)
treec774302c46efde850662da3c3588d93e21e6f570 /lib/puppet/parser/functions/get_pubkey.rb
parent14852e0259e1e43371dbcb2675e00c6d6e614f05 (diff)
downloadpuppet-stdlib-07b2a3afd996fa367e2e1b3692b5b8eea3273af2.tar.gz
puppet-stdlib-07b2a3afd996fa367e2e1b3692b5b8eea3273af2.tar.bz2
(#10007) Revert "Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certs"
This reverts commit 14852e0259e1e43371dbcb2675e00c6d6e614f05, reversing changes made to a95dccd464b55945feb8bcf7483f777c25164115. This is to fix the broken build (failing tests) as per #8925 and #10007
Diffstat (limited to 'lib/puppet/parser/functions/get_pubkey.rb')
-rw-r--r--lib/puppet/parser/functions/get_pubkey.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/puppet/parser/functions/get_pubkey.rb b/lib/puppet/parser/functions/get_pubkey.rb
deleted file mode 100644
index 744b9df..0000000
--- a/lib/puppet/parser/functions/get_pubkey.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-module Puppet::Parser::Functions
- newfunction(:get_pubkey, :type => :rvalue, :doc => <<-EOS
-Gets a public key given a CN. This function accepts all the same
-parameters as get_certificate(), but instead returns the public
-key portion of the certificate.
-
-See get_certificate() for a more complete list of options available.
-EOS
- ) do |arguments|
-
- # Wrap the get_certificate method
- method = Puppet::Parser::Functions.function(:get_certificate)
- cert_text = send(method, arguments)
-
- require 'openssl'
-
- if cert_text == :undef then
- return :undef
- else
- cert = OpenSSL::X509::Certificate.new(cert_text)
- pubkey = cert.public_key
- return pubkey.to_s
- end
- end
-end