ASN1_item_sign_ctx function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<ASN1_ITEM>, Pointer<X509_ALGOR>, Pointer<X509_ALGOR>, Pointer<ASN1_OCTET_STRING>, Pointer<Void>, Pointer<EVP_MD_CTX>)>(ffi.Pointer<ASN1_ITEM>, ffi.Pointer<X509_ALGOR>, ffi.Pointer<X509_ALGOR>, ffi.Pointer<ASN1_BIT_STRING>, ffi.Pointer<ffi.Void>, ffi.Pointer<EVP_MD_CTX>)>(symbol: 'bssl_dart_ASN1_item_sign_ctx')
int ASN1_item_sign_ctx(
  1. Pointer<ASN1_ITEM> it,
  2. Pointer<X509_ALGOR> algor1,
  3. Pointer<X509_ALGOR> algor2,
  4. Pointer<ASN1_OCTET_STRING> signature,
  5. Pointer<Void> asn,
  6. Pointer<EVP_MD_CTX> ctx,
)

ASN1_item_sign_ctx behaves like |ASN1_item_sign| except the signature is signed with |ctx|, |ctx|, which must have been initialized with |EVP_DigestSignInit|. The caller should configure the corresponding |EVP_PKEY_CTX| with any additional parameters before calling this function.

On success or failure, this function mutates |ctx| and resets it to the empty state. Caller should not rely on its contents after the function returns.

|algor1| and |algor2| may point into part of |asn| and will be updated before |asn| is serialized.

WARNING: |data| must be a pointer with the same type as |it|'s corresponding C type. Using the wrong type is a potentially exploitable memory error.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<ASN1_ITEM>,
    ffi.Pointer<X509_ALGOR>,
    ffi.Pointer<X509_ALGOR>,
    ffi.Pointer<ASN1_BIT_STRING>,
    ffi.Pointer<ffi.Void>,
    ffi.Pointer<EVP_MD_CTX>,
  )
>(symbol: 'bssl_dart_ASN1_item_sign_ctx')
external int ASN1_item_sign_ctx(
  ffi.Pointer<ASN1_ITEM> it,
  ffi.Pointer<X509_ALGOR> algor1,
  ffi.Pointer<X509_ALGOR> algor2,
  ffi.Pointer<ASN1_BIT_STRING> signature,
  ffi.Pointer<ffi.Void> asn,
  ffi.Pointer<EVP_MD_CTX> ctx,
);