sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.91k stars 565 forks source link

[NEXUS-30683] Strict content validation doesn't like PKCS #12 files #136

Open Vampire opened 1 year ago

Vampire commented 1 year ago

Nexus version OSS 3.33.0

I tried to upload our code signing certificate to Nexus, but Nexus doesn't like it. The file has file extension .p12 and the Java keytool says Keystore-Typ: PKCS12. But on trying to publish to Nexus it complains with

Could not PUT '.../keystore-version.p12'. Received status code 400 from server: Detected content type [application/x-x509-key], but expected [application/x-pkcs12]: .../keystore-version.p12

Work-around is to disable the strict content type validation for that repository.

nblair commented 1 year ago

3.33 is old; I see we haven't closed NEXUS-30683, but I'm curious if this still happens with a more recent version of Sonatype Nexus Repository. The content validation library we've used has been updated so it may be resolved.