private static SecureRandom toSecureRandom(Random random) {
        if (random instanceof SecureRandom) {
            return (SecureRandom) random;
        }

        return new SecureRandom() {

            private static final long serialVersionUID = -4101939112170161136L;

            @Override
            public String getAlgorithm() {
                return "unknown";
            }

            @Override
            public void setSeed(byte[] seed) {}

            @Override
            public void setSeed(long seed) {}

            @Override
            public void nextBytes(byte[] bytes) {
                random.nextBytes(bytes);
            }

            @Override
            public byte[] generateSeed(int numBytes) {
                final byte[] seed = new byte[numBytes];
                random.nextBytes(seed);
                return seed;
            }

            @Override
            public int nextInt() {
                return random.nextInt();
            }

            @Override
            public int nextInt(int n) {
                return random.nextInt(n);
            }

            @Override
            public boolean nextBoolean() {
                return random.nextBoolean();
            }

            @Override
            public long nextLong() {
                return random.nextLong();
            }

            @Override
            public float nextFloat() {
                return random.nextFloat();
            }

            @Override
            public double nextDouble() {
                return random.nextDouble();
            }

            @Override
            public double nextGaussian() {
                return random.nextGaussian();
            }
        };
    }
Deletes the generated X.509 certificate file and RSA private key file.
core/src/main/java/com/linecorp/armeria/internal/common/util/SelfSignedCertificate.java