* Version 3.0.16 (unreleased)
-** Corrected SRP-RSA ciphersuites when used under TLS 1.2.
+** libgnutls: Corrected SRP-RSA ciphersuites when used under TLS 1.2.
-** Small fixes in p11tool handling of the --private command
+** p11tool: Small fixes in handling of the --private command
line option.
+** certtool: The template option allows for setting the DC option.
+
** API and ABI modifications:
No changes since last version.
char *challenge_password;
char *pkcs9_email;
char *country;
+ char **dc;
char **dns_name;
char **ip_addr;
char **email;
if (val != NULL && val->valType == OPARG_TYPE_STRING)
cfg.country = strdup(val->v.strVal);
+ READ_MULTI_LINE("dc", cfg.dc);
READ_MULTI_LINE("dns_name", cfg.dns_name);
READ_MULTI_LINE("ip_address", cfg.ip_addr);
READ_MULTI_LINE("email", cfg.email);
}
}
-
void
get_email_set (int type, void *crt)
{
}
}
+
+void
+get_dc_set (int type, void *crt)
+{
+ int ret = 0, i;
+
+ if (batch)
+ {
+ if (!cfg.dc)
+ return;
+
+ for (i = 0; cfg.dc[i] != NULL; i++)
+ {
+ if (type == TYPE_CRT)
+ ret = gnutls_x509_crt_set_dn_by_oid (crt, GNUTLS_OID_LDAP_DC,
+ 0, cfg.dc[i], strlen (cfg.dc[i]));
+ else
+ ret = gnutls_x509_crq_set_dn_by_oid (crt, GNUTLS_OID_LDAP_DC,
+ 0, cfg.dc[i], strlen (cfg.dc[i]));
+
+ if (ret < 0)
+ break;
+ }
+ }
+ else
+ {
+ const char *p;
+
+ do
+ {
+ p = read_str ("Enter the subject's domain component (DC): ");
+ if (!p)
+ return;
+
+ if (type == TYPE_CRT)
+ ret = gnutls_x509_crt_set_dn_by_oid (crt, GNUTLS_OID_LDAP_DC,
+ 0, p, strlen (p));
+ else
+ ret = gnutls_x509_crq_set_dn_by_oid (crt, GNUTLS_OID_LDAP_DC,
+ 0, p, strlen (p));
+ }
+ while(p != NULL);
+ }
+
+ if (ret < 0)
+ {
+ fprintf (stderr, "set_dn_by_oid: %s\n", gnutls_strerror (ret));
+ exit (1);
+ }
+}
+
void
get_dns_name_set (int type, void *crt)
{
void get_dns_name_set (int type, void *crt);
void get_email_set (int type, void *crt);
int get_ipsec_ike_status (void);
+void get_dc_set (int type, void *crt);
void get_cn_crq_set (gnutls_x509_crq_t crq);
void get_uid_crq_set (gnutls_x509_crq_t crq);
get_locality_crt_set (crt);
get_state_crt_set (crt);
get_cn_crt_set (crt);
+ get_dc_set (TYPE_CRT, crt);
get_uid_crt_set (crt);
get_oid_crt_set (crt);
get_key_purpose_set (crt);
get_locality_crq_set (crq);
get_state_crq_set (crq);
get_cn_crq_set (crq);
+ get_dc_set (TYPE_CRQ, crq);
get_uid_crq_set (crq);
get_oid_crq_set (crq);