#
# Copyright (c) 2020 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# public key from keystore
unit-1:
  keystore:
    cert.alias: "service_cert"
    resource.path: "src/test/resources/keystore/keystore.p12"
    type: "PKCS12"
    passphrase: "password"

# backward compatibility with previous approach
unit-2:
  cert-alias: "service_cert"
  # path to keystore
  keystore-path: "src/test/resources/keystore/keystore.p12"
  # Keystore type
  # PKCS12 or JKS
  # defaults to jdk default
  keystore-type: "PKCS12"
  # password of the keystore
  keystore-passphrase: "password"
  # alias of the certificate to get public key from

# private key from keystore
unit-3:
  keystore:
    key:
      alias: "myPrivateKey"
      passphrase: "password"
    resource.path: "src/test/resources/keystore/keystore.p12"
    type: "PKCS12"
    passphrase: "password"

# keystore from classpath
unit-4:
  keystore:
    key.alias: "myprivatekey"
    resource.resource-path: "keystore/keystore.p12"
    passphrase: "password"

# double path - should work fine
unit-5:
  keystore:
    key.alias: "myprivatekey"
    resource:
      path: "src/test/resources/keystore/keystore.p12"
      resource-path: "keystore/keystore.p12"
    passphrase: "password"

# Certificate chain
unit-6:
  keystore:
    trust-store: true
    cert-chain.alias: "1"
    resource.path: "src/test/resources/keystore/keystore-chain.p12"
    passphrase: "helidon"

# Wrong path
unit-7:
  keystore:
    cert-chain.alias: "service_cert"
    resource.path: "src/test/resources/keystore/keystore.wrong"
    passphrase: "password"

# Partially invalid
unit-8:
  keystore:
    resource.path: "src/test/resources/keystore/keystore.p12"
    passphrase: "password"

# Invalid
unit-9:

# Content
unit-10:
  keystore:
    key.alias: "myprivatekey"
    passphrase: "password"
    resource.content: "MIIKiAIBAzCCCkIGCSqGSIb3DQEHAaCCCjM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r7/paJRFYzL0y2hvcVOOok8wrlQL4UqTQEpb41aCZMR1DB05SZ7c5Ylh4swlh/XOpZns1wm/stY7PQFc7s/6a/ODSpPlqvy8jUU/60V+nS4z6c/DVf3AJcY4iVs7JO4Ph3NQ2yGn7fAUB3fsqKklypeHQWS/qXYtf5tY+L8c1eBsJ/PFAb5m48gOc7bxiJm2lP+2Qgcq8zryvVo5gEL+Uz6JfPcwMPV4SiYu3km+H90fVqFXMD0wITAJBgUrDgMCGgUABBQo8WE6INtGOlJiLCH5lJJ8oOXj5QQUSyDEnsWrIl+vsnDBZanHBleOQaUCAgQA"

# PEM
unit-11:
  pem:
    key:
      passphrase: "heslo"
      resource.resource-path: "keystore/id_rsa.p8"
    cert-chain:
      resource.resource-path: "keystore/public_key_cert.pem"

# PEM not encrypted
unit-12:
  pem.key:
    resource.resource-path: "keystore/id_rsa_nocrypt.p8"