Home
last modified time | relevance | path

Searched refs:siglen (Results 1 – 25 of 72) sorted by relevance

123

/openssl/crypto/rsa/
H A Drsa_saos.c25 unsigned char *sigret, unsigned int *siglen, in RSA_sign_ASN1_OCTET_STRING() argument
51 *siglen = i; in RSA_sign_ASN1_OCTET_STRING()
60 unsigned int siglen, RSA *rsa) in RSA_verify_ASN1_OCTET_STRING() argument
67 if (siglen != (unsigned int)RSA_size(rsa)) { in RSA_verify_ASN1_OCTET_STRING()
72 s = OPENSSL_malloc((unsigned int)siglen); in RSA_verify_ASN1_OCTET_STRING()
75 i = RSA_public_decrypt((int)siglen, sigbuf, s, rsa, RSA_PKCS1_PADDING); in RSA_verify_ASN1_OCTET_STRING()
93 OPENSSL_clear_free(s, (unsigned int)siglen); in RSA_verify_ASN1_OCTET_STRING()
H A Drsa_sign.c288 unsigned char *sigret, unsigned int *siglen, RSA *rsa) in RSA_sign() argument
297 return rsa->meth->rsa_sign(type, m, m_len, sigret, siglen, rsa) > 0; in RSA_sign()
328 *siglen = encrypt_len; in RSA_sign()
347 const unsigned char *sigbuf, size_t siglen, RSA *rsa) in ossl_rsa_verify() argument
353 if (siglen != (size_t)RSA_size(rsa)) { in ossl_rsa_verify()
359 decrypt_buf = OPENSSL_malloc(siglen); in ossl_rsa_verify()
363 len = RSA_public_decrypt((int)siglen, sigbuf, decrypt_buf, rsa, in ossl_rsa_verify()
457 OPENSSL_clear_free(decrypt_buf, siglen); in ossl_rsa_verify()
462 const unsigned char *sigbuf, unsigned int siglen, RSA *rsa) in RSA_verify() argument
466 return rsa->meth->rsa_verify(type, m, m_len, sigbuf, siglen, rsa); in RSA_verify()
[all …]
/openssl/crypto/evp/
H A Dm_sigver.c467 size_t *siglen) in EVP_DigestSignFinal() argument
491 sigret, siglen, in EVP_DigestSignFinal()
515 r = pctx->pmeth->signctx(pctx, sigret, siglen, ctx); in EVP_DigestSignFinal()
521 r = dctx->pmeth->signctx(dctx, sigret, siglen, ctx); in EVP_DigestSignFinal()
557 if (EVP_PKEY_sign(pctx, sigret, siglen, md, mdlen) <= 0) in EVP_DigestSignFinal()
603 return EVP_DigestSignFinal(ctx, sigret, siglen); in EVP_DigestSign()
607 size_t siglen) in EVP_DigestVerifyFinal() argument
633 sig, siglen); in EVP_DigestVerifyFinal()
658 r = pctx->pmeth->verifyctx(pctx, sig, siglen, ctx); in EVP_DigestVerifyFinal()
679 return EVP_PKEY_verify(pctx, sig, siglen, md, mdlen); in EVP_DigestVerifyFinal()
[all …]
H A Dp_sign.c18 unsigned int *siglen, EVP_PKEY *pkey, OSSL_LIB_CTX *libctx, in EVP_SignFinal_ex() argument
27 *siglen = 0; in EVP_SignFinal_ex()
60 *siglen = sltmp; in EVP_SignFinal_ex()
68 unsigned int *siglen, EVP_PKEY *pkey) in EVP_SignFinal() argument
70 return EVP_SignFinal_ex(ctx, sigret, siglen, pkey, NULL, NULL); in EVP_SignFinal()
H A Dp_verify.c18 unsigned int siglen, EVP_PKEY *pkey, OSSL_LIB_CTX *libctx, in EVP_VerifyFinal_ex() argument
55 i = EVP_PKEY_verify(pkctx, sigbuf, siglen, m, m_len); in EVP_VerifyFinal_ex()
62 unsigned int siglen, EVP_PKEY *pkey) in EVP_VerifyFinal() argument
64 return EVP_VerifyFinal_ex(ctx, sigbuf, siglen, pkey, NULL, NULL); in EVP_VerifyFinal()
H A Dsignature.c861 unsigned char *sig, size_t *siglen) in EVP_PKEY_sign_message_final() argument
879 sig, siglen, in EVP_PKEY_sign_message_final()
884 unsigned char *sig, size_t *siglen, in EVP_PKEY_sign() argument
908 ret = ctx->op.sig.signature->sign(ctx->op.sig.algctx, sig, siglen, in EVP_PKEY_sign()
919 M_check_autoarg(ctx, sig, siglen, EVP_F_EVP_PKEY_SIGN) in EVP_PKEY_sign()
920 return ctx->pmeth->sign(ctx, sig, siglen, tbs, tbslen); in EVP_PKEY_sign()
960 (char *)sig, siglen); in EVP_PKEY_CTX_set_signature()
1010 const unsigned char *sig, size_t siglen, in EVP_PKEY_verify() argument
1044 return ctx->pmeth->verify(ctx, sig, siglen, tbs, tbslen); in EVP_PKEY_verify()
1066 const unsigned char *sig, size_t siglen) in EVP_PKEY_verify_recover() argument
[all …]
/openssl/test/
H A Dfake_rsaprov.c333 size_t *siglen, size_t sigsize, in fake_rsa_sig_sign() argument
342 *siglen = 256; in fake_rsa_sig_sign()
345 if (!TEST_int_ge(sigsize, *siglen)) in fake_rsa_sig_sign()
349 memset(sig, 'a', *siglen); in fake_rsa_sig_sign()
454 if (siglen) { in fake_rsa_dgstsgnvfy_final()
455 *siglen = 256; in fake_rsa_dgstsgnvfy_final()
458 if (!TEST_int_ge(sigsize, *siglen)) in fake_rsa_dgstsgnvfy_final()
461 memset(sig, 'a', *siglen); in fake_rsa_dgstsgnvfy_final()
473 size_t siglen) in fake_rsa_dgstvfy_final() argument
475 return fake_rsa_dgstsgnvfy_final(ctx, sig, NULL, siglen); in fake_rsa_dgstvfy_final()
[all …]
H A Decdsatest.c354 unsigned int siglen; in test_ecdsa_sig_NULL() local
366 && TEST_int_eq(ECDSA_sign(0, dgst, sizeof(dgst), sig, &siglen, in test_ecdsa_sig_NULL()
368 && TEST_int_gt(siglen, 0) in test_ecdsa_sig_NULL()
369 && TEST_int_le(siglen, siglen0) in test_ecdsa_sig_NULL()
370 && TEST_int_eq(ECDSA_verify(0, dgst, sizeof(dgst), sig, siglen, in test_ecdsa_sig_NULL()
373 && TEST_int_eq(ECDSA_sign_ex(0, dgst, sizeof(dgst), NULL, &siglen, in test_ecdsa_sig_NULL()
375 && TEST_int_gt(siglen, 0) in test_ecdsa_sig_NULL()
376 && TEST_int_le(siglen, siglen0) in test_ecdsa_sig_NULL()
379 && TEST_int_eq(siglen, siglen0) in test_ecdsa_sig_NULL()
380 && TEST_int_eq(ECDSA_verify(0, dgst, sizeof(dgst), sig, siglen, in test_ecdsa_sig_NULL()
H A Drsa_test.c581 unsigned int siglen = 0; in test_rsa_saos() local
667 if (!TEST_true(RSA_sign_ASN1_OCTET_STRING(0, in, inlen, sig, &siglen, in test_rsa_saos()
670 if (!TEST_true(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, sig, siglen, rsa_pub))) in test_rsa_saos()
674 if (!TEST_false(RSA_sign_ASN1_OCTET_STRING(0, in, inlen + 1, sig, &siglen, in test_rsa_saos()
679 if (!TEST_false(RSA_sign_ASN1_OCTET_STRING(0, in, inlen, sig, &siglen, in test_rsa_saos()
684 if (!TEST_false(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, sig, siglen - 1, rsa_pub))) in test_rsa_saos()
701 if (!TEST_false(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, sig, siglen, rsa_pub))) in test_rsa_saos()
/openssl/crypto/dsa/
H A Ddsa_sign.c154 unsigned char *sig, unsigned int *siglen, DSA *dsa, in ossl_dsa_sign_int() argument
161 *siglen = DSA_size(dsa); in ossl_dsa_sign_int()
172 *siglen = 0; in ossl_dsa_sign_int()
175 *siglen = i2d_DSA_SIG(s, &sig); in ossl_dsa_sign_int()
181 unsigned char *sig, unsigned int *siglen, DSA *dsa) in DSA_sign() argument
183 return ossl_dsa_sign_int(type, dgst, dlen, sig, siglen, dsa, in DSA_sign()
195 const unsigned char *sigbuf, int siglen, DSA *dsa) in DSA_verify() argument
206 if (d2i_DSA_SIG(&s, &p, siglen) == NULL) in DSA_verify()
210 if (derlen != siglen || memcmp(sigbuf, der, derlen)) in DSA_verify()
/openssl/providers/implementations/signature/
H A Ddsa_sig.c110 size_t siglen; member
346 *siglen = dsasize; in dsa_sign_directly()
362 *siglen = sltmp; in dsa_sign_directly()
379 size_t *siglen, size_t sigsize) in dsa_sign_message_final() argument
490 const unsigned char *sig, size_t siglen, in dsa_verify() argument
496 if (dsa_verify_set_sig(pdsactx, sig, siglen) <= 0) in dsa_verify()
568 size_t *siglen, size_t sigsize) in dsa_digest_sign_final() argument
579 ok = dsa_sign_message_final(pdsactx, sig, siglen, sigsize); in dsa_digest_sign_final()
595 size_t siglen) in dsa_digest_verify_final() argument
606 if (dsa_verify_set_sig(pdsactx, sig, siglen)) in dsa_digest_verify_final()
[all …]
H A Decdsa_sig.c108 size_t siglen; member
328 *siglen = ecsize; in ecdsa_sign_directly()
359 *siglen = sltmp; in ecdsa_sign_directly()
440 return ECDSA_verify(0, tbs, tbslen, sig, siglen, ctx->ec); in ecdsa_verify_directly()
472 return ecdsa_verify_directly(vctx, ctx->sig, ctx->siglen, in ecdsa_verify_message_final()
481 const unsigned char *sig, size_t siglen, in ecdsa_verify() argument
487 if (ecdsa_verify_set_sig(ctx, sig, siglen) <= 0) in ecdsa_verify()
571 ok = ecdsa_sign_message_final(ctx, sig, siglen, sigsize); in ecdsa_digest_sign_final()
587 size_t siglen) in ecdsa_digest_verify_final() argument
599 if (ecdsa_verify_set_sig(ctx, sig, siglen)) in ecdsa_digest_verify_final()
[all …]
H A Deddsa_sig.c394 *siglen = ED25519_SIGSIZE; in ed25519_sign()
421 *siglen = ED25519_SIGSIZE; in ed25519_sign()
454 *siglen = ED25519_SIGSIZE; in ed25519_sign()
502 *siglen = ED448_SIGSIZE; in ed448_sign()
527 *siglen = ED448_SIGSIZE; in ed448_sign()
556 *siglen = ED448_SIGSIZE; in ed448_sign()
565 const unsigned char *sig, size_t siglen, in ed25519_verify() argument
573 if (!ossl_prov_is_running() || siglen != ED25519_SIGSIZE) in ed25519_verify()
623 const unsigned char *sig, size_t siglen, in ed448_verify() argument
631 if (!ossl_prov_is_running() || siglen != ED448_SIGSIZE) in ed448_verify()
[all …]
H A Drsa_sig.c143 size_t siglen; member
688 *siglen = rsasize; in rsa_sign_directly()
826 *siglen = ret; in rsa_sign_directly()
1049 sig, siglen) <= 0) in rsa_verify_directly()
1166 const unsigned char *sig, size_t siglen, in rsa_verify() argument
1179 return rsa_verify_set_sig(prsactx, sig, siglen) in rsa_verify()
1252 size_t *siglen, size_t sigsize) in rsa_digest_sign_final() argument
1263 if (rsa_sign_message_final(prsactx, sig, siglen, sigsize)) in rsa_digest_sign_final()
1296 size_t siglen) in rsa_digest_verify_final() argument
1307 if (rsa_verify_set_sig(prsactx, sig, siglen) in rsa_digest_verify_final()
[all …]
H A Dsm2_sig.c161 static int sm2sig_sign(void *vpsm2ctx, unsigned char *sig, size_t *siglen, in sm2sig_sign() argument
171 *siglen = ecsize; in sm2sig_sign()
185 *siglen = sltmp; in sm2sig_sign()
189 static int sm2sig_verify(void *vpsm2ctx, const unsigned char *sig, size_t siglen, in sm2sig_verify() argument
197 return ossl_sm2_internal_verify(tbs, tbslen, sig, siglen, ctx->ec); in sm2sig_verify()
291 int sm2sig_digest_sign_final(void *vpsm2ctx, unsigned char *sig, size_t *siglen, in sm2sig_digest_sign_final() argument
311 return sm2sig_sign(vpsm2ctx, sig, siglen, sigsize, digest, (size_t)dlen); in sm2sig_digest_sign_final()
316 size_t siglen) in sm2sig_digest_verify_final() argument
334 return sm2sig_verify(vpsm2ctx, sig, siglen, digest, (size_t)dlen); in sm2sig_digest_verify_final()
/openssl/doc/man3/
H A DEVP_PKEY_sign.pod24 unsigned char *sig, size_t *siglen,
79 I<siglen> parameter.
159 size_t mdlen = 32, siglen;
181 sig = OPENSSL_malloc(siglen);
186 if (EVP_PKEY_sign(ctx, sig, &siglen, md, mdlen) <= 0)
204 size_t mdlen = 32, siglen;
224 sig = OPENSSL_malloc(siglen);
249 size_t inlen, siglen;
271 sig = OPENSSL_malloc(siglen);
294 size_t inlen, siglen;
[all …]
H A DEVP_PKEY_meth_new.pod70 size_t siglen,
89 size_t *siglen,
96 int siglen,
126 size_t *siglen,
170 size_t siglen,
189 size_t *siglen,
196 int siglen,
293 int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
302 const unsigned char *sig, size_t siglen,
311 const unsigned char *sig, size_t siglen);
[all …]
H A DEVP_PKEY_verify.pod21 const unsigned char *sig, size_t siglen);
26 const unsigned char *sig, size_t siglen,
170 size_t mdlen, siglen;
188 ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);
208 size_t mdlen = 32, siglen;
224 if (EVP_PKEY_verify(ctx, sig, siglen, md, mdlen) <= 0)
228 ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);
249 size_t inlen, siglen;
268 ret = EVP_PKEY_verify(ctx, sig, siglen, in, inlen);
287 size_t inlen, siglen;
[all …]
H A DRSA_sign_ASN1_OCTET_STRING.pod17 unsigned int *siglen, RSA *rsa);
21 unsigned int siglen, RSA *rsa);
31 in B<siglen>. B<sigret> must point to B<RSA_size(rsa)> bytes of
42 of size B<siglen> is the DER representation of a given octet string
/openssl/crypto/ec/
H A Decdsa_sign.c36 *sig, unsigned int *siglen, EC_KEY *eckey) in ECDSA_sign() argument
38 return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey); in ECDSA_sign()
42 unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, in ECDSA_sign_ex() argument
46 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex()
H A Decx_meth.c816 *siglen = ED25519_SIGSIZE; in pkey_ecd_digestsign25519()
829 *siglen = ED25519_SIGSIZE; in pkey_ecd_digestsign25519()
845 *siglen = ED448_SIGSIZE; in pkey_ecd_digestsign448()
848 if (*siglen < ED448_SIGSIZE) { in pkey_ecd_digestsign448()
856 *siglen = ED448_SIGSIZE; in pkey_ecd_digestsign448()
871 if (siglen != ED25519_SIGSIZE) in pkey_ecd_digestverify25519()
891 if (siglen != ED448_SIGSIZE) in pkey_ecd_digestverify448()
1228 *siglen = ED25519_SIGSIZE; in s390x_pkey_ecd_digestsign25519()
1253 *siglen = ED448_SIGSIZE; in s390x_pkey_ecd_digestsign448()
1275 *siglen = ED448_SIGSIZE; in s390x_pkey_ecd_digestsign448()
[all …]
/openssl/util/perl/TLSProxy/
H A DCertificateVerify.pm61 my $siglen = unpack('n', substr($remdata, 0, 2));
64 die "Invalid CertificateVerify signature length" if length($sig) != $siglen;
67 print " Signature Len:".$siglen."\n";
/openssl/apps/
H A Ddgst.c28 EVP_PKEY *key, unsigned char *sigin, int siglen,
108 int separator = 0, debug = 0, keyform = FORMAT_UNDEF, siglen = 0; in dgst_main() local
401 siglen = EVP_PKEY_get_size(sigkey); in dgst_main()
402 sigbuf = app_malloc(siglen, "signature buffer"); in dgst_main()
403 siglen = BIO_read(sigbio, sigbuf, siglen); in dgst_main()
405 if (siglen <= 0) { in dgst_main()
440 siglen, NULL, md_name, "stdin"); in dgst_main()
456 sigkey, sigbuf, siglen, sig_name, md_name, argv[i])) in dgst_main()
549 EVP_PKEY *key, unsigned char *sigin, int siglen, in do_fp() argument
569 i = EVP_DigestVerifyFinal(ctx, sigin, (unsigned int)siglen); in do_fp()
/openssl/crypto/ct/
H A Dct_oct.c26 size_t siglen; in o2i_SCT_signature() local
55 n2s(p, siglen); in o2i_SCT_signature()
57 if (siglen > len_remaining) { in o2i_SCT_signature()
62 if (SCT_set1_signature(sct, p, siglen) != 1) in o2i_SCT_signature()
64 len_remaining -= siglen; in o2i_SCT_signature()
65 *in = p + siglen; in o2i_SCT_signature()
/openssl/crypto/cms/
H A Dcms_sd.c761 size_t siglen; in cms_SignerInfo_content_sign() local
771 siglen = EVP_PKEY_get_size(si->pkey); in cms_SignerInfo_content_sign()
772 if (siglen == 0 || (sig = OPENSSL_malloc(siglen)) == NULL) in cms_SignerInfo_content_sign()
778 ASN1_STRING_set0(si->signature, sig, siglen); in cms_SignerInfo_content_sign()
781 unsigned int siglen; in cms_SignerInfo_content_sign() local
787 siglen = EVP_PKEY_get_size(si->pkey); in cms_SignerInfo_content_sign()
788 if (siglen == 0 || (sig = OPENSSL_malloc(siglen)) == NULL) in cms_SignerInfo_content_sign()
797 ASN1_STRING_set0(si->signature, sig, siglen); in cms_SignerInfo_content_sign()
834 size_t siglen; in CMS_SignerInfo_sign() local
872 abuf = OPENSSL_malloc(siglen); in CMS_SignerInfo_sign()
[all …]

Completed in 66 milliseconds

123