Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions cert_tools/create_v2_certificate_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ def create_badge_section(config):


def create_verification_section(config):
verification = {
'type': ['MerkleProofVerification2017', 'Extension'],
'publicKey': config.issuer_public_key
if config.verification_type == 'openbadge_hosted':
verification = {
'type': 'hosted'
}
else:
verification = {
'type': ['MerkleProofVerification2017', 'Extension'],
'publicKey': config.issuer_public_key

}
}
return verification


Expand Down Expand Up @@ -179,7 +184,8 @@ def get_config():
help='additional global fields')
p.add_argument('--additional_per_recipient_fields', action=helpers.make_action('per_recipient_fields'),
help='additional per-recipient fields')
p.add_argument('--display_html', type=str, help='html content to display')
p.add_argument('--display_html', type=str, help='html content to display'),
p.add_argument('--verification_type', type=str, default='merkle', help='verification type')

args, _ = p.parse_known_args()
args.abs_data_dir = os.path.abspath(os.path.join(cwd, args.data_dir))
Expand Down
3 changes: 3 additions & 0 deletions conf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ issuer_logo_file = images/logo.png
cert_image_file = images/certificate-image.png
issuer_signature_file = images/issuer-signature.png

# verification type: merkle (default) or openbadge_hosted
verification_type = openbadge_hosted

###################
## TEMPLATE DATA ##
###################
Expand Down