aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_sign.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2003-01-24 21:43:08 +0000
committerBodo Möller <bodo@openssl.org>2003-01-24 21:43:08 +0000
commit9048c7245b095db7fa2f153777ce61e64c6cdd82 (patch)
treecc01f821532f9653ba2f1c88d4c4e3ac3436bd9a /crypto/asn1/a_sign.c
parent02bf9a151a435ceaa170f4b46387bba3afac0a78 (diff)
downloadopenssl-9048c7245b095db7fa2f153777ce61e64c6cdd82.tar.gz
For ecdsa-with-SHA1, as for id-dsa-with-sha1, omit 'parameters'
in AlgorithmIdentifier Submitted by: Nils Larsch
Diffstat (limited to 'crypto/asn1/a_sign.c')
-rw-r--r--crypto/asn1/a_sign.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c
index 52ce7e3974..37e1e84a11 100644
--- a/crypto/asn1/a_sign.c
+++ b/crypto/asn1/a_sign.c
@@ -56,7 +56,7 @@
* [including the GNU Public Licence.]
*/
/* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -229,10 +229,11 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
else
a=algor2;
if (a == NULL) continue;
- if (type->pkey_type == NID_dsaWithSHA1)
+ if (type->pkey_type == NID_dsaWithSHA1 ||
+ type->pkey_type == NID_ecdsa_with_SHA1)
{
- /* special case: RFC 2459 tells us to omit 'parameters'
- * with id-dsa-with-sha1 */
+ /* special case: RFC 3279 tells us to omit 'parameters'
+ * with id-dsa-with-sha1 and ecdsa-with-SHA1 */
ASN1_TYPE_free(a->parameter);
a->parameter = NULL;
}