1 | package com.yubico.fido.metadata; | |
2 | ||
3 | import com.fasterxml.jackson.databind.JavaType; | |
4 | import com.fasterxml.jackson.databind.type.TypeFactory; | |
5 | import com.fasterxml.jackson.databind.util.Converter; | |
6 | import com.yubico.webauthn.data.ByteArray; | |
7 | import java.security.cert.CertificateEncodingException; | |
8 | import java.security.cert.X509Certificate; | |
9 | ||
10 | class CertToBase64Converter implements Converter<X509Certificate, String> { | |
11 | @Override | |
12 | public String convert(X509Certificate value) { | |
13 | try { | |
14 |
1
1. convert : replaced return value with "" for com/yubico/fido/metadata/CertToBase64Converter::convert → KILLED |
return new ByteArray(value.getEncoded()).getBase64(); |
15 | } catch (CertificateEncodingException e) { | |
16 | throw new RuntimeException(e); | |
17 | } | |
18 | } | |
19 | ||
20 | @Override | |
21 | public JavaType getInputType(TypeFactory typeFactory) { | |
22 |
1
1. getInputType : replaced return value with null for com/yubico/fido/metadata/CertToBase64Converter::getInputType → NO_COVERAGE |
return typeFactory.constructType(X509Certificate.class); |
23 | } | |
24 | ||
25 | @Override | |
26 | public JavaType getOutputType(TypeFactory typeFactory) { | |
27 |
1
1. getOutputType : replaced return value with null for com/yubico/fido/metadata/CertToBase64Converter::getOutputType → KILLED |
return typeFactory.constructType(String.class); |
28 | } | |
29 | } | |
Mutations | ||
14 |
1.1 |
|
22 |
1.1 |
|
27 |
1.1 |