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