Fix the SSL_stateless() return code
[openssl.git] / crypto / ec / ec_key.c
index fb8c3ed756cf4b964591cbea91b26c4c42e58fa4..387455317910dfb1dd0ad9aea000250d877f3c2b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved.
  * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
@@ -11,6 +11,7 @@
 #include "internal/cryptlib.h"
 #include <string.h>
 #include "ec_lcl.h"
+#include "internal/refcount.h"
 #include <openssl/err.h>
 #include <openssl/engine.h>
 
@@ -191,8 +192,6 @@ int EC_KEY_generate_key(EC_KEY *eckey)
 
 int ossl_ec_key_gen(EC_KEY *eckey)
 {
-    if (!ossl_assert(eckey->group->meth->keygen != NULL))
-        return 0;
     return eckey->group->meth->keygen(eckey);
 }