@@ -745,8 +745,10 @@ config_pubkey_format(const struct lyd_node *node, enum nc_operation parent_op, s
745745 } else if (!strcmp (format , "subject-public-key-info-format" )) {
746746 pubkey -> type = NC_PUBKEY_FORMAT_X509 ;
747747 } else {
748- ERR (NULL , "Unknown public key format \"%s\"." , format );
749- return 1 ;
748+ /* do not fail, the key may still be usable, or it may have come from a keystore/truststore
749+ * and have a different purpose other than NETCONF */
750+ WRN (NULL , "Public key format \"%s\" not supported. The key may not be usable." , format );
751+ pubkey -> type = NC_PUBKEY_FORMAT_UNKNOWN ;
750752 }
751753 }
752754
@@ -795,8 +797,10 @@ config_privkey_format(const struct lyd_node *node, enum nc_operation parent_op,
795797 } else if (!strcmp (format , "openssh-private-key-format" )) {
796798 privkey -> type = NC_PRIVKEY_FORMAT_OPENSSH ;
797799 } else {
798- ERR (NULL , "Unknown private key format \"%s\"." , format );
799- return 1 ;
800+ /* do not fail, the key may still be usable, or it may have come from a keystore/truststore
801+ * and have a different purpose other than NETCONF */
802+ WRN (NULL , "Private key format \"%s\" not supported. The key may not be usable." , format );
803+ privkey -> type = NC_PRIVKEY_FORMAT_UNKNOWN ;
800804 }
801805 }
802806
0 commit comments