Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andreas-mausch/026413d908ba61cda15981bb4fbcd276 to your computer and use it in GitHub Desktop.
Save andreas-mausch/026413d908ba61cda15981bb4fbcd276 to your computer and use it in GitHub Desktop.
Generate certificates on CLI without installing the full Tizen Studio
# Get access token here:
# https://account.samsung.com/accounts/TDC/signInGate?clientId=4fb7fnf3np&tokenType=TOKEN
# Find the CA certificates here:
# https://gitlab.com/andreas-mausch/moonwatch/-/tree/master/certificates
# Author certificate
openssl genrsa -out author.key.pem 2048
openssl rsa -in author.key.pem -outform PEM -pubout -out author.key.pem.pub
openssl req -new -key author.key.pem -out author.csr -subj "/CN=gear-certificate@protonmail.com"
curl -v -X POST https://dev.tizen.samsung.com:443/apis/v2/authors -F access_token=<ACCESS_TOKEN> -F user_id=<USER_ID> -F csr=@author.csr --output author.crt
cat author.crt ca/gear_test_author_CA.cer > author-and-ca.crt
openssl pkcs12 -export -out author.p12 -inkey author.key.pem -in author-and-ca.crt -name usercertificate
# Distributor certificate
openssl genrsa -out distributor.key.pem 2048
openssl rsa -in distributor.key.pem -outform PEM -pubout -out distributor.key.pem.pub
openssl req -new -key distributor.key.pem -out distributor.csr -subj "/CN=TizenSDK" -addext "subjectAltName = URI:URN:tizen:packageid=,URI:URN:tizen:deviceid=<DEVICE_ID>"
curl -v -X POST https://dev.tizen.samsung.com:443/apis/v2/distributors -F access_token=<ACCESS_TOKEN> -F user_id=<USER_ID> -F privilege_level=Public -F developer_type=Individual -F csr=@distributor.csr --output distributor.crt
cat distributor.crt ca/samsung_tizen_dev_public2.crt > distributor-and-ca.crt
openssl pkcs12 -export -out distributor.p12 -inkey distributor.key.pem -in distributor-and-ca.crt -name usercertificate
@testuser7
Copy link

testuser7 commented Nov 16, 2024

They changed clientId in URL to get access token to: v285zxnl3h.
Additionally, the -legacy option must be used with openssl pkcs12 commands to use certificates with the SDK.

@testuser7
Copy link

Generating certificates for TV (VD) looks a bit different:

# Author certificate VD
openssl req -new -key author.key.pem -out author.csr -subj "/CN=<EMAIL_OR_NAME>"
curl -v -X POST https://dev.tizen.samsung.com:443/apis/v2/authors -F access_token=<ACCESS_TOKEN> -F user_id=<USER_ID> -F platform=VD -F csr=@author.csr --output author.crt
cat author.crt ca/vd_tizen_dev_author_ca.cer > author-and-ca.crt
openssl pkcs12 -export -out author.p12 -inkey author.key.pem -in author-and-ca.crt -name usercertificate -legacy

# Distributor certificate VD
openssl req -new -key distributor.key.pem -out distributor.csr -subj "/CN=TizenSDK/emailAddress=<EMAIL>" -addext "subjectAltName = URI:URN:tizen:packageid=,URI:URN:tizen:deviceid=<DEVICE_ID>"
curl -v -X POST https://dev.tizen.samsung.com:443/apis/v2/distributors -F access_token=<ACCESS_TOKEN> -F user_id=<USER_ID> -F platform=VD -F privilege_level=Public -F developer_type=Individual -F csr=@distributor.csr --output distributor.crt
cat distributor.crt ca/vd_tizen_dev_public2.crt > distributor-and-ca.crt
openssl pkcs12 -export -out distributor.p12 -inkey distributor.key.pem -in distributor-and-ca.crt -name usercertificate -legacy

@sreyemnayr
Copy link

I've created an app to do this work for us! Thanks for all of the research!
https://github.com/sreyemnayr/tizencertificates

@YusukeDS
Copy link

I've created an app to do this work for us! Thanks for all of the research! https://github.com/sreyemnayr/tizencertificates

does this work for samsung wearable like active 2 devices? the tizen studio certificate generators isnt working properly at this time..

@ilankas
Copy link

ilankas commented Oct 5, 2025

Try this url: https://svdca.samsungqbe.com/apis/v3/authors

@Luxiorawa
Copy link

The URL https://gitlab.com/andreas-mausch/moonwatch/-/tree/master/certificates doesn't work anymore, and the tizencertificates python script doesn't work anymore as well..

@sreyemnayr
Copy link

Hi @Luxiorawa / @YusukeDS , @ilankas was correct, the api url has changed. I updated tizencerticiates to now find the correct endpoints from the decompiled jar files instead of depending on a hard-coded address, as it does with the core certificates, service id, and loginUrl.

@andreas-mausch
Copy link
Author

Thank you @sreyemnayr, great work.
@Luxiorawa yea I made that project private for.. well personal reasons I guess.

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