protected static KeyPair signWithEcdsa() {
        KeyPair keyPair = null;
        try {
            ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1");
            KeyPairGenerator g = KeyPairGenerator.getInstance("EC");
            g.initialize(ecSpec, new SecureRandom());
            java.security.KeyPair keypair = g.generateKeyPair();
            PublicKey publicKey = keypair.getPublic();
            PrivateKey privateKey = keypair.getPrivate();
            ContentSigner signer = new JcaContentSignerBuilder("SHA256withECDSA").build(privateKey);
            keyPair = new KeyPair(publicKey, privateKey, signer);
        } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException | OperatorCreationException e) {
            logger.error(
                    CONFIG_SSL_CERT_GENERATE_FAILED,
                    "",
                    "",
                    "Generate Key with secp256r1 algorithm failed. Please check if your system support. "
                            + "Will attempt to generate with RSA2048.",
                    e);
        }
        return keyPair;
    }
@Test
    void testSignWithEcdsa() {
        DubboCertManager.KeyPair keyPair = DubboCertManager.signWithEcdsa();
        Assertions.assertNotNull(keyPair);
        Assertions.assertNotNull(keyPair.getPrivateKey());
        Assertions.assertNotNull(keyPair.getPublicKey());
        Assertions.assertNotNull(keyPair.getSigner());
    }