File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ static const rb_data_type_t ossl_bn_type = {
3737 {
3838 0 , ossl_bn_free ,
3939 },
40- 0 , 0 , RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED ,
40+ 0 , 0 , RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FROZEN_SHAREABLE ,
4141};
4242
4343/*
@@ -689,6 +689,7 @@ BIGNUM_3c(mod_exp)
689689 ossl_bn_ ##func (VALUE self, VALUE bit) \
690690 { \
691691 BIGNUM *bn; \
692+ rb_check_frozen(self); \
692693 GetBN(self, bn); \
693694 if (BN_##func(bn, NUM2INT(bit)) <= 0) { \
694695 ossl_raise(eBNError, NULL); \
@@ -778,6 +779,7 @@ BIGNUM_SHIFT(rshift)
778779 { \
779780 BIGNUM *bn; \
780781 int b; \
782+ rb_check_frozen(self); \
781783 b = NUM2INT(bits); \
782784 GetBN(self, bn); \
783785 if (BN_##func(bn, bn, b) <= 0) \
@@ -1187,6 +1189,7 @@ ossl_bn_set_flags(VALUE self, VALUE arg)
11871189 BIGNUM * bn ;
11881190 GetBN (self , bn );
11891191
1192+ rb_check_frozen (self );
11901193 BN_set_flags (bn , NUM2INT (arg ));
11911194 return Qnil ;
11921195}
You can’t perform that action at this time.
0 commit comments