summaryrefslogtreecommitdiff
path: root/src/certtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/certtool.c')
-rw-r--r--src/certtool.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/certtool.c b/src/certtool.c
index 20ae26c44e..72b7778207 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -579,6 +579,18 @@ generate_certificate(gnutls_privkey_t * ret_key,
}
}
+ result = get_email_protection_status();
+ if (result) {
+ result =
+ gnutls_x509_crt_set_key_purpose_oid
+ (crt, GNUTLS_KP_EMAIL_PROTECTION, 0);
+ if (result < 0) {
+ fprintf(stderr, "key_kp: %s\n",
+ gnutls_strerror(result));
+ app_exit(1);
+ }
+ }
+
if (ca_status) {
result = get_cert_sign_status();
if (result)
@@ -2081,6 +2093,18 @@ void generate_request(common_info_st * cinfo)
}
}
+ ret = get_email_protection_status();
+ if (ret) {
+ ret =
+ gnutls_x509_crq_set_key_purpose_oid
+ (crq, GNUTLS_KP_EMAIL_PROTECTION, 0);
+ if (ret < 0) {
+ fprintf(stderr, "key_kp: %s\n",
+ gnutls_strerror(ret));
+ app_exit(1);
+ }
+ }
+
ret = get_ipsec_ike_status();
if (ret) {
ret = gnutls_x509_crq_set_key_purpose_oid