EmailChallenge: add requester's certificate name into the email content
Change-Id: I3231640daf0daa9edbac1fea694fbbbdcdb353fa
diff --git a/ndncert-send-email-challenge.py b/ndncert-send-email-challenge.py
index 1916791..df9ca4d 100755
--- a/ndncert-send-email-challenge.py
+++ b/ndncert-send-email-challenge.py
@@ -14,6 +14,7 @@
parser.add_argument("email", help="the receiver email address")
parser.add_argument("secret", help="the secret of the challenge")
parser.add_argument("caName", help="the CA name")
+parser.add_argument("certName", help="the Ceritifcate being requested")
args = parser.parse_args()
# open config
@@ -30,8 +31,8 @@
# read email settings
msg_from = confParser.get('ndncert_email_settings', 'MAIL_FROM')
subject = confParser.get('ndncert_email_settings', 'SUBJECT')
-text = confParser.get('ndncert_email_settings', 'TEXT_TEMPLATE').format(args.secret, args.caName)
-html = confParser.get('ndncert_email_settings', 'HTML_TEMPLATE').format(args.secret, args.caName)
+text = confParser.get('ndncert_email_settings', 'TEXT_TEMPLATE').format(args.secret, args.caName, args.certName)
+html = confParser.get('ndncert_email_settings', 'HTML_TEMPLATE').format(args.secret, args.caName, args.certName)
# form email message
msg = MIMEMultipart('alternative')