aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/ca.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-09 13:22:52 +0000
committerlloyd <[email protected]>2009-11-09 13:22:52 +0000
commit4049ba134674d78c07c8b0453cb5e5f312469639 (patch)
treeb9214ede8da1600a46560fe061017fa124b2b465 /doc/examples/ca.cpp
parentb5d4cf01a893718c8796652f3cf0f68b867bab94 (diff)
In creating X.509 certificates and PKCS #10 requests, let (actually: require)
the user to specify the hash function to use, instead of always using SHA-1. This was a sensible default a few years ago, when there wasn't a ~2^60 attack on SHA-1 and support for SHA-2 was pretty much nil, but using something else makes a lot more sense these days.
Diffstat (limited to 'doc/examples/ca.cpp')
-rw-r--r--doc/examples/ca.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/ca.cpp b/doc/examples/ca.cpp
index 41dd409d5..9195be418 100644
--- a/doc/examples/ca.cpp
+++ b/doc/examples/ca.cpp
@@ -47,7 +47,7 @@ int main(int argc, char* argv[])
PKCS8::load_key(arg_ca_key, rng, arg_passphrase)
);
- X509_CA ca(ca_cert, *privkey);
+ X509_CA ca(ca_cert, *privkey, "SHA-256");
// got a request
PKCS10_Request req(arg_req_file);