On Jun 30, 2011, at 12:44 AM, James Turnbull wrote:

> Hi all
> 
> Yet again the indirector bewilders me. :)
> 
> I'm trying work out where this comes from:
> 
> $ sudo curl -k -H "Accept: yaml" 
> https://pelin.lovedthanlost.net:8140/production/certificate_requests/absenta.lovedthanlost.net
> 
> Which returns:
> 
> ---
>  - !ruby/object:Puppet::SSL::CertificateRequest
>    content: !ruby/object:OpenSSL::X509::Request {}
>    expiration: 2011-06-30 01:01:52.924789 -07:00
>    name: absenta.lovedthanlost.net
> 
> I think it's in lib/puppet/ssl/host.rb but can't for the life of me work out 
> where in here I would customise this output? I'd like to add any attributes 
> defined on the CSR to the output.

As Brice mentioned, you should ask for it as a string, rather than as yaml, and 
you'll get the PEM-encoded CSR.  The above string doesn't even contain a valid 
CSR.

If you wanted to use yaml or json specifically, you'd have to add that support 
to the CSR (and probably the rest of the SSL classes).

-- 
Men never do evil so completely and cheerfully as when they do it from a
religious conviction.          --Blaise Pascal
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   http://about.me/lak




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to