support of ECDSA signatures for all certificate types
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 22 Jun 2008 17:41:07 +0000 (17:41 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 22 Jun 2008 17:41:07 +0000 (17:41 -0000)
src/libstrongswan/plugins/x509/x509_ac.c
src/libstrongswan/plugins/x509/x509_crl.c
src/libstrongswan/plugins/x509/x509_ocsp_request.c
src/libstrongswan/plugins/x509/x509_ocsp_response.c

index 4a9e1cd..cfa38c6 100644 (file)
@@ -796,6 +796,9 @@ static bool issued_by(private_x509_ac_t *this, certificate_t *issuer)
                case OID_SHA512_WITH_RSA:
                        scheme = SIGN_RSA_EMSA_PKCS1_SHA512;
                        break;
+               case OID_ECDSA_WITH_SHA1:
+                       scheme = SIGN_ECDSA_WITH_SHA1;
+                       break;
                default:
                        return FALSE;
        }
index 15ca74b..83496cb 100644 (file)
@@ -452,6 +452,9 @@ static bool issued_by(private_x509_crl_t *this, certificate_t *issuer)
                case OID_SHA512_WITH_RSA:
                        scheme = SIGN_RSA_EMSA_PKCS1_SHA512;
                        break;
+               case OID_ECDSA_WITH_SHA1:
+                       scheme = SIGN_ECDSA_WITH_SHA1;
+                       break;
                default:
                        return FALSE;
        }
index 9f27f23..0fc5b9d 100644 (file)
@@ -267,6 +267,10 @@ static chunk_t build_optionalSignature(private_x509_ocsp_request_t *this,
                        oid = OID_SHA1_WITH_RSA;
                        scheme = SIGN_RSA_EMSA_PKCS1_SHA1;
                        break;
+               case KEY_ECDSA:
+                       oid = OID_ECDSA_WITH_SHA1;
+                       scheme = SIGN_ECDSA_WITH_SHA1;
+                       break;
                default:
                        DBG1("unable to sign OCSP request, %N signature not supported",
                                 key_type_names, this->key->get_type(this->key));
index 3c28ba0..3fd293d 100644 (file)
@@ -745,6 +745,9 @@ static bool issued_by(private_x509_ocsp_response_t *this, certificate_t *issuer)
                case OID_SHA512_WITH_RSA:
                        scheme = SIGN_RSA_EMSA_PKCS1_SHA512;
                        break;
+               case OID_ECDSA_WITH_SHA1:
+                       scheme = SIGN_ECDSA_WITH_SHA1;
+                       break;
                default:
                        return FALSE;
        }