MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ossl_lookup_hash

Function ossl_lookup_hash

freebsd/crypto/openssl/ossl.c:118–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118static struct auth_hash *
119ossl_lookup_hash(const struct crypto_session_params *csp)
120{
121
122 switch (csp->csp_auth_alg) {
123 case CRYPTO_SHA1:
124 case CRYPTO_SHA1_HMAC:
125 return (&ossl_hash_sha1);
126 case CRYPTO_SHA2_224:
127 case CRYPTO_SHA2_224_HMAC:
128 return (&ossl_hash_sha224);
129 case CRYPTO_SHA2_256:
130 case CRYPTO_SHA2_256_HMAC:
131 return (&ossl_hash_sha256);
132 case CRYPTO_SHA2_384:
133 case CRYPTO_SHA2_384_HMAC:
134 return (&ossl_hash_sha384);
135 case CRYPTO_SHA2_512:
136 case CRYPTO_SHA2_512_HMAC:
137 return (&ossl_hash_sha512);
138 default:
139 return (NULL);
140 }
141}
142
143static int
144ossl_probesession(device_t dev, const struct crypto_session_params *csp)

Callers 2

ossl_probesessionFunction · 0.85
ossl_newsessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected