aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-25 03:48:12 +0000
committerlloyd <[email protected]>2006-06-25 03:48:12 +0000
commitc405b67b168af39c23d084fa2e1ff073c628b87a (patch)
tree621d72df181652800f5886c9eb8d2494600f150a
parent58f2a24de7b6e7cbae80766b39815e4a18df64be (diff)
Alter the self-signed cert generating code to use the new version
of X509_CA::make_cert
-rw-r--r--src/x509self.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/x509self.cpp b/src/x509self.cpp
index d047f37a6..3e6f36e0f 100644
--- a/src/x509self.cpp
+++ b/src/x509self.cpp
@@ -97,12 +97,21 @@ X509_Certificate create_self_signed_cert(const X509_Cert_Options& opts,
else
constraints = find_constraints(key, opts.constraints);
+ Extensions extensions;
+
+ extensions.add(new Cert_Extension::Subject_Key_ID(pub_key));
+ extensions.add(new Cert_Extension::Key_Usage(constraints));
+ extensions.add(
+ new Cert_Extension::Extended_Key_Usage(opts.ex_constraints));
+ extensions.add(
+ new Cert_Extension::Subject_Alternative_Name(subject_alt));
+ extensions.add(
+ new Cert_Extension::Basic_Constraints(opts.is_CA, opts.path_limit));
+
return X509_CA::make_cert(signer.get(), sig_algo, pub_key,
- MemoryVector<byte>(), opts.start, opts.end,
+ opts.start, opts.end,
subject_dn, subject_dn,
- opts.is_CA, opts.path_limit,
- subject_alt, subject_alt,
- constraints, opts.ex_constraints);
+ extensions);
}
/*************************************************