oydid 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/oydid.rb +25 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 853f05f30010c3713c64d00caee53feccd969429af27ee4cbd0370c1de7d9891
4
- data.tar.gz: f601867e31baedc4bba925d99039a184dabca9ac64de311b5171c30d84f5b100
3
+ metadata.gz: 66decf23cb4e474d0703a8948e20474be619c05083bd8abd5ab8d45857ac4ac0
4
+ data.tar.gz: db83f3c7ba0a20c5e4f8fd8ba8b9977b42b9b78fc56ad11df8a8bf12e9657704
5
5
  SHA512:
6
- metadata.gz: 78ce89d1e9fe4546852d6cb9ade32a8afbe0756ddf0af9253db328ade1d7d70fa60f1a1dc3ead15093713264954feae54bfb07f6d73ab41791e18758943b99d7
7
- data.tar.gz: 01f895768ab0fcbc4f38c5e93e2ca0ab1bd82a5f25fe8092cf63ec32d4552e2f4a7a91292f55294bc9c3e40388b57809f92073199318142eb923c76703757289
6
+ metadata.gz: 8856635688f0dd47b246443d7fcc7a994ceef87e7d2594530da0f3489445a544f3c7cc9d20327fec7da3988e83872d1ddf3c854bd4db25b367b72fa917ba09c3
7
+ data.tar.gz: '08956cf2da8ed63a35261a7ffa01cb58b11a177c77fe8b5f873f8ed4d59592695c0e80bd72d118c28f4266728b10e420b4eaab7189c406dd6c7731e52f40e38d'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
data/lib/oydid.rb CHANGED
@@ -1058,6 +1058,18 @@ class Oydid
1058
1058
  return [nil, did_info["message"].to_s]
1059
1059
  end
1060
1060
 
1061
+ # A client that holds no private revocation key - a secure element does
1062
+ # not export one - submits the record it kept from creating or updating
1063
+ # the DID. Rebuilding it here is impossible, and re-signing it would not
1064
+ # help: the hash committed in the TERMINATE entry would no longer match.
1065
+ if !options[:log_revoke].nil?
1066
+ verified, vmsg = verify_revocation_log(did_info, options[:log_revoke], "log_revoke", options)
1067
+ if verified.nil?
1068
+ return [nil, vmsg]
1069
+ end
1070
+ return [link_revocation_log(verified, did_info), ""]
1071
+ end
1072
+
1061
1073
  did = did_info["did"]
1062
1074
  did_hash = did.delete_prefix("did:oyd:")
1063
1075
  did10 = did_hash[0,10]
@@ -1224,6 +1236,15 @@ class Oydid
1224
1236
  # the location extracted from the DID may be percent-encoded
1225
1237
  # (e.g. "http%3A%2F%2Flocalhost%3A3000"); decode before using as URL
1226
1238
  doc_location = doc_location.to_s.gsub("%3A", ":").gsub("%2F", "/")
1239
+ # percent_encode strips the default scheme, so a DID published to an
1240
+ # https location carries a bare host ("oydid.ownyourdata.eu"). Without
1241
+ # putting the scheme back this is not recognised as a remote location
1242
+ # and the revocation is written to a local file instead - which is how
1243
+ # the branch below used to be reached at all.
1244
+ if !(doc_location == "" || doc_location == "local") &&
1245
+ !doc_location.start_with?("http")
1246
+ doc_location = "https://" + doc_location
1247
+ end
1227
1248
 
1228
1249
  # publish revocation log based on location
1229
1250
  case doc_location.to_s
@@ -1236,10 +1257,10 @@ class Oydid
1236
1257
  return [nil, msg]
1237
1258
  end
1238
1259
  else
1239
- File.write(did10 + ".log", revoc_log.to_json)
1240
- if !did_old.nil?
1241
- File.write(did10_old + ".log", revoc_log.to_json)
1242
- end
1260
+ # did_old / did10_old were never defined here - they are locals of
1261
+ # generate_base. Writing the revocation next to the previous DID is
1262
+ # the job of the caller that knows about it.
1263
+ write_private_storage(revoc_log.to_json, did10 + ".log")
1243
1264
  end
1244
1265
 
1245
1266
  return [did, ""]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oydid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Fabianek
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-08-22 00:00:00.000000000 Z
10
+ date: 2026-08-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: simple_dag