diff --git a/cshake.go b/cshake.go index 59e5fe0..198c06c 100644 --- a/cshake.go +++ b/cshake.go @@ -147,7 +147,7 @@ func newSHAKE(size int) *SHAKE { C.go_openssl_EVP_MD_CTX_free(ctx) panic(newOpenSSLError("EVP_MD_CTX_ctrl")) } - s := &SHAKE{ctx: ctx} + s := &SHAKE{alg: alg, ctx: ctx} runtime.SetFinalizer(s, (*SHAKE).finalize) return s } diff --git a/goopenssl.c b/goopenssl.c index 0c70e4e..ff860ed 100644 --- a/goopenssl.c +++ b/goopenssl.c @@ -127,7 +127,7 @@ go_openssl_load_functions(void* handle, unsigned int major, unsigned int minor, DEFINEFUNC_INTERNAL(func, #func) \ } #define DEFINEFUNC_3_3(ret, func, args, argscall) \ - if (major == 3 && minor >= 3) \ + if (major == 3 && minor >= 3) \ { \ DEFINEFUNC_INTERNAL(func, #func) \ }