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

setServiceAccountPrivateKeyFromP12File(InputStream p12File) #857

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments
Open

Comments

@GoogleCodeExporter
Copy link
Collaborator

For now, you can't use a p12 stored as a resource and it coul be very usefull 
if you can setServiceAccountPrivateKeyFromP12File from an InputStream (way that 
you can access to the ressource).

Here is the method that I use : 
    public Builder setServiceAccountPrivateKeyFromP12File(InputStream p12File)
            throws GeneralSecurityException, IOException {
          serviceAccountPrivateKey = SecurityUtils.loadPrivateKeyFromKeyStore(
              SecurityUtils.getPkcs12KeyStore(), p12File, "notasecret",
              "privatekey", "notasecret");
          return this;
        }

Original issue reported on code.google.com by sebastie...@progis.fr on 12 Feb 2014 at 7:28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant