Skip to content

Commit a277df2

Browse files
committed
fixup! crypto: split OpenSSL 3, BoringSSL, and legacy backends
1 parent 577fea0 commit a277df2

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

deps/ncrypto/ncrypto.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,9 +3406,8 @@ struct DERView {
34063406
size_t len = 0;
34073407
};
34083408

3409-
int WriteDERView(const void* x, unsigned char** out, void* vctx) {
3410-
(void)x;
3411-
const auto* der = static_cast<const DERView*>(vctx);
3409+
int WriteDERView(const void* x, unsigned char** out) {
3410+
const auto* der = static_cast<const DERView*>(x);
34123411
if (der == nullptr || der->data == nullptr ||
34133412
der->len > static_cast<size_t>(INT_MAX)) {
34143413
return -1;
@@ -3436,12 +3435,11 @@ bool WriteEncryptedTraditionalPEM(BIO* bio,
34363435

34373436
OpenSSLBufferPointer der_storage(der);
34383437
DERView der_view{der_storage.get(), der_len};
3439-
return PEM_ASN1_write_bio_ctx(
3438+
return PEM_ASN1_write_bio(
34403439
WriteDERView,
3441-
&der_view,
34423440
PEM_STRING_RSA,
34433441
bio,
3444-
nullptr,
3442+
&der_view,
34453443
cipher,
34463444
reinterpret_cast<const unsigned char*>(passphrase.data),
34473445
static_cast<int>(passphrase.len),

0 commit comments

Comments
 (0)