We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
EC
adb shell am start -e project_id <PROJECT_ID> -e cloud_region <REGION> -e registry_id <REGISTRY_ID> -e device_id <DEVICE_ID> [-e key_algorithm <one of RSA,EC>] com.example.androidthings.sensorhub/.SensorHubActivity
the key point is -e key_algorithm, which allows RSA and EC, and EC is actually ES256:
-e key_algorithm
RSA
ES256
ES256 key pair using the Eliptic Curve algorithm See Google Cloud Internet of Things Core - Creating Public/Private Key Pairs
ES256_X509
This function in AuthKeyGenerator.class is actually for _X509
AuthKeyGenerator.class
_X509
public void initialize() throws GeneralSecurityException, IOException { if (certificate instanceof X509Certificate) { // is true private void writeCertificatePEM(OutputStream os) throws GeneralSecurityException, IOException { os.write("-----BEGIN CERTIFICATE-----\n".getBytes()); os.write(Base64.encode(certificate.getEncoded(), Base64.DEFAULT)); os.write("-----END CERTIFICATE-----\n".getBytes()); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Finally, fixed this issue by almost one day:
Firstly, execute the follow command to create a pem file, I use
EC
in this command:the key point is
-e key_algorithm
, which allowsRSA
andEC
, andEC
is actuallyES256
:Lastly, upload the pem to GCP console, and select
ES256_X509
:This function in
AuthKeyGenerator.class
is actually for_X509
Done
The text was updated successfully, but these errors were encountered: