Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl pkcs12 equivalent ansible module #579

Open
baoj-dfo opened this issue Mar 6, 2023 · 4 comments
Open

openssl pkcs12 equivalent ansible module #579

baoj-dfo opened this issue Mar 6, 2023 · 4 comments
Labels
question Further information is requested

Comments

@baoj-dfo
Copy link

baoj-dfo commented Mar 6, 2023

what are equivalent ansible module for achieve these command ?

openssl pkcs12 -in $file -nocerts -nodes -out $certKey
openssl pkcs12 -in $file -clcerts -nokeys -out $certPem

I've looked on openssl_privatekey, openssl_privatekey_info, openssl_pkcs12, openssl_privatekey_info, none of them can

@felixfontein felixfontein added the question Further information is requested label Mar 6, 2023
@felixfontein
Copy link
Contributor

There is no equivalent of these commands. The openssl_pkcs12 module can dump the private key, certificate, and CA certs into a single file, which comes close to what you want.

@baoj-dfo
Copy link
Author

baoj-dfo commented Mar 6, 2023

@felixfontein , thanks for your quick answer.

what are the output format of azure_rm_keyvaultkey_info and azure_rm_keyvaultsecret_info when retrieving certificate from Azure keyvault ? how to convert to PEM format ?

for azure_rm_keyvaultkey_info, I get its output['keys'][0].key
for azure_rm_keyvaultsecret_info, I get its output.secrets[0].secret

@felixfontein
Copy link
Contributor

I don't know, you'll have to check the documentation of the Azure collection containing these modules.

@baoj-dfo
Copy link
Author

baoj-dfo commented Mar 6, 2023

I've spend lots time try to figure out its equivalence for
az keyvault secret download --vault-name $vault -n $cert -f $file --encoding base64

with no luck, any one else can help?

Most likely I have to use az cli instead of Azure collection module :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants