speed-update

This commit is contained in:
Gorachya
2019-09-06 15:48:13 +08:00
parent daa5001175
commit 6ed1124625
4 changed files with 295 additions and 101 deletions

View File

@@ -51,6 +51,8 @@
#include <openssl/err.h>
#include <openssl/sm9.h>
#include <openssl/ec.h>
#include <openssl/ec_type1.h>
#include <openssl/bn_gfp2.h>
#include "sm9_lcl.h"
@@ -196,6 +198,8 @@ end:
BN_free(r);
point_cleanup(&Ppubs);
fp12_cleanup(w);
BN_CTX_end(bn_ctx);
BN_CTX_free(bn_ctx);
return ret;
}
@@ -353,9 +357,7 @@ end:
point_cleanup(&P);
fp12_cleanup(w);
fp12_cleanup(u);
if (bn_ctx) {
BN_CTX_end(bn_ctx);
}
BN_CTX_end(bn_ctx);
BN_CTX_free(bn_ctx);
return ret;
}